CImage:AngleWcs
The AngleWcs method calculates the angle in degrees between a line formed by 2 image points and the world coordinate system. The related Angle method computes the angle for pixel coordinates.
nAngle = CImage:AngleWcs( x1, y1, x2, y2)
x1, y1,x2, y2 are world coordinate values and may be expressed as numbers or strings.
On success, this method returns nAngle as a number.
On failure, this method returns 0.
The AngleWcs method returns an angle in degrees. If the image does not contain a world coordinate calibration, then Mira interprets the values as pixel coordinates. If the coordinate calibration is in equatorial form, then right ascension and declination would be passed as strings in units of hours and degrees, respectively.
Assume an image is displayed and attached to a CImageView named V. The following script measures the angle formed by two points (x1,y1) and (x2,y2) when the coordinates are in distance units (pixels, mm, microns, etc.):
|
-- load the image from a |
|
-- point 1 |
|
-- point 2 |
|
-- make the measurement |
Alternatively, the following example supposes an astronomical image with an equatorial calibration and that the points are expressed in angular units:
|
-- load the image from a |
|
-- point 1 |
|
-- point 2 |
|
-- make the measurement |
CImage class, Angle, Angle Measurement Definition
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.