diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-10-25 20:57:49 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-10-25 20:57:49 (GMT) |
commit | d1c4bf158203c4e8ec29fdeb83fd311e36320885 (patch) | |
tree | 15874534e282f67505ce4af5ba805a1ff70ec43e /funtools/doc/pod/funimagerowput.pod | |
parent | e19a18e035dc4d0e8e215f9b452bb9ef6f58b9d7 (diff) | |
parent | 339420dd5dd874c41f6bab5808291fb4036dd022 (diff) | |
download | blt-d1c4bf158203c4e8ec29fdeb83fd311e36320885.zip blt-d1c4bf158203c4e8ec29fdeb83fd311e36320885.tar.gz blt-d1c4bf158203c4e8ec29fdeb83fd311e36320885.tar.bz2 |
Merge commit '339420dd5dd874c41f6bab5808291fb4036dd022' as 'funtools'
Diffstat (limited to 'funtools/doc/pod/funimagerowput.pod')
-rw-r--r-- | funtools/doc/pod/funimagerowput.pod | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/funtools/doc/pod/funimagerowput.pod b/funtools/doc/pod/funimagerowput.pod new file mode 100644 index 0000000..2ff05cc --- /dev/null +++ b/funtools/doc/pod/funimagerowput.pod @@ -0,0 +1,122 @@ +=pod + +=head1 NAME + + + +B<FunImageRowPut - put row(s) of an image> + + + +=head1 SYNOPSIS + + + + + + #include <funtools.h> + + void *FunImageRowPut(Fun fun, void *buf, int rstart, int rstop, + int dim1, int dim2, int bitpix, char *plist) + + + + + +=head1 DESCRIPTION + + + + +The B<FunImageRowPut()> routine writes one or more image rows to +the specified FITS image file. The first argument is the Funtools +handle returned by FunOpen(). +The second B<buf> argument is a pointer to the row data buffer, +while the third and fourth arguments specify the starting and ending +rows to write. Valid rows values range from 1 to dim2, i.e., row is +one-valued. + + +The B<dim1>and B<dim2> arguments that follow specify the +dimensions, where dim1 corresponds to naxis1 and dim2 corresponds to +naxis2. The B<bitpix> argument data type of the image and can +have the following FITS-standard values: + + +=over 4 + + + + +=item * + +8 unsigned char + + +=item * + +16 short + + +=item * + +32 int + + +=item * + +-32 float + + +=item * + +-64 double + + +=back + + + +For example: + + double *drow; + Fun fun, fun2; + ... open files ... + /* get section dimensions */ + FunInfoGet(fun, FUN_SECT_DIM1, &dim1, FUN_SECT_DIM2, &dim2, 0); + /* allocate one line's worth */ + drow = malloc(dim1*sizeof(double)); + /* retrieve and process each input row (starting at 1) */ + for(i=1; i <= dim2; i++){ + if( !FunImageRowGet(fun, drow, i, i, "bitpix=-64") ) + gerror(stderr, "can't FunImageRowGet: %d %s\n", i, iname); + ... process drow ... + if( !FunImageRowPut(fun2, drow, i, i, 64, NULL) ) + gerror(stderr, "can't FunImageRowPut: %d %s\n", i, oname); + } + ... + + + +The data are assumed to be in the native machine format and will +automatically be swapped to big-endian FITS format if necessary. This +behavior can be over-ridden with the B<convert=[true|false]> +keyword in the B<plist> param list string. + + +When you are finished writing the image, you should call +FunFlush() to write out the FITS +image padding. However, this is not necessary if you subsequently call +FunClose() without doing any other I/O to the FITS file. + + + + +=head1 SEE ALSO + + + +See funtools(n) for a list of Funtools help pages + + +=cut |