VIRCAM Pipeline  1.3.4
Functions

These are support routines used for defining and manipulating image and table world coordinate system information. More...

Functions

void vircam_xytoradec (cpl_wcs *wcs, double x, double y, double *ra, double *dec)
 
void vircam_radectoxy (cpl_wcs *wcs, double ra, double dec, double *x, double *y)
 
void vircam_xytoxy_list (cpl_wcs *wcs1, cpl_wcs *wcs2, int nc, double *x_1, double *y_1, double *x_2, double *y_2)
 
void vircam_radectoxieta (cpl_wcs *wcs, double ra, double dec, double *xi, double *eta)
 
int vircam_coverage (cpl_propertylist *plist, int fudge, double *ra1, double *ra2, double *dec1, double *dec2, int *status)
 
int vircam_crpixshift (cpl_propertylist *p, double scalefac, double sh[])
 
int vircam_rescalecd (cpl_propertylist *p, double scalefac)
 
int vircam_diffxywcs (cpl_wcs *wcs, cpl_wcs *wcsref, float *xoff, float *yoff, int *status)
 
int vircam_removewcs (cpl_propertylist *p, int *status)
 
int vircam_tabwcs (cpl_propertylist *p, int xcol, int ycol, int *status)
 

Detailed Description

These are support routines used for defining and manipulating image and table world coordinate system information.

Author
Jim Lewis, CASU

Function Documentation

int vircam_coverage ( cpl_propertylist *  plist,
int  fudge,
double *  ra1,
double *  ra2,
double *  dec1,
double *  dec2,
int *  status 
)
Name:
vircam_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
plistInput property list
fudgePercentage fudge factor
ra1Lower RA
ra2Upper RA
dec1Lower Dec
dec2Upper Dec
statusStandard input and output vircam status variable
Returns
Standard vircam status variable
Author
Jim Lewis, CASU

Definition at line 347 of file vircam_wcsutils.c.

References vircam_xytoradec().

Referenced by vircam_getstds().

int vircam_crpixshift ( cpl_propertylist *  p,
double  scalefac,
double  sh[] 
)
Name:
vircam_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
pThe property list defining the header for the file. This must have a valid FITS WCS.
scalefacThe scaling factor for both axes.
shThe shift for both axes
Returns
Standard vircam status variable
Author
Jim Lewis, CASU

Definition at line 466 of file vircam_wcsutils.c.

Referenced by vircam_interleave().

int vircam_diffxywcs ( cpl_wcs *  wcs,
cpl_wcs *  wcsref,
float *  xoff,
float *  yoff,
int *  status 
)
Name:
vircam_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
wcsThe wcs structure of the programme image
wcsrefThe wcs structure of the reference image
xoffThe X offset
yoffThe Y offset
statusStandard input and output vircam status variable
Returns
Standard vircam status variable
Author
Jim Lewis, CASU

Definition at line 653 of file vircam_wcsutils.c.

References vircam_radectoxy(), and vircam_xytoradec().

Referenced by vircam_jmp_dither_offsets().

void vircam_radectoxieta ( cpl_wcs *  wcs,
double  ra,
double  dec,
double *  xi,
double *  eta 
)
Name:
vircam_radectoxieta
Purpose:
Convert ra,dec –> xi,eta
Description:
A WCS structure is used to convert input equatorial coordinates to standard coordinates
Language:
C
Parameters
wcsInput WCS structure
raInput RA
decInput Dec
xiOutput xi in radians
etaOutput eta in radians
Returns
Nothing
Author
Jim Lewis, CASU

Definition at line 283 of file vircam_wcsutils.c.

Referenced by vircam_platesol().

void vircam_radectoxy ( cpl_wcs *  wcs,
double  ra,
double  dec,
double *  x,
double *  y 
)
Name:
vircam_radectoxy
Purpose:
Convert ra,dec –> x,y
Description:
A WCS structure is used to convert input equatorial coordinates to x,y.
Language:
C
Parameters
wcsInput WCS structure
raInput RA
decInput Dec
xOutput X
yOutput Y
Returns
Nothing
Author
Jim Lewis, CASU

Definition at line 152 of file vircam_wcsutils.c.

Referenced by vircam_diffxywcs(), vircam_getstds(), and vircam_jmp_interleave().

int vircam_removewcs ( cpl_propertylist *  p,
int *  status 
)
Name:
vircam_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
pThe input propertylist
statusStandard input and output vircam status variable
Returns
Standard vircam status variable
Author
Jim Lewis, CASU

Definition at line 716 of file vircam_wcsutils.c.

Referenced by vircam_jmp_save_catalogue(), vircam_jmp_save_illum(), and vircam_tabwcs().

int vircam_rescalecd ( cpl_propertylist *  p,
double  scalefac 
)
Name:
vircam_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
pThe property list defining the header for the file. This must have a valid FITS WCS.
scalefacThe scaling factor for both axes.
Returns
Standard vircam status variable
Author
Jim Lewis, CASU

Definition at line 557 of file vircam_wcsutils.c.

Referenced by vircam_interleave().

int vircam_tabwcs ( cpl_propertylist *  p,
int  xcol,
int  ycol,
int *  status 
)
Name:
vircam_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
pThe input propertylist
xcolThe column number for the X position
ycolThe column number for the Y position
statusStandard input and output vircam status variable
Returns
Standard vircam status variable
Author
Jim Lewis, CASU

Definition at line 764 of file vircam_wcsutils.c.

References vircam_removewcs(), and vircam_rename_property().

Referenced by imcore_conf().

void vircam_xytoradec ( cpl_wcs *  wcs,
double  x,
double  y,
double *  ra,
double *  dec 
)
Name:
vircam_xytoradec
Purpose:
Convert x,y -> ra,dec
Description:
A WCS structure is used to convert input x,y coordinates to equatorial coordinates.
Language:
C
Parameters
wcsInput WCS structure
xInput X
yInput Y
raOutput RA
decOutput Dec
Returns
Nothing
Author
Jim Lewis, CASU

Definition at line 94 of file vircam_wcsutils.c.

Referenced by vircam_coverage(), vircam_diffxywcs(), vircam_jmp_interleave(), vircam_jmp_wcsfit(), and vircam_platesol().

void vircam_xytoxy_list ( cpl_wcs *  wcs1,
cpl_wcs *  wcs2,
int  nc,
double *  x_1,
double *  y_1,
double *  x_2,
double *  y_2 
)
Name:
vircam_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
wcs1Input WCS structure for the first image
wcs2Input WCS structure for the second image
ncThe number of input coordinates
x_1Input X coordinate list
y_1Input Y coordinate list
x_2The output X coordinate list
y_2The output Y coordinate list
Returns
Nothing
Author
Jim Lewis, CASU

Definition at line 213 of file vircam_wcsutils.c.

Referenced by vircam_grout().