CImage:WcsIsEq CImage:WcsToXy

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.

Syntax

x, y = CImage:WcsStrToXy( sWcsX, sWcsY )

bullet.gif    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".

bullet.gif    x and y are pixel coordinates in pixel units.

bullet.gif    On success, this method returns 2 numbers.

bullet.gif    On failure, this method returns 0,0.

Remarks

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:

bullet.gif    Right ascension (or longitude or time) in degrees is converted to hours, minutes, and seconds using DegToHms.

bullet.gif    Declination specified in degrees is converted to a string in degrees, minutes, and seconds using DegToDms.

Related Topics

CImage class

GetWcsType

WcsIsEq

WcsToXy

XyToWcs

XyToWcsStr

Image Coordinate System

Subpixel Coordinate Definition

 


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.