Home | Trees | Indices | Help |
|
---|
|
Astrometric calculations. Routines for positional calculations in the celestial sphere derived from FORTRAN SLALIB of P.T. Wallace. Functions to convert between pixel (X, Y) co-ordinates in the detector plane and sky (RA, Dec) co-ordinates in the celestial sphere, use our PyWCS wrapper to the WCS routines of Starlink's AST library.
Pairing module replacement functions:
import wsatools.pairing as pairing pairing.multiPair(inputList, matchRadius, workPath) pairing.pairOff(set0, set1, pFile0, pFile1, pairCriterion)
becomes:
import wsatools.Astrometry as astro astro.pairObjects(inputList, matchRadius, workPath) astro.pairObjects([set0, set1], pairCriterion, pFile0, oneWay=True)
Author: R.S. Collins, N.C. Hambly
Organization: WFAU, IfA, University of Edinburgh
Requires: Starlink-AST, Numpy, PyWCS
|
|||
Pixel Pixel position data. |
|||
SkyPos Sky position data. |
|
|||
float |
|
||
float |
|
||
float |
|
||
tuple(float, float, float, float) |
|
||
list |
|
||
long |
|
||
dict(int: numpy.array) |
|
||
tuple(float, float) |
|
||
tuple(float, float) |
|
||
numpy.array(numpy.array(float, float, float)) |
|
||
list(SkyPos) |
|
||
list(Pixel) |
|
||
numpy.array(float, float, float) or numpy.array(numpy.array(float, float, float)) |
|
||
tuple(float, float) |
|
||
float, float |
|
||
float, float |
|
||
list(SkyPos) |
|
||
|
|||
float |
|
||
|
|||
|
|||
list(tuple) |
|
||
numpy.array(int) |
|
||
float |
|
||
|
|||
tuple(float) |
|
||
|
|
|||
__package__ =
|
|
Calculates the angular difference between the given two angles accounting for zero crossings.
|
Angle between two points on a sphere.
Note: Based on the SLALIB algorithms dsep() and dsepv() by P.T. Wallace. |
Angle between two arrays of points on a sphere or plane.
Note: Based on the SLALIB algorithms dsep() and dsepv() by P.T. Wallace. |
Takes list of positions in radians and returns centre in radians.
|
Calculates hSpaces for a set of coordinates
|
Calculate an HTM index for the given position at the given level. >>> calcHtmIndex(ra=200.981, dec=-1.06456, level=20) 11030377854233L
|
Takes a set of required mosaics and calculates a set of positions for the corners.
|
Converts a J2000 (FK5) Cartesian vector to a Galactic coordinate.
|
Converts Cartesian vector to a spherical coordinate. The spherical coordinate is longitude (+ve anticlockwise looking from the positive latitude pole) and latitude. The Cartesian coordinate is right handed, with the x-axis at zero longitude and latitude, and the z-axis at the positive latitude pole.
|
Converts from pixel (X,Y) co-ordinates in the detector plane to Cartesian sky co-ordinates in the celestial sphere, for a given detector's observation (e.g. multiframeID, extNum). If multiframeID and extNum supplied it looks up WCS values in the database for this observation, otherwise WCS must be supplied. Uses PyWCS to perform the conversion.
To Do: Would be more efficient if PyWCS performed multiple co-ordinate conversions for a given WCS value set, using ctypes. |
Converts from pixel (X,Y) co-ordinates in the detector plane to sky (RA, Dec) co-ordinates in the celestial sphere, for a given detector's observation (e.g. multiframeID, extNum). If multiframeID and extNum supplied it looks up WCS values in the database for this observation, otherwise WCS must be supplied. Uses PyWCS to perform the conversion.
To Do: Would be more efficient if PyWCS performed multiple co-ordinate conversions for a given WCS value set, using ctypes. |
Converts from sky (RA, Dec) co-ordinates in the celestial sphere to pixel (X,Y) co-ordinates in the detector plane, for a given detector's observation (e.g. multiframeID, extNum). If multiframeID and extNum supplied it looks up WCS values in the database for this observation, otherwise WCS must be supplied. Uses PyWCS to perform the conversion.
To Do: Would be more efficient if PyWCS performed multiple co-ordinate conversions for a given WCS value set, using ctypes. |
Converts spherical coordinate(s) to Cartesian vector(s). The spherical coordinates are longitude (+ve anticlockwise looking from the positive latitude pole) and latitude. The Cartesian coordinates are right handed, with the x-axis at zero longitude and latitude, and the z-axis at the positive latitude pole.
Note: Based on the SLALIB algorithm dcs2c() by P.T. Wallace. |
Converts B1950 (FK4) sky coordinate to Galactic coordinate.
Note: Based on Practical Astronomy With Your Calculator. Section 29 p43. |
Projection of spherical coordinates onto the tangent plane, also known as the gnomic projection. Function translated from the SLALIB FORTRAN source.
Note: Based on the SLALIB algorithm ds2tp() by P.T. Wallace. |
Transform tangent plane coordinates back to spherical given the gnomic projection (standard) and tangent point coordinates. Function translated from the SLALIB Fortran source.
Note: Based on the SLALIB algorithm dtp2s() by P.T. Wallace. |
Calculates the sky (RA, Dec) co-ordinates of the given detector's corners.
|
|
Returns a list of frames matching an input position. Takes a position, a positional tolerance and a list of frames (or a frame-like list) and return the subset of those matching that position within the specified tolerance. Method: identifies the first frame that could be a match based on Dec in the (ordered) input list, then cycles through the list checking all possible matches up to the most distant Dec possible. Note that if the RA and Dec come from a frame that is contained within the given list, that frame will appear as a matched frame in the returned list in addition to any other matches. The optional arguments are provided so that if frame matching required that only common extension numbers are matched, and that information is provided in those input arguments, then the function will only match those.
|
Matches given lists of detections and returns a pointing array.
Note: Using xrange here instead of range gives major performance benefits. To Do:
|
Normalize an angle into the range 0 to 2xPI radians.
|
Pairs object positions from given binary files, saving the resulting pointings in binary files.
To Do:
Note: NumPy is useful and fast for the pp array, but slow for the Cartesian vectors since they are stored as a list. If the calculations were fully vectorised then this wouldn't be an issue. |
Looks up WCS values in the database for given observation.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Sep 8 15:46:41 2014 | http://epydoc.sourceforge.net |