Changeset 1998 for trunk/doc/pslib/psLibSDRS.tex
- Timestamp:
- Oct 7, 2004, 8:16:09 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r1996 r1998 1 %%% $Id: psLibSDRS.tex,v 1.12 7 2004-10-07 03:14:26 price Exp $1 %%% $Id: psLibSDRS.tex,v 1.128 2004-10-07 18:16:09 eugene Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 2714 2714 \subsubsection{Image I/O Functions} 2715 2715 2716 \tbd{this section is being deprecated and the equivalent of these 2717 functions are being moved to FITS I/O Functions.} 2718 2716 2719 \begin{verbatim} 2717 2720 psImage *psImageReadSection(psImage *output, int x0, int y0, int x1, int y1, int z, … … 3779 3782 the function shall raise an error. 3780 3783 3784 \tbd{this function is being deprecated and the equivalent is being 3785 moved to FITS I/O Functions.} 3786 3781 3787 \begin{verbatim} 3782 3788 psMetadata *psMetadataFReadHeader(psMetadata *output, const char *extname, … … 3786 3792 \code{psMetadata} structure. 3787 3793 3794 \tbd{this function is being deprecated and the equivalent is being 3795 moved to FITS I/O Functions.} 3788 3796 3789 3797 \subsubsection{Configuration files} … … 3902 3910 A BNF-like grammar of the configuration file is contained in 3903 3911 \S\ref{sec:configgrammar}. 3912 3913 \subsubsection{FITS Header I/O Functions} 3914 3915 \begin{verbatim} 3916 psMetadata *psFitsReadHeader(psMetadata *output, const char *extname, int extnum, const char *filename); 3917 psMetadata *psFitsReadHeaderPtr(psMetadata *output, const char *extname, int extnum, const psFits *fd); 3918 \end{verbatim} 3919 Read header data from a FITS image file into a \code{psMetadata} 3920 structure. The \code{extname} and \code{extnum} parameters specify 3921 the extension of interest as above. The data is read from the 3922 extension specified by extname (matching the EXTNAME keyword) or by 3923 the extnum value (with 0 representing the primary header unit (PHU), 1 3924 the first extension, etc). This function must call \code{psError} and 3925 return \code{NULL} if the specified extension does not exist. If 3926 \code{extname} is not \code{NULL}, \code{extnum} must be set to -1 or 3927 the function shall raise an error. The file is either specified as a 3928 named file on disk or by an open \code{psFits} file pointer. 3929 3930 \begin{verbatim} 3931 psHash *psFitsReadHeaderSet (const char *filename); 3932 psHash *psFitsReadHeaderSetPtr (const psFits *fd); 3933 \end{verbatim} 3934 Load a complete set of headers from a named file or \code{psFits} file 3935 pointer. This function loads the headers from all extensions into a 3936 \code{psHash}, each entry of which is a pointer to a \code{psMetadata} 3937 structure containing the header data. The hash keys are the 3938 \code{EXTNAME} values for each header (with the value of \code{PHU} 3939 for the primary header unit). 3940 3941 \subsubsection{FITS Table I/O Functions} 3942 3943 \begin{verbatim} 3944 void *psFitsReadTableRow (int *nBytes, char *extname, int row, char *filename); 3945 void *psFitsReadTableRowPtr (int *nBytes, char *extname, int row, psFits *fd); 3946 \end{verbatim} 3947 These functions read a single row of the table in the extension 3948 specified by \code{extname}, in the file specified by the given 3949 \code{filename} or \code{psFits} file pointer. The row number to be 3950 read is given by \code{row}. The result is returned as collection of 3951 \code{nBytes} bytes allocated by the function. The function must 3952 apply the needed byte-swapping on the data in the row based on the 3953 description of the table data in the table header. \tbr{we may need 3954 to be more flexible here: if we call this function repeatedly, it 3955 would be more efficient to pass the corresponding header or keep it 3956 somewhere (and the file pointer location, for that matter).} 3957 3958 \begin{verbatim} 3959 psArray *psFitsReadTableColumn (char *extname, char *colname, char *filename); 3960 psArray *psFitsReadTableColumnPtr (char *extname, char *colname, psFits *fd); 3961 \end{verbatim} 3962 These functions read a single column of the table in the extension 3963 specified by \code{extname}, in the file specified by the given 3964 \code{filename} or \code{psFits} file pointer. The column is 3965 specified by the FITS table column key given by \code{row}. The 3966 result is returned as a \code{psArray}, with one row's worth of data 3967 per array element. 3968 3969 \begin{verbatim} 3970 psVector *psFitsReadTableColumnNum (char *extname, char *colname, char *filename); 3971 psVector *psFitsReadTableColumnNumPtr (char *extname, char *colname, psFits *fd); 3972 \end{verbatim} 3973 These functions read a single column of the table in the extension 3974 specified by \code{extname}, in the file specified by the given 3975 \code{filename} or \code{psFits} file pointer. The column is 3976 specified by the FITS table column key given by \code{row}. 3977 3978 \begin{verbatim} 3979 psArray *psFitsReadTable (int *nBytes, char *extname, char *filename); 3980 psArray *psFitsReadTablePtr (int *nBytes, char *extname, psFits *fd); 3981 \end{verbatim} 3982 This function reads the entire data block from a table into the a 3983 \code{psArray}, with one element of the array per row. The number of 3984 bytes per row is returned in \code{nBytes}. The result is returned as 3985 a \code{psVector}, which, as a numerical data type, is only valid for 3986 numerical table columns. The function must apply the needed 3987 byte-swapping on the data in each row based on the description of the 3988 table data in the table header. 3989 3990 \subsection{Rectangles} 3991 3992 In many places, we need to refer to a rectangular area. We define a 3993 structure to represent a rectangle: 3994 \begin{verbatim} 3995 typedef struct { 3996 psS32 x0; 3997 psS32 x1; 3998 psS32 y0; 3999 psS32 y1; 4000 } psRectangleS32; 4001 \end{verbatim} 4002 4003 \begin{verbatim} 4004 typedef struct { 4005 psF32 x0; 4006 psF32 x1; 4007 psF32 y0; 4008 psF32 y1; 4009 } psRectangleF32; 4010 psRectangle *psRectangleAlloc (float x0, float x1, float y0, float y1); 4011 \end{verbatim} 4012 4013 \begin{verbatim} 4014 psRectangle *psRectangleFromString (char *region); 4015 \end{verbatim} 4016 This function converts the IRAF description of a region in the form 4017 \code{[x0,x1:y0,y1]}, used for header entries such as \code{BIASSEC}, 4018 into the corresponding \code{psRectangle} structure. 3904 4019 3905 4020 \subsection{Detector and sky positions}
Note:
See TracChangeset
for help on using the changeset viewer.
