fluxcalib: Apply flux calibration to images (obsolete)

Package: longslit

Usage

fluxcalib images fluxfile

Parameters

input
List of input images to be flux calibrated.
output
List of output flux calibrated images. The output images may be the same as the input images. The output image will be of type real regardless of the input pixel type.
fluxfile
Flux calibration file from onedspec.sensfunc.
fnu = no
Convert the flux calibration to flux per unit frequency (F-nu)?
exposure = "otime"
Exposure time keyword in image headers.

Description

The specified images are flux calibrated using a flux calibration image file derived from the onedspec package using standard stars. The flux calibration pixel values are in magnitudes and the pixel coordinates are in wavelength. The multiplicative calibration factor is given by the formula

factor = 10 ** (-0.4 * calibration) / exposure / dispersion.

Since the calibration data has units of (instrumental intensity) / (ergs/cm**2), the exposure time for the image must be in seconds and the pixel dispersion in wavelength/pixel to yield units of ergs/cm**2/sec/wavelength.

The calibration wavelengths are interpolated to the wavelengths of the image pixels and the correction applied to the pixel values. Note that the image pixel values are modified.

If flux per unit frequency is requested then the flux values are multiplied by

wavelength ** 2 / velocity of light (in Angstroms/sec)

to yield units of ergs/cm**2/Hz/sec/(wavelength/Angstrom). Note that normally the wavelength units should be Angstroms.

It is possible to flux calibrate images which are binned in logarithmic wavelength intervals. The point to note is that the units of the flux calibrated image will be the same. Therefore, rebinning to linear wavelength coordinates requires only interpolation and not flux conservation. When extracting standard stars from logarithmicaly bin spectra for determination of a flux calibration it is necessary to rebin the extracted one dimensional spectra to linear wavelength (required by onedspec) conserving flux so that the instrumental counts are preserved.

The image header keyword DISPAXIS must be present with a value of 1 for dispersion parallel to the lines (varying with the column coordinate) or 2 for dispersion parallel to the columns (varying with line coordinate). This parameter may be added using hedit. Note that if the image has been transposed (imtranspose) the dispersion axis should still refer to the original dispersion axis unless the physical world coordinate system is first reset (see wcsreset). This is done in order to allow images which have DISPAXIS defined prior to transposing to still work correctly without requiring this keyword to be changed.

Examples

Standard stars were observed and extracted to one dimensional spectra. The standard stars are then used to determine a flux calibration using the onedspec package. A set of dispersion and extinction corrected images is flux calibrated in-place with the command

cl> fluxcalib img* img* sens.0000

where "sens.0000" is the calibration file produced by the task onedspec.sensfunc.

To keep the uncalibrated image:

cl> fluxcalib n1ext.004 n1extf.004 sens.0000

3. If the DISPAXIS keyword is missing and the dispersion is running vertically (varying with the image lines):

cl> hedit *.imh dispaxis 2 add+

Revisions

FLUXCALIB V2.10
The output pixel type is now forced to be real.

See also

onedspec.standard onedspec.sensfunc