log.h File Reference

Go to the source code of this file.

Functions

int logx2s (double crval, int nx, int sx, int slogc, const double x[], double logc[], int stat[])
 Transform to logarithmic coordinates.
int logs2x (double crval, int nlogc, int slogc, int sx, const double logc[], double x[], int stat[])
 Transform logarithmic coordinates.

Variables

const char * log_errmsg []
 Status return messages.


Detailed Description

These routines implement the part of the FITS WCS standard that deals with logarithmic coordinates. They define methods to be used for computing logarithmic world coordinates from intermediate world coordinates (a linear transformation of image pixel coordinates), and vice versa.

logx2s() and logs2x() implement the WCS logarithmic coordinate transformations.

Argument checking:
The input log-coordinate values are only checked for values that would result in floating point exceptions and the same is true for the log-coordinate reference value.

Accuracy:
No warranty is given for the accuracy of these routines (refer to the copyright notice); intending users must satisfy for themselves their adequacy for the intended purpose. However, closure effectively to within double precision rounding error was demonstrated by test routine tlog.c which accompanies this software.


Function Documentation

int logx2s ( double  crval,
int  nx,
int  sx,
int  slogc,
const double  x[],
double  logc[],
int  stat[] 
)

logx2s() transforms intermediate world coordinates to logarithmic coordinates.

Parameters:
[in,out] crval Log-coordinate reference value (CRVALia).
[in] nx Vector length.
[in] sx Vector stride.
[in] slogc Vector stride.
[in] x Intermediate world coordinates, in SI units.
[out] logc Logarithmic coordinates, in SI units.
[out] stat Status return value status for each vector element:
  • 0: Success.
  • 1: Invalid value of x.
Returns:
Status return value:
  • 0: Success.
  • 2: Invalid log-coordinate reference value.
  • 3: One or more of the x coordinates were invalid, as indicated by the stat vector.

int logs2x ( double  crval,
int  nlogc,
int  slogc,
int  sx,
const double  logc[],
double  x[],
int  stat[] 
)

logs2x() transforms logarithmic world coordinates to intermediate world coordinates.

Parameters:
[in,out] crval Log-coordinate reference value (CRVALia).
[in] nlogc Vector length.
[in] slogc Vector stride.
[in] sx Vector stride.
[in] logc Logarithmic coordinates, in SI units.
[out] x Intermediate world coordinates, in SI units.
[out] stat Status return value status for each vector element:
  • 0: Success.
  • 1: Invalid value of logc.
Returns:
Status return value:
  • 0: Success.
  • 2: Invalid log-coordinate reference value.


Variable Documentation

const char * log_errmsg[]

Error messages to match the status value returned from each function.


Generated on Mon Sep 14 17:03:55 2009 for WCSLIB 4.4 by  doxygen 1.5.1