These are support routines used for defining and manipulating image and table world coordinate system information.
More...
|
| void | casu_xytoradec (cpl_wcs *wcs, double x, double y, double *ra, double *dec) |
| |
| void | casu_radectoxy (cpl_wcs *wcs, double ra, double dec, double *x, double *y) |
| |
| void | casu_xytoxy_list (cpl_wcs *wcs1, cpl_wcs *wcs2, int nc, double *x_1, double *y_1, double *x_2, double *y_2) |
| |
| void | casu_radectoxieta (cpl_wcs *wcs, double ra, double dec, double *xi, double *eta) |
| |
| int | casu_coverage (cpl_propertylist *plist, int fudge, double *ra1, double *ra2, double *dec1, double *dec2, int *status) |
| |
| int | casu_crpixshift (cpl_propertylist *p, double scalefac, double sh[]) |
| |
| int | casu_rescalecd (cpl_propertylist *p, double scalefac) |
| |
| int | casu_diffxywcs (cpl_wcs *wcs, cpl_wcs *wcsref, float *xoff, float *yoff, int *status) |
| |
| int | casu_removewcs (cpl_propertylist *p, int *status) |
| |
| int | casu_tabwcs (cpl_propertylist *p, int xcol, int ycol, int *status) |
| |
These are support routines used for defining and manipulating image and table world coordinate system information.
- Author
- Jim Lewis, CASU
◆ casu_coverage()
| int casu_coverage |
( |
cpl_propertylist * | plist, |
|
|
int | fudge, |
|
|
double * | ra1, |
|
|
double * | ra2, |
|
|
double * | dec1, |
|
|
double * | dec2, |
|
|
int * | status ) |
|
extern |
- Name:
- casu_coverage
- Purpose:
- Get coverage in ra,dec of a frame
- Description:
- Given a property list (presumably from an input FITS image) this routine works out the min and max equatorial coordinates covered by the image.
- Language:
- C
- Parameters
-
| plist | Input property list |
| fudge | Percentage fudge factor |
| ra1 | Lower RA |
| ra2 | Upper RA |
| dec1 | Lower Dec |
| dec2 | Upper Dec |
| status | Standard input and output casu status variable |
- Returns
- Standard casu status variable
- Author
- Jim Lewis, CASU
Definition at line 345 of file casu_wcsutils.c.
References casu_xytoradec().
Referenced by casu_getstds(), and casu_imstack().
◆ casu_crpixshift()
| int casu_crpixshift |
( |
cpl_propertylist * | p, |
|
|
double | scalefac, |
|
|
double | sh[] ) |
|
extern |
- Name:
- casu_crpixshift
- Purpose:
- Shift and scale the values of CRPIXn in a header
- Description:
- The values of CRPIXn are rescaled by a given factor and offset by a given value for each axis. This will fail for anything other than 2d images. This routine is useful for output images that have been resampled and shifted. The axes will be transformed in the following way: crpixnew[i] = (crpixold[i] - sh[i])/scalefac - 1.0;
- Language:
- C
- Parameters
-
| p | The property list defining the header for the file. This must have a valid FITS WCS. |
| scalefac | The scaling factor for both axes. |
| sh | The shift for both axes |
- Returns
- Standard casu status variable
- Author
- Jim Lewis, CASU
Definition at line 464 of file casu_wcsutils.c.
Referenced by vircam_interleave().
◆ casu_diffxywcs()
| int casu_diffxywcs |
( |
cpl_wcs * | wcs, |
|
|
cpl_wcs * | wcsref, |
|
|
float * | xoff, |
|
|
float * | yoff, |
|
|
int * | status ) |
|
extern |
- Name:
- casu_diffxywcs
- Purpose:
- Work out the cartesian offsets between two images using their WCSs
- Description:
- The wcs of two images is used to define the cartesian offsets between them. The sense of the offset is that xoff = xprog - xref.
- Language:
- C
- Parameters
-
| wcs | The wcs structure of the programme image |
| wcsref | The wcs structure of the reference image |
| xoff | The X offset |
| yoff | The Y offset |
| status | Standard input and output casu status variable |
- Returns
- Standard casu status variable
- Author
- Jim Lewis, CASU
Definition at line 650 of file casu_wcsutils.c.
References casu_radectoxy(), and casu_xytoradec().
Referenced by vircam_jmp_dither_offsets().
◆ casu_radectoxieta()
| void casu_radectoxieta |
( |
cpl_wcs * | wcs, |
|
|
double | ra, |
|
|
double | dec, |
|
|
double * | xi, |
|
|
double * | eta ) |
|
extern |
- Name:
- casu_radectoxieta
- Purpose:
- Convert ra,dec --> xi,eta
- Description:
- A WCS structure is used to convert input equatorial coordinates to standard coordinates
- Language:
- C
- Parameters
-
| wcs | Input WCS structure |
| ra | Input RA |
| dec | Input Dec |
| xi | Output xi in radians |
| eta | Output eta in radians |
- Returns
- Nothing
- Author
- Jim Lewis, CASU
Definition at line 281 of file casu_wcsutils.c.
Referenced by casu_platesol().
◆ casu_radectoxy()
| void casu_radectoxy |
( |
cpl_wcs * | wcs, |
|
|
double | ra, |
|
|
double | dec, |
|
|
double * | x, |
|
|
double * | y ) |
|
extern |
- Name:
- casu_radectoxy
- Purpose:
- Convert ra,dec --> x,y
- Description:
- A WCS structure is used to convert input equatorial coordinates to x,y.
- Language:
- C
- Parameters
-
| wcs | Input WCS structure |
| ra | Input RA |
| dec | Input Dec |
| x | Output X |
| y | Output Y |
- Returns
- Nothing
- Author
- Jim Lewis, CASU
Definition at line 151 of file casu_wcsutils.c.
Referenced by casu_diffxywcs(), casu_getstds(), and vircam_jmp_interleave().
◆ casu_removewcs()
| int casu_removewcs |
( |
cpl_propertylist * | p, |
|
|
int * | status ) |
|
extern |
- Name:
- casu_removewcs
- Purpose:
- Remove FITS image WCS keywords from a propertylist
- Description:
- Remove FITS WCS keywords from a propertylist. This is sometimes necessary if a FITS table header has been based on an image header.
- Language:
- C
- Parameters
-
| p | The input propertylist |
| status | Standard input and output casu status variable |
- Returns
- Standard casu status variable
- Author
- Jim Lewis, CASU
Definition at line 713 of file casu_wcsutils.c.
Referenced by casu_tabwcs(), vircam_jmp_save_catalogue(), and vircam_jmp_save_illum().
◆ casu_rescalecd()
| int casu_rescalecd |
( |
cpl_propertylist * | p, |
|
|
double | scalefac ) |
|
extern |
- Name:
- casu_rescalecd
- Purpose:
- Scale the values of the CD matrix
- Description:
- The values of CDi_j are rescaled by a given amount each. The elements will each be multiplied by the same given scale factor. This routine is useful for output images that have been resampled.
- Language:
- C
- Parameters
-
| p | The property list defining the header for the file. This must have a valid FITS WCS. |
| scalefac | The scaling factor for both axes. |
- Returns
- Standard casu status variable
- Author
- Jim Lewis, CASU
Definition at line 554 of file casu_wcsutils.c.
Referenced by vircam_interleave().
◆ casu_tabwcs()
| int casu_tabwcs |
( |
cpl_propertylist * | p, |
|
|
int | xcol, |
|
|
int | ycol, |
|
|
int * | status ) |
|
extern |
- Name:
- casu_tabwcs
- Purpose:
- Remove FITS image WCS keywords from a propertylist and replace with tabular keywords
- Description:
- Replace the FITS image WCS keywords in a propertylist with the relevant table FITS keyword. This is not very general
- Language:
- C
- Parameters
-
| p | The input propertylist |
| xcol | The column number for the X position |
| ycol | The column number for the Y position |
| status | Standard input and output casu status variable |
- Returns
- Standard casu status variable
- Author
- Jim Lewis, CASU
Definition at line 761 of file casu_wcsutils.c.
References casu_removewcs(), and casu_rename_property().
Referenced by imcore_conf().
◆ casu_xytoradec()
| void casu_xytoradec |
( |
cpl_wcs * | wcs, |
|
|
double | x, |
|
|
double | y, |
|
|
double * | ra, |
|
|
double * | dec ) |
|
extern |
◆ casu_xytoxy_list()
| void casu_xytoxy_list |
( |
cpl_wcs * | wcs1, |
|
|
cpl_wcs * | wcs2, |
|
|
int | nc, |
|
|
double * | x_1, |
|
|
double * | y_1, |
|
|
double * | x_2, |
|
|
double * | y_2 ) |
|
extern |
- Name:
- casu_xytoxy_list
- Purpose:
- Convert x,y on one frame to x,y on another
- Description:
- The WCS structures of two images is used to convert a list of x,y positions on one image to the frame of reference of the other
- Language:
- C
- Parameters
-
| wcs1 | Input WCS structure for the first image |
| wcs2 | Input WCS structure for the second image |
| nc | The number of input coordinates |
| x_1 | Input X coordinate list |
| y_1 | Input Y coordinate list |
| x_2 | The output X coordinate list |
| y_2 | The output Y coordinate list |
- Returns
- Nothing
- Author
- Jim Lewis, CASU
Definition at line 212 of file casu_wcsutils.c.
Referenced by casu_pawsky_minus(), and vircam_grout().