1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
Coloring utilities are intended for color processing.
-----------------------------------------------------
* coloring
coloring utility creates a color FITS file. At least two single-color
frames are stacked to an output file. The operation is practically
only simple copy of data and adding of the color flag. For example, the
color FITS can be created from two single-color exposures in two Landolt
filters.
* ctrafo
ctrafo transforms a color FITS to a different colorspace. The operation
recompute its data according a transformation matrix. Typical
usage is transformation of observation in astronomical filters
to computer graphics colorspaces.
Usage
-----
The utilities can be controlled by commands on standard input. There are
no command line parameters. This property gives flexible and portable
interface for various environments (cgi script, GUI,..).
Control commands has the form:
KEY = value
where KEY (uppercase) is a control key and value is supplemented
value. Values are of types: integer, real and string. The strings
must be enclosed in apostrophes (to be readable by Fortran input
edition in free format). Examples:
# key value
NBAND = 3 # integer
XXX = 3.0 # real, none used
COLORSPACE='XYZ' # character, apostrophes are mandatory
The parameters for stacked frames are placed at end of file (!)
immediately following of NBAND key. The color-bands must be arranged
from short to longer wave-lengths (as BVR are)! The value of NBAND
must corresponds to number of the records. Parameters gets form:
# 'filename' black weight
'/home/f/foto/colorCCD/m27_B.fits' 3700 0.6 # blue is first
'/home/f/foto/colorCCD/m27_V.fits' 8700 1
'/home/f/foto/colorCCD/m27_R.fits' 19700 1 # red is last
The first string determines the file to be used. Numbers at end of
every line sets black and weight of every band. Both must be determined
empirically. It is recommended for black to use level 1-sigma under
median for typical night sky images. The weight is proportional
to recorded flux, so choose weight by the reciprocal relative ratio
of exposure times.
There are tree types of the records:
1. for conversion to XYZ colorspace (example above)
2. for general manipulation:
# 'filename' extension
'/home/f/foto/colorCCD/m27_B.fits' 'B'
'/home/f/foto/colorCCD/m27_V.fits' 'V'
'/home/f/foto/colorCCD/m27_R.fits' 'R'
3. for transformation (black, weight has the same meaning)
# index black weight
1 3700 0.6
2 8700 1
3 19700 1
All FITS filenames can use of common FITS conventions,
so it is possible to select extensions, subframes etc.
The exclamation mark '!' indicates potentional file overwrite.
The characted # starts comments.
Examples of usage
-----------------
Usage:
* save the text between --- lines to a file (m27-in)
* apply by executing of the command:
$ coloring < m27-in
* that's all
Convert Landolt BVR to XYZ:
----------------------------------
OUTPUT='!x.fits'
INPUTSPACE='Landolt BVR'
COLORSPACE='XYZ'
NBAND = 3
'/home/f/foto/colorCCD/m27_B.fits' 3700 0.6
'/home/f/foto/colorCCD/m27_V.fits' 8700 1
'/home/f/foto/colorCCD/m27_R.fits' 19700 1
-------------------------------------------
Create a color FITS:
----------------------------------------
OUTPUT='!x.fits'
INPUTSPACE='Landolt BVR'
NBAND = 3
'/home/f/foto/colorCCD/m27_B.fits' 'B'
'/home/f/foto/colorCCD/m27_V.fits' 'V'
'/home/f/foto/colorCCD/m27_R.fits' 'R'
----------------------------------------
Convert a color FITS to XYZ:
-----------------------------------------
OUTPUT='!xt.fits'
INPUT='x.fits'
COLORSPACE='XYZ'
NBAND = 3
1 3700 0.6
2 8700 1
3 19700 1
----------------------------------------
All possible colorspaces can be listed by command:
$ echo 'INFO = colorspaces' | ctrafo
List of keys
See top of mcoloring.cpp and mctrafo.cpp.
List of colosrpaces
The known colorspaces are in ctable.dat (format is described
in mcoloring.cpp). The file is a text file so it is possible
to add any required transformations.
|