Constructor
new Projection(a0, d0, angle)
Parameters:
Name | Type | Description |
---|---|---|
a0 |
number | reference coordinate on axis 1 in radians (float) |
d0 |
number | reference coordinate on axis 2 in radians (float) |
angle |
number | rotation in radians (float) |
Methods
(abstract) absToRel(a, d) → {Object}
Computes the relative offset (xp, yp) in a linear plane, from an absolute (RA, DEC).
Use xp and yp to retrieve the i_yp, i_yp pixel values
Parameters:
Name | Type | Description |
---|---|---|
a |
array | right ascensions (float) |
d |
array | declinations (float) |
Returns:
array of offsets x and y
- Type
- Object
iRaiDecToHMSDMS(ra, dec) → {Object}
returns RA/Dec in HMS/DMS
Parameters:
Name | Type | Description |
---|---|---|
ra |
number | pixel coordinates on ra axis (int) |
dec |
number | pixel coordinates on dec axis (int) |
Returns:
Object containing ra, dec coordinates
- Type
- Object
iRaiDecToRaDec(ra, dec) → {Object}
Returns RA/Dec in degrees from a coordinate in pixels
Parameters:
Name | Type | Description |
---|---|---|
ra |
number | pixel coordinates on ra axis (int) |
dec |
number | pixel coordinates on dec axis (int) |
Returns:
Object containing ra, dec coordinates
- Type
- Object
moduloDec(dec) → {number}
DEC is between -PI/2 and PI/2
Parameters:
Name | Type | Description |
---|---|---|
dec |
number | DEC in radians (float) |
Returns:
(float)
- Type
- number
moduloRa(ra) → {number}
RA is between 0 and 2PI
Parameters:
Name | Type | Description |
---|---|---|
ra |
number | RA in radians (float) |
Returns:
(float)
- Type
- number
raDecToiRaiDec(ra, dec) → {Object}
Returns a coordinate in pixels from RA/DEC in degrees
Parameters:
Name | Type | Description |
---|---|---|
ra |
number | RA in degrees (float) |
dec |
number | DEC in degreess (float) |
Returns:
Object containing iRa, iDec coordinates
- Type
- Object
(abstract) relToAbs(x, y) → {Object}
Computes the absolute (RA, DEC) from the relative linear offset given in the header
Parameters:
Name | Type | Description |
---|---|---|
x |
array | array of offsets in X |
y |
array | array of offsets in Y |
Returns:
an object containing ra/dec coordinates
- Type
- Object
(static) create(a0, d0, angle, type)
Factory function creating a projection object
Parameters:
Name | Type | Description |
---|---|---|
a0 |
number | crval1 in radians (float) |
d0 |
number | crval2 in radians (float) |
angle |
number | rotation angle (float) |
type |
ProjEnum | type of projection |