Changeset 5459
- Timestamp:
- Nov 1, 2005, 5:49:53 PM (21 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 2 edited
-
ChangeLogSDRS.tex (modified) (2 diffs)
-
psLibSDRS.tex (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogSDRS.tex
r5458 r5459 1 %%% $Id: ChangeLogSDRS.tex,v 1.17 5 2005-11-02 03:04:51price Exp $1 %%% $Id: ChangeLogSDRS.tex,v 1.176 2005-11-02 03:49:45 price Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 807 807 \begin{itemize} 808 808 \item TBD-ed \code{psEOC_ParallaxFactor} --- do not code yet. 809 \end{itemize} 809 \item Removed \code{psFitsOpenFD} and \code{psFitsOpenStream} --- not 810 possible to implement these with \code{cfitsio}. 811 \item \code{psFitsMoveEnd} changed to \code{psFitsMoveLast}, and moves 812 to the last extension. 813 \item \code{psFitsWriteImage} and \code{psFitsWriteTable} write to the 814 end of the file. 815 \item Added \code{psFitsInsertImage} and \code{psFitsInsertTable} to 816 insert extensions; note that these are expensive. 817 \item Changed \code{psFitsUpdateImage} to use \code{x0,y0} instead of 818 a \code{psRegion}, which would make for an overconstrained system; 819 specified origins. 820 \end{itemize} -
trunk/doc/pslib/psLibSDRS.tex
r5457 r5459 1 %%% $Id: psLibSDRS.tex,v 1.35 1 2005-11-02 03:03:44price Exp $1 %%% $Id: psLibSDRS.tex,v 1.352 2005-11-02 03:49:53 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 3892 3892 3893 3893 \begin{prototype} 3894 psFits *psFitsOpen(const char *filename, const char mode);3894 psFits *psFitsOpen(const char *filename, const char *mode); 3895 3895 \end{prototype} 3896 3896 … … 3900 3900 \code{r+}) or \code{w} (create new file for writing). 3901 3901 3902 \begin{prototype} 3903 psFits *psFitsOpenFD(int fd); 3904 \end{prototype} 3905 3906 Opens a file descriptor and positions the pointer to the PHU. 3907 3908 \begin{prototype} 3909 psFits *psFitsOpenStream(FILE *stream); 3910 \end{prototype} 3911 3912 Opens a stream and positions the pointer to the PHU. 3902 %%%% 3903 %%%% psFitsOpenFD and psFitsOpenStream probably can't be implemented 3904 %%%% using cfitsio without creating temporary files. 3905 %%%% 3906 %% \begin{prototype} 3907 %% psFits *psFitsOpenFD(int fd); 3908 %% \end{prototype} 3909 %% Opens a file descriptor and positions the pointer to the PHU. 3910 %% \begin{prototype} 3911 %% psFits *psFitsOpenStream(FILE *stream); 3912 %% \end{prototype} 3913 %% Opens a stream and positions the pointer to the PHU. 3913 3914 3914 3915 \begin{prototype} … … 3936 3937 3937 3938 \begin{prototype} 3938 bool psFitsMoveEnd(psFits *fits); 3939 \end{prototype} 3940 3941 Moves the pointer to the end of the file, so that a new extension may 3942 be written. 3939 bool psFitsMoveLast(psFits *fits); 3940 \end{prototype} 3941 3942 Moves the pointer to the last extension in the file. 3943 3943 3944 3944 \begin{prototype} … … 4070 4070 4071 4071 \begin{prototype} 4072 bool psFitsUpdateImage(psFits *fits, const psImage *input, psRegion region, int z);4072 bool psFitsUpdateImage(psFits *fits, const psImage *input, int x0, int y0, int z); 4073 4073 \end{prototype} 4074 4074 Write an image section to the open \code{psFits} file pointer. This 4075 4075 operation may write a portion of an image over the existing bytes of 4076 an existing image . Care must be taken to interpret \code{region},4077 which specified the output pixels to be written / over-written. If4078 the combination of \code{region} and the size of \code{psImage *input} 4079 implies writing pixels outside the existing data area of the image, 4080 the function shall return an error (ie, if \code{region.x0 + image.nx 4081 >= NAXIS1}, \code{region.y0 + image.ny >= NAXIS2}, or \code{z >= 4082 NAXIS3}). This function will only write images of the native FITS 4083 image types (\code{psU8}, \code{psS16}, \code{psS32}, \code{psF32}, 4084 \code{psF64}). The user is expected to convert the data type as4085 needed with \code{psImageCopy}. The return value must be 0 for a 4086 successful operation and 1 for an error. \tbd{is region in the frame 4087 of input or of disk image? how do image coordinates relate to disk 4088 image coords?} 4076 an existing image, starting at \code{x0,y0} in the \code{fits} image. 4077 Note that the origin of the \code{input} must be (0,0), not that of 4078 any parent (i.e., \code{input->col0,input->row0)}). Care must be 4079 taken to interpret region which specifies the output pixels to be 4080 written / over-written. If the combination of \code{x0,y0} and the 4081 size of \code{psImage *input} implies writing pixels outside the 4082 existing data area of the image, the function shall return an error 4083 (ie, if \code{x0 + image.nx >= NAXIS1}, \code{y0 + image.ny >= 4084 NAXIS2}, or \code{z >= NAXIS3}). This function will only write images 4085 of the native FITS image types (\code{psU8}, \code{psS16}, 4086 \code{psS32}, \code{psF32}, \code{psF64}). The user is expected to 4087 convert the data type as needed with \code{psImageCopy}. The return 4088 value must be 0 for a successful operation and 1 for an error. 4089 4089 4090 4090 \begin{prototype} … … 4094 4094 Create a new image based on the dimensions specified for the image and 4095 4095 the requested depth. The header and image data segments are written 4096 in the file at the current position of the \code{psFits} pointer. 4097 This function will only write images of the native FITS image types 4098 (\code{psU8}, \code{psS16}, \code{psS32}, \code{psF32}, \code{psF64}). 4099 The user is expected to convert the data type as needed with 4100 \code{psImageCopy}. The return value must be 0 for a successful 4101 operation and 1 for an error. If \code{extname} is not \code{NULL}, 4102 the \code{EXTNAME} in the \code{header} shall be updated to be 4103 \code{extname} before writing. 4096 at the end of the file. This function will only write images of the 4097 native FITS image types (\code{psU8}, \code{psS16}, \code{psS32}, 4098 \code{psF32}, \code{psF64}). The user is expected to convert the data 4099 type as needed with \code{psImageCopy}. The return value must be 0 4100 for a successful operation and 1 for an error. If \code{extname} is 4101 not \code{NULL}, the \code{EXTNAME} in the \code{header} shall be 4102 updated to be \code{extname} before writing. 4103 4104 \begin{prototype} 4105 bool psFitsInsertImage(psFits *fits, psMetadata *header, const psImage *input, int depth, 4106 const char *extname, bool after); 4107 \end{prototype} 4108 4109 \code{psFitsInsertImage} behaves in the same manner as 4110 \code{psFitsWriteImage}, except that the extension is inserted 4111 according to the value of the boolean \code{after}. If \code{after} 4112 is \code{true}, then the extension is inserted after the current 4113 \code{psFits} pointer; otherwise the extension is inserted before the 4114 current \code{psFits} pointer. \textbf{The user should beware that 4115 this is potentially a very expensive operation in terms of time, since 4116 the entire file following the inserted extension must be rewritten.} 4104 4117 4105 4118 \subsubsection{FITS Table I/O Functions} … … 4171 4184 bool psFitsWriteTable(psFits* fits, const psMetadata *header, const psArray* table); 4172 4185 \end{prototype} 4173 Accepts a \code{psArray} of \code{psMetadata} and writes it to the 4174 current HDU. If the current HDU is not a table type, this will fail 4175 and return FALSE. 4186 Accepts a \code{psArray} of \code{psMetadata} and writes it to the end 4187 of the file. 4176 4188 4177 4189 \begin{prototype} … … 4181 4193 in the current HDU. If the current HDU is not a table type, this will 4182 4194 fail and return FALSE. 4195 4196 \begin{prototype} 4197 bool psFitsInsertTable(psFits *fits, const psMetadata *header, const psArray* table, 4198 bool after); 4199 \end{prototype} 4200 4201 \code{psFitsInsertTable} behaves in the same manner as 4202 \code{psFitsWriteTable}, except that the extension is inserted 4203 according to the value of the boolean \code{after}. If \code{after} 4204 is \code{true}, then the extension is inserted after the current 4205 \code{psFits} pointer; otherwise the extension is inserted before the 4206 current \code{psFits} pointer. \textbf{The user should beware that 4207 this is potentially a very expensive operation in terms of time, since 4208 the entire file following the inserted extension must be rewritten.} 4183 4209 4184 4210 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note:
See TracChangeset
for help on using the changeset viewer.
