...
 
Commits (4)
Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
The IRAF software is publicly available, but is NOT in the public domain.
The difference is that copyrights granting rights for unrestricted use and
redistribution have been placed on all of the software to identify its authors.
You are allowed and encouraged to take this software and use it as you wish,
subject to the restrictions outlined below.
Permission to use, copy, modify, and distribute this software and its
documentation is hereby granted without fee, provided that the above copyright
notice appear in all copies and that both that copyright notice and this
permission notice appear in supporting documentation, and that references to
the Association of Universities for Research in Astronomy Inc. (AURA),
the National Optical Astronomy Observatories (NOAO), or the Image Reduction
and Analysis Facility (IRAF) not be used in advertising or publicity
pertaining to distribution of the software without specific, written prior
permission from NOAO. NOAO makes no representations about the suitability
of this software for any purpose. It is provided "as is" without express or
implied warranty.
NOAO DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NOAO
BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
iraf-fitsutil (2018.07.04-1) UNRELEASED; urgency=low
iraf-fitsutil (2018.07.06-1) unstable; urgency=low
* Initial release. (Closes: #XXXXXX)
* Initial release. (Closes: #903017)
-- Ole Streicher <olebole@debian.org> Tue, 16 Jan 2018 21:28:32 +0100
-- Ole Streicher <olebole@debian.org> Sat, 07 Jul 2018 11:02:32 +0100
......@@ -31,7 +31,7 @@ Description: FITS utilities for IRAF
* fxdelete: Delete FITS extensions in place
* fxdummyh: Create a dataless single FITS file
* fxextract: Extract a FITS extension
* fxheader: List one line of header description per FITS unit
* fxheader: List one line of header description per FITS unit
* fxinsert: Insert FITS files or extensions into another FITS file
* fxplf: Converts a pixel list file into a BINTABLE extension
* fxsplit: Split a multiple extension FITS file into single FITS files
......
version=3
opts=uversionmangle=s/\.pre/~pre/,filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/iraf-fitsutil-$1\.tar\.gz/ \
https://github.com/iraf-community/fitsutil/tags .*/v?(\d\S+)\.tar\.gz
# fitsutil package parameter file.
version,s,h,"3Jan2010"
version,s,h,"2018.07.06"
../bin/libcfitsio.a
\ No newline at end of file
This diff is collapsed.
......@@ -3,25 +3,17 @@
# Special keywords recognized by IRAF mkpkg files:
#
# mkpkg relink update object library and link
# mkpkg linkonly skip object library updates and just link
# mkpkg install move executable to lib$
# mkpkg update update object library, link, and move to lib$
relink:
install:
update:
$ifeq (hostid, unix) !(date) $endif
#$update libmef.a
#$update libcfitsio.a
$ifeq (hostid, unix) !(date) $endif
$call install@cfitsio
$exit
libmef.a:
@meflib
;
libcfitsio.a: # builds libcfitsio.a and fpack/funpack
@cfitsio
;
# Global environment definitions for the FITSUTIL packages.
reset pkglibs = "fitsutilbin$,fitsutil$lib/"
reset fitsutilbin = "bin$fitsutil/"
reset pkglibs = "fitsutil$bin(arch)/,fitsutil$lib/"
reset fitsutilbin = "fitsutil$bin(arch)/"
reset fitsutillibs = "fitsutil$lib/"
keep
include <error.h>
include <pkg/mef.h>
include <mef.h>
include "dfits.h"
# CAT_PRINT_HEADER -- Procedure to read FITS tape or disk file
......
.help fpack August09 fitsutil
.ih
NAME
fpack -- Tile compress a list of FITS files.
.ih
USAGE
fpack images
.ih
PARAMETERS
.ls images
A list of images. The input may be FITS or MEF FITS, or either of these
gzip-compressed ('.gz'), or may be IRAF '.imh' images.
.le
.ls keep = no
Preserve the input images? By default the input files will be replaced
by the corresponding tile compressed FITS files.
.le
.ls listonly = no
List the types and contents (FITS HDUs) of the input files?
.le
.ls verbose = yes
Print each operation as it takes place? Data volume and timing will
also be reported.
.le
.ls quantization = 16
Floating point pixels will be quantized (see discussion below) to
the background noise divided by the \fBquantization\fR parameter.
.le
.ls flags = ""
A string containing flags to pass directly to the CFITSIO fpack command.
This should typically be used only for "advanced" purposes. The \fBflags\fR
will override the other task parameters.
.le
.ls nimages
[Output] The number of images in the input list.
.le
.ih
DESCRIPTION
The FPACK task will compress a list of images. The input may be
FITS or MEF FITS, may be gzip compressed copies of either type of FITS
files, or may be IRAF ".imh" images. The output file names will be
compressed FITS with ".fits.fz" appended.
This task is a wrapper script for the CFITSIO fpack command (see [1]).
FPACK implements the FITS tile compression standard[3]. This well
established FITS convention has several features that make it preferable
to host file compression such as gzip: 1) Rectangular image
tiles are separately compressed to preserve rapid random access to the
image pixels. 2) The FITS headers remain uncompressed for ease of read/write
access. 3) Individual FITS image extensions (HDUs) are compressed
separately.
FITS tile compression supports multiple compression algorithms.
The IRAF FPACK task by default implements Rice compression. Compression
of integer-valued images will be lossless. The Rice algorithm realizes
a near optimal compression factor[2] and is much faster than alternatives
like gzip. Example 2 describes how to override the choice of algorithm
using the \fBflags\fR parameter.
The \fBkeep\fR parameter offers the option of retaining the original
input files. By default the IRAF FPACK task replaces the input files
with the output compressed files (else the action of compressing the
image list would actually consume additional diskspace). This is
different than the default behavior of the CFITSIO fpack command.
The \fBlistonly\fR and \fBverbose\fR control the amount of information
listed. If \fBlistonly\fR is set to yes, the input data files will
remain untouched and no compressed output will be created. If
\fBverbose\fR is set to no, the task will operate silently.
The number of images processed will be reported on output as the value
of the \fBnimages\fR parameter.
.ih
FLOATING POINT HANDLING
The compression of floating point data presents a notorious challenge.
This is as true for astronomical data as for any other. Compression
ratios are typically small for such data. At the same time, floating
point data often retain unwarranted false precision. For example, if the
input of a standard CCD processing pipeline is 16-bit integers, then
generating 32-bit output is to claim roughly double the precision intrinsic
to the raw data.
A widely adopted solution is to rescale the floating point data into
an integer range more appropriate to the actual data. The FPACK task
accomplishes this using the \fBquantization\fR parameter, which
represents the number of levels into which the measured one-sigma
background will be divided. The default value of 16 (see [2] and
included references) has been shown to have a negligible effect (for
typical purposes) on derived photometric and astrometric results.
Also, bear in mind that the poisson statistics of most astronomical
detectors means that sampling the background noise into 16 such bins
may result in oversampling the bright end of the dynamic range by a
factor of several hundred.
.ih
CFITSIO FPACK FLAGS
The IRAF FPACK task uses the standard CFITSIO fpack command. The many
CFITSIO options have been simplified to present the core behavior of
FITS tile compression within IRAF. The \fBflags\fR parameter permits
overriding the FPACK task behavior should this be warranted by special
circumstances. Whether such non-standard usage is desirable should
be carefully considered. Consult reference [1] for more details.
See example 3 to list the CFITSIO fpack options.
.ih
EXAMPLES
.nf
1. Tile compress a file using the default Rice algorithm
fitsutil> fpack file3.fits
The output file is: file3.fits.fz
2. Tile compress a file using the Hcompress algorithm
fitsutil> fpack file1.fits flags="-h"
3. List the CFITSIO fpack options
fitsutil> t_fpack -H
4. Compress a mixed list of images:
fitsutil> fpack *.fits,*.imh,*.fits.gz
5. Compress a file and retain the original:
fitsutil> fpack file4.fits keep+
6. Uncompress gzipped files and recompress using Rice in one step:
fitsutil> fpack *.gz
1.1.3 (March 2009) CFITSIO version 3.140
Wed 15:31:50 19-Aug-2009
kp1016311.fits.gz -> kp1016311.fits.fz
...
kp1016429.fits.gz -> kp1016429.fits.fz
Wed 15:31:58 19-Aug-2009
63 images, 0.13 seconds each, 0:00:08.0 elapsed
input: 56.550 MB
output: 45.701 MB
saved: 10.849 MB, 19%
relative R = 1.24
.fi
The Rice compressed files save 19% of the space (10.849 MB in this case)
required for the gzip files; the relative compression ratio is 1.24
(output/input).
.ih
SEE ALSO
funpack
.ih
REFERENCES
[1] http://heasarc.gsfc.nasa.gov/fitsio/fpack
[2] http://arxiv.org/abs/0903.2140
[3] http://fits.gsfc.nasa.gov/registry/tilecompression.html
.endhelp
......@@ -127,7 +127,7 @@ char *argv[];
static char *def_flist[1] = {NULL};
char *argp, **flist, *arg, *ip;
pointer kwdb, kwtoc;
char card[256];
char card[SZ_PATHNAME];
char *sline;
int argno, ftype, i, ncards, level, phu;
......
include <imio.h>
include <imhdr.h>
include <pkg/mef.h>
include <mef.h>
include <ctype.h>
define MAX_RANGES 100
......
......@@ -3,7 +3,7 @@ include <imhdr.h>
include <ctype.h>
include <fset.h>
include <mach.h>
include <pkg/mef.h>
include <mef.h>
define MAX_RANGES 100
......
include <imio.h>
include <imhdr.h>
include <pkg/mef.h>
include <mef.h>
# MEFCRFITS -- Creates dummy main fits header.
......
include <imio.h>
include <imhdr.h>
include <pkg/mef.h>
include <mef.h>
include <error.h>
include <ctype.h>
......
include <imio.h>
include <imhdr.h>
include <pkg/mef.h>
include <mef.h>
include <ctype.h>
define MAX_RANGES 100
......
......@@ -5,7 +5,7 @@ include <imhdr.h>
include <imio.h>
include <pmset.h>
include <plio.h>
include <pkg/mef.h>
include <mef.h>
define INC_HDRMEM 8100
......
include <imio.h>
include <imhdr.h>
include <pkg/mef.h>
include <mef.h>
include <mach.h>
......
......@@ -39,17 +39,17 @@ install:
libpkg.a:
#$set XFLAGS='-cfgq -p fitsutil'
catprhdr.x <error.h> <pkg/mef.h> "dfits.h" "dfits.com"
catprhdr.x <error.h> <mef.h> "dfits.h" "dfits.com"
dfits.x <ctype.h> "dfits.h" "dfits.com" <ctype.h>
fxcopy.x <imio.h> <imhdr.h> <pkg/mef.h> <ctype.h>
fxcopy.x <imio.h> <imhdr.h> <mef.h> <ctype.h>
fxconvert.x <imhdr.h>
fxdelete.x <imio.h> <imhdr.h> <ctype.h> <fset.h> <mach.h> <pkg/mef.h>
fxdelete.x <imio.h> <imhdr.h> <ctype.h> <fset.h> <mach.h> <mef.h>
fxextract.x <imio.h> <imhdr.h> <ctype.h> <error.h>
fxdummyh.x <imio.h> <imhdr.h> <pkg/mef.h>
fxdummyh.x <imio.h> <imhdr.h> <mef.h>
fxheader.x <error.h> <fset.h>
fxsplit.x <imio.h> <imhdr.h> <pkg/mef.h> <ctype.h>
fxinsert.x <imio.h> <imhdr.h> <pkg/mef.h> <mach.h>
fxsplit.x <imio.h> <imhdr.h> <mef.h> <ctype.h>
fxinsert.x <imio.h> <imhdr.h> <mef.h> <mach.h>
fxplf.x <syserr.h> <imhdr.h> <imio.h> <pmset.h> <plio.h> \
<pkg/mef.h>
<mef.h>
getcmd.x
;