2164ec039cacfe1a77ed3dc3100c2b4ef886a988
3 README file for CADS/UVS fits2jpeg software
4 -------------------------------------------
7 0. FEATURES
8 -----------
9 fits2jpeg is a tiny program to read FITS Images and convert them
10 to jpeg, which is more popular. This software supports various
11 type of intensity scaling and image enhancements. fits2jpeg do not
12 support coordinate axes overlay. fits2jpeg supports batch mode
13 operations - for instance, converting several fits files to jpeg
14 at once.
17 1. BUILD/INSTALL
18 ----------------
20 Pre-requisites:
22 a) CFITSIO
23 CFITSIO is a library and headers to read and write FITS files.
24 If you do not have cfitsio installed, get it from:
26 http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html
28 b) JPEGLIB
29 jpeg library and headers. libjpeg is installed by default on most
30 platforms, but we need the header files too. Once you have cfitsio
31 and jpeglib installed, you may proceed with compiling jpeg2fits.
32 Follow these 4 steps:
35 1. `cd' to the directory containing the package's source code and type
36 `./configure' to configure the package for your system.
38 If cfitsio library and header files are not in the standard path,
39 then you may need to pass on the following argument to configure:
41 --with-cfitsio=path/to/cfitsio
43 Script will search fitsio header files in:
44 1. path/to/cfitsio
45 2. path/to/cfitsio/include
46 3. path/to/cfitsio/include/cfitsio
48 and library (libcfitsio.so or libcfitsio.a) in
49 1. path/to/cfitsio
50 2. path/to/cfitsio/lib
51 3. path/to/cfitsio/lib64
54 Similarly, for jpeglib (incase configure failed to detect it)
56 --with-jpeglib=/path/to/jpeglib
58 Running `configure' takes a few seconds. While running, it prints some
59 messages telling which features it is checking for.
61 2. Type `make' to compile the package.
63 3. Type `make install' to install the programs and any data files and
64 documentation. By default, the binary is copied to /usr/local/bin.
65 You may change this destination by passing on the following
66 argument to configure:
68 --prefix=/your/chosen/destination
70 Which would result in the binary in /your/chosen/destination/bin
71 You may need to ensure that in $PATH to run the program.
73 4. You can remove the program binaries and object files from the
74 source code directory by typing `make clean'.
76 You may read more about configure script and others in the accompanying
77 file named `INSTALL.txt'.
80 2.USAGE
81 -------
83 fits2jpeg [options] <fits_file>
85 Options are:
86 -h help
88 -s <scale_type>
89 scale for output image intensity. Valid arguments are:
91 linear for linear scaling, default
92 sqroot for square root scale
93 square for quadratic scale
94 cubic for cubic scale
95 log for log scale
97 -e <operation>
98 Imaghe enhancement operations. Valid arguments are:
100 equalize perform histogram equalization
101 normalize perform a linear contrast stretch
102 (use cutoffs at 1% and 99% for image data)
104 Output will be written to <fits_file_root>.jpg. For eg.,
106 fits2jpeg 30dor.fits
108 writes output to jpeg file 30dor.jpg
110 Wild card entries allowed in <fits_file>. For eg: *.fits,
111 m31*.fits ngc???.fits etc.
113 More examples:
115 i. fits2jpeg -s cubic sirius.fits
116 will write out sirius.jpg, flux/intensity in log scale
118 ii. fits2jpeg -s sqroot *.fits
119 Converts all fits files in the directory to jpegs, with
120 square-root scaling of flux/intensity - Good for very
121 high dynamic range images
123 iii. fits2jpeg -e normalize ngc4151.fits
124 Converts ngc4151.fits to ngc4151.jpg, contrast stretched.
126 NOTE: You can perform scaling + enhancing on an image. Scaling will
127 always be performed first. In most cases combining these two
128 would lead to un-usable images :)
131 3. DOCUMENTATION
132 ----------------
133 An extensive coverage of how this program works along with line
134 by line account of the happenings within the code, are dealt with
135 in the user manual, which is yet to be written :(
138 4. LICENSE: GPL [See the file COPYING.txt for details]
139 -----------
142 5. DISCLAIMER
143 -------------
144 You may encounter bugs in this software. If you do, please
145 report them. Your bug reports are valuable contributions,
146 since they allow us to notice and fix problems on
147 machines/platforms we don't have, and/or remained un-noticed.
150 6. REPORTING BUGS
151 -----------------
152 You can register with the cads bug reporting tool:
153 http://cads.iiap.res.in/bugzilla/
154 and file a bug report.
156 If you are too lazy, drop in an email to: cads_AT_iiap.res.in
158 Either way, please include as many details as possible.
160 -----------------------------------------------------------
161 Reks, 28 June 2012 <reks_at_iiap.res.in>
162 Last modified: 28 June 2012