new Projection(header, optionsopt) → {Projection}
Base class for the WCS (World Coordinate System) projections used in astronomy.
Parameters
-
header
objectJSON representation of the image header.
-
options
projParam<optional>
Projection options.
Returns
-
ProjectionInstance 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.LatLngCelestial coordinates of the pole.
Source
_getCenter(proj) → {leaflet.Point}
Compute the pixel coordinates of the geometric image center.
Parameters
-
proj
ProjectionProjection for pixel coordinates.
Returns
-
leaflet.PointPixel 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>>CDJacobian matrix.
Returns
-
Array.<Array.<number>>Matrix inverse.
Source
_multiToPix(pnt) → {leaflet.Point}
Convert sliced (merged) coordinates to pixel coordinates.
Parameters
-
pnt
leaflet.PointSliced (merged) coordinates.
Returns
-
leaflet.PointPixel coordinates.
Source
_natpole() → {leaflet.LatLng}
Set up the native pole coordinates of the projection (theta_p, phi_p).
Returns
-
leaflet.LatLngLatitude 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
projParamInput projection parameters.
Source
_phiThetaToRADec(latlng) → {leaflet.LatLng}
Convert native coordinates to celestial coordinates.
Parameters
-
latlng
leaflet.LagLngNative coordinates.
Returns
-
leaflet.LatLngCelestial coordinates.
Source
_pixToMulti(pnt) → {leaflet.Point}
Convert pixel coordinates to sliced (merged) coordinates.
Parameters
-
pnt
leaflet.PointPixel coordinates.
Returns
-
leaflet.PointSliced (merged) coordinates.
Source
_pixToRed(pix) → {leaflet.Point}
Convert pixel coordinates to reduced coordinates.
Parameters
-
pix
leaflet.PointPixel coordinates.
Returns
-
leaflet.PointReduced coordinates.
Source
_raDecToPhiTheta(latlng) → {leaflet.LatLng}
Convert celestial coordinates to native coordinates.
Parameters
-
latlng
leaflet.LagLngCelestial coordinates.
Returns
-
leaflet.LatLngNative coordinates.
Source
_readWCS(header)
Update internal projection parameters from an image header.
Parameters
-
header
objectJSON representation of the image header.
Source
_redToPix(red) → {leaflet.Point}
Convert reduced coordinates to pixel coordinates.
Parameters
-
red
leaflet.PointReduced coordinates.
Returns
-
leaflet.PointPixel coordinates.
Source
_shiftWCS(projparam)
Correct projection parameters for data slicing.
Parameters
-
projparam
projParamProjection parameters.
Source
project(latlng) → {leaflet.Point}
Project world coordinates to pixel (image) coordinates.
Parameters
-
latlng
leaflet.LatLngWorld coordinates.
Returns
-
leaflet.PointPixel (image) coordinates.
Source
unproject(pnt) → {leaflet.LatLng}
De-project pixel (image) coordinates to world coordinates.
Parameters
-
pnt
leaflet.PointPixel coordinates.
Returns
-
leaflet.LatLngWorld coordinates.