CImage:WcsStrToXy
The WcsStrToXy method uses the world coordinate system ("WCS") calibration of the image to convert the specified world coordinates to pixel coordinates. If the WCS calibration is equatorial, then the coordinates passed to this method are specified as HMS and DMS strings. The type of WCS type used by the image may be obtained using GetWcsType and WcsIsEq.
x, y = CImage:WcsStrToXy( sWcsX, sWcsY ) |
sWcsX and sWcsY are world coordinates strings. If the image has an equatorial calibration, then sWcsX and sWcsY correspond to right ascension and declination specified as HMS and DMS strings, like "HH:MM:SS.SSS" and "-DD:MM:SS.SSS".
x and y are pixel coordinates in pixel units.
On success, this method returns 2 numbers.
On failure, this method returns 0,0.
This method requires the world coordinates to be expressed as strings. If the image WCS is of the equatorial type, then the passed coordinates correspond to right ascension and declination in HMS and DMS string format, like, "HH:MM:SS.SSS" and "-DD:MM:SS.SSS". Before calling this function, you can convert FITS Standard units of degrees to HMS and DMS strings as follows:
Right ascension (or longitude or time) in degrees is converted to hours, minutes, and seconds using DegToHms.
Declination specified in degrees is converted to a string in degrees, minutes, and seconds using DegToDms.
CImage class, GetWcsType, WcsIsEq, WcsToXy, XyToWcs, XyToWcsStr, Image Coordinate System, Subpixel Coordinate Definition
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.