index c5f5ca1..eeace20 100644 (file)
@@ -80,10 +80,12 @@ named `INSTALL.txt'.
 -------
 
  Usage: fits2jpeg [options] <fits_file>
-
- Options are:
+        You need to specify a fits image file <fits_file> for this program to
+        work. Everything else is optional. A brief description of them are
+        listed below:
 
     -h help
+       Prints out a usage-help message, much like this section.
 
     -s <scale_type>
        scale for output image, where <scale_type> can be:
@@ -95,6 +97,19 @@ named `INSTALL.txt'.
          normalize      for linear histogram stretch
          equalize       for histogram equalization
 
+    -n
+       Negate the image
+
+    -q <value>
+       quality factor. Defines the jpeg encoding quality
+       Valid range: 0-100, default value: 100, which means
+       best quality and largest file-size.
+
+    -d <path/to/output/directory>
+       Write jpeg file to this specified directory. Will
+       create it if needed. Default is to write jpeg in the
+       same directory of fits image file
+
     -r <min>:<max>
        Clip output image to min-max range. Eg:
          0:100          Use only values in the range 0-100
@@ -102,22 +117,18 @@ named `INSTALL.txt'.
            :10          Clip everything above 10
          10:            Clip everything below 10
 
-    -n
-       Negate the image.
-
-    -q <value>
-       jpeg quality factor. Defines the jpeg encoding quality
-       Valid range: 0-100, default value: 100, which is for
-       best quality (and largest file size).
-
     -z <zoomfactor>
        Resize/Scale output image by <zoomfactor>. Eg:
          0.5            Shrink output to half of input
          2.0            Magnify output to double the size
+                        Allowed range: 0.01 to 4.0
+       NOTE: Zooming will be carried out after all other
+             operations, before writing out jpeg image
 
        fits2jpeg uses a bilinear interpolation based algorithm
        to scale the image. Allowed range: 0.01 to 4.0
        NOTE: Anything outside the allowed range will be clipped
+             to this range.
 
   Output will be written to <fits_file_root>.jpg. For eg.,
 
@@ -128,23 +139,33 @@ named `INSTALL.txt'.
   Wild card entries allowed in <fits_file>. For eg: *.fits, m31*.fits
   ngc???.fits etc.
 
-  More examples:
 
+3.1 Examples:
+-------------
   i. fits2jpeg -s log sirius.fits
+
      will write out sirius.jpg, flux/intensity in log scale
 
  ii. fits2jpeg -s sqroot *.fits
-     Converts all fits files in the directory to jpegs, with
-     square-root scaling of flux/intensity - Good for very
-     high dynamic range images
+
+     Converts all fits files in the directory to jpegs, with square-root scaling
+     of flux/intensity - Good for very high dynamic range images
 
 iii. fits2jpeg -n ngc4151.fits
+
      Converts ngc4151.fits to ngc4151.jpg, negative image.
 
-iv.  fits2jpeg -s square -n -r 10:2000 m31.fits
-     Write out m31.jpg, after square scaling of flux/intensity,
-     negate image and clip pixel values in the range 10 to 2000
-     units.
+ iv. fits2jpeg -s square -n -r 10:2000 m31.fits
+
+     Write out m31.jpg, after square scaling of flux/intensity, negate image and
+     clip pixel values in the range 10 to 2000 units.
+
+  v. fits2jpeg -s equalize -r 200: -d/path/to/mydir NGS253*.fits
+
+     Reads all fits files in the present directory that matches the filename
+     patterm, performs a histogram equalization, drops pixel values below 200
+     and write out all the corresponding jpeg files to directory /path/to/mydir
+     Will create the destination directory tree if it does not exist.
 
 
 3.1. Sequence of operations
@@ -158,6 +179,7 @@ Here is the sequence of operations, after reading the fits file:
      v. Image zoom - magnify or shrink the image
     vi. Write out jpeg file
 
+
 3. DOCUMENTATION
 ----------------
 An extensive coverage of how this program works along with line by line account