new Projection(header, optionsopt) → {Projection}
Base class for the WCS (World Coordinate System) projections used in astronomy.
Parameters
-
header
object
JSON representation of the image header.
-
options
projParam
<optional>
Projection options.
Returns
-
Projection
Instance of a projection.
Source
Members
defaultProjParamprojParam
Default WCS projection parameters.
Type
Source
Methods
_cpole() → {leaflet.LatLng}
Set up the celestial pole coordinates of the projection (delta_p, alpha_p). projection._natpole() should be called first.
Returns
-
leaflet.LatLng
Celestial coordinates of the pole.
Source
_getCenter(proj) → {leaflet.Point}
Compute the pixel coordinates of the geometric image center.
Parameters
-
proj
Projection
Projection for pixel coordinates.
Returns
-
leaflet.Point
Pixel coordinates of the image center.
Source
_invertCD(cd) → {Array.<Array.<number>>}
Invert the CD
Jacobian matrix of the linear part of the de-projection.
Parameters
-
cd
Array.<Array.<number>>
CD
Jacobian matrix.
Returns
-
Array.<Array.<number>>
Matrix inverse.
Source
_multiToPix(pnt) → {leaflet.Point}
Convert sliced (merged) coordinates to pixel coordinates.
Parameters
-
pnt
leaflet.Point
Sliced (merged) coordinates.
Returns
-
leaflet.Point
Pixel coordinates.
Source
_natpole() → {leaflet.LatLng}
Set up the native pole coordinates of the projection (theta_p, phi_p).
Returns
-
leaflet.LatLng
Latitude and longitude of the pole.
Source
_paramUpdate(paramSrc)
Update internal projection parameters from external properties. The internal projection parameter object is initialized if it does not exist.
Parameters
-
paramSrc
projParam
Input projection parameters.
Source
_phiThetaToRADec(latlng) → {leaflet.LatLng}
Convert native coordinates to celestial coordinates.
Parameters
-
latlng
leaflet.LagLng
Native coordinates.
Returns
-
leaflet.LatLng
Celestial coordinates.
Source
_pixToMulti(pnt) → {leaflet.Point}
Convert pixel coordinates to sliced (merged) coordinates.
Parameters
-
pnt
leaflet.Point
Pixel coordinates.
Returns
-
leaflet.Point
Sliced (merged) coordinates.
Source
_pixToRed(pix) → {leaflet.Point}
Convert pixel coordinates to reduced coordinates.
Parameters
-
pix
leaflet.Point
Pixel coordinates.
Returns
-
leaflet.Point
Reduced coordinates.
Source
_raDecToPhiTheta(latlng) → {leaflet.LatLng}
Convert celestial coordinates to native coordinates.
Parameters
-
latlng
leaflet.LagLng
Celestial coordinates.
Returns
-
leaflet.LatLng
Native coordinates.
Source
_readWCS(header)
Update internal projection parameters from an image header.
Parameters
-
header
object
JSON representation of the image header.
Source
_redToPix(red) → {leaflet.Point}
Convert reduced coordinates to pixel coordinates.
Parameters
-
red
leaflet.Point
Reduced coordinates.
Returns
-
leaflet.Point
Pixel coordinates.
Source
_shiftWCS(projparam)
Correct projection parameters for data slicing.
Parameters
-
projparam
projParam
Projection parameters.
Source
project(latlng) → {leaflet.Point}
Project world coordinates to pixel (image) coordinates.
Parameters
-
latlng
leaflet.LatLng
World coordinates.
Returns
-
leaflet.Point
Pixel (image) coordinates.
Source
unproject(pnt) → {leaflet.LatLng}
De-project pixel (image) coordinates to world coordinates.
Parameters
-
pnt
leaflet.Point
Pixel coordinates.
Returns
-
leaflet.LatLng
World coordinates.