next up previous contents HEAsoft Home
Next: HEAdas Makefiles Up: Overview of HEAdas Libraries Previous: heaio   Contents

heautils

headas_utils.c Contains utility routines:

int headas_parstamp(fitsfile *, int) Writes a block of HISTORY keywords into a FITS file header listing all the runtime parameter values. Arguments are a FITS file pointer and extension number. Callable from Fortran as hdparstamp(). *** DEPRECATED *** PLEASE USE HDpar_stamp (see below) INSTEAD ***

int HDpar_stamp(fitsfile *, int, int *) Writes a block of HISTORY keywords into a FITS file header listing all the runtime parameter values. Arguments are a FITS file pointer, extension number, and status pointer. Callable from Fortran as hdpar_stamp().

char *hdbasename(char *) Equivalent to the basename() function (returns the filename portion of an input pathname).

int headas_clobberfile(char *) Deletes the specified file if it already exists and if the clobber parameter for the current task is set to "yes". Callable from Fortran as hdclobber().

float hd_ran2(long *) Random number generator based on ran2() from Numerical Recipes in C, 2nd ed., p282. Returns a uniform random deviate between 0.0 and 1.0 (exclusive of the endpoint values). Call with a negative integer argument to initialize. Callable from Fortran as hd_ran2().

headas_toolname.c Contains routines to get/set the name/version of the current task:

void set_toolname(const char *) Use this to register the task's name. The Fortran version is hdnameset().

void get_toolname(char *) Use this to retrieve the task's name. If it hasn't been set (via set_toolname()) a default name is determined from the name of the executable file. The Fortran version is hdnameget().

void set_toolversion(const char *) Use this to register a version number string for a task. The Fortran version is hdverset().

void get_toolversion(char *) Use this to retrieve a string containing the task's version number. If it hasn't been set (via set_toolversion()) a default version number string of "0.0" is returned. The Fortran version is hdverget().

void get_toolnamev(char *) Use this to retrieve a single string containing both the task's name and version number (joined by a "_"). The Fortran version is hdnamevget().

headas_history.c Contains routines to get/set the value of the history parameter. Designed primarily for internal use and under normal circumstances should not be called by tasks explicitly.

void get_history(int *) This routine returns the value of the history parameter (if present) or "-1" if unspecified. Called by headas_parstamp(). Fortran version is hdghis().

void set_history(int) This registers the value of the history parameter. If it is called explicitly from a task it will override the user-specified value. Fortran version is hdphis().

headas_polyfit.c Contains routine to do a least-square polynomial fit.

void HDpoly_fit(double * x, double * y, double * c, int n, int degree); x - (I) an n-element array of independent variables y - (I) an n-element array of dependent variables a - (O) an degree+1 element of coefficient n - (I) size of array of x or y degree - (I) the degree if the polynomial to fit

headas_sort.c Contains routine to do a quick sort on the input array, returning sorted index (instead of data as with C qsort).

void HDsort(float * base, int * index, int n); array - (IN) unsorted data array index - (IN/OUT) array index n - (IN) size of array

headas_smooth.c Contains routine to do a boxcar average on input data:

void HDsmooth(float * input, float * output, int num, int width); input - the unsmoothed array output - the smoothed array num - the size of array width - the width of the boxcar

headas_svdfit.c Contains routines used by HDpoly_fit (slightly modified versions of routines from Press, William H., Brian P. Flannery, Saul A Teukolsky and William T. Vetterling, 1986, "Numerical Recipes: The Art of Scientific Computing" (Fortran), Cambrigde University Press.


next up previous contents HEAsoft Home
Next: HEAdas Makefiles Up: Overview of HEAdas Libraries Previous: heaio   Contents
Bryan Irby 2004-12-08