I S C R U N C H / I S C R U N I
Applies the set of polynomial fits determind by IARC to
an image, re-binning each cross-section of the image to
either a linear or logarithmic wavelength scale. ISCRUNCH
uses the results from a single 2-D arc fit as performed by
IARC to get the channel/wavelength relation. ISCRUNI uses
two such fits, and performs a linear interpolation between
the two.
The routine can either conserve flux or the mean value
of the data. Conserving flux is appropriate where the data is
actually in flux units (photons/sec, for example), but not when
the data is in units of flux per unit wavelength (AB magnitudes,
Janskys, etc). Consider the case where each input bin maps to two
output bins; if the data is in flux units - photon counts, for
example - then flux should be conserved and the mean data level
should drop by a factor 2; if the data is in magnitudes, then
the rebinning should not change the mean level. The program
tries to determine for itself whether the data is in flux
or in flux per unit wavelength by looking at the units, but
uses a command keyword (DENSITY) to confirm its guess.
Command parameters -
IMAGE (Character) Image to be scrunched.
FILE (Character) File containing results of 2-D arc fit
as produced by IARC. If no extension supplied,
.IAR is assumed.
FILE2 (Character) ISCRUNI only. Second file containing
IARC results.
FRACTION (Numeric) ISCRUNI only. Controls the interpolation
between the two sets of wavelength information.
Value used=
(File value)+(File2 value - File value)*FRACTION
WSTART (Numeric) The wavelength of the CENTER of the first
bin of the resulting scrunched spectrum.
WEND (Numeric) The wavelength of the CENTER of the final
bin of the resulting scrunched spectrum. If WEND is
less than WSTART, then SCRUNCH assumes that it is the
increment rather than the final value that is being
specified. If the scrunch is logarithmic and WSTART
is greater than WEND, SCRUNCH assumes that the WEND
value represents a velocity in km/sec. These
assumptions can be controlled directly by the keywords
INCREMENT and FINAL, if they will not give the desired
effect.
BINS (Numeric) The number of bins for the resulting spectrum.
OUTPUT (Character) Name of resulting image. Note that an image
cannot be scrunched into itself, so a new output file
will always be created.
Command keywords -
LOG Bin into logarithmic wavelength bins.
DENSITY Treat input data as being in units of flux per unit
wavelength.
LINEAR Use linear interpolation when rebinning.
QUAD Use quadratic interpolation when rebinning.
INCREMENT WEND is an increment value, even though it is > WSTART.
FINAL WEND is a final value, even though it is < WSTART.
User variables - None
KS / CIT 22nd June 1984
FIGARO A general data reduction system