for the FIASCO spectrograph - Version 1.1 by C. Guirao |
Calibration data is all the data necessary to support the process that extracts and calibrates the spectrum from the original CCD image taken by the instrument.
Instruments like the FIASCO spectrograph generates images in 2-dimensions in the standard FITS format. These original images from the instrument are commonly called raw data as they contain the spectrum of a target but distorted by the signature of the instrument.). Raw images are processed with the help of the calibration data in a sequence called the pipeline. The result of this process is a 1-dimensional image representing the spectrum of the target calibrated both in wavelength and relative flux. These images, products of the pipeline, are also called reduced images as they are much smaller than the original raw images.
The pipeline process that does not requires interactive assistance from an the operator is called an automatic pipeline.
Generating calibration data for the FIASCO pipeline, using a set of
MIDAS procedures described here, is the main purpose of this document.
2.- Name conventions
The following conventions are adopted along this document:
3.- Calibration data
The term calibration data is used here to represent the following information:
Other calibration data have to be taken before the observation session starts. This applies to calibration data that may change from one session to another, e.g. exposures with spectra from calibration lamps if the wavelength range changes, flat-fields images, or exposures from standard calibration stars needed for the calibration in flux.
The FIASCO pipeline expects the calibration data to be located in a predefined set of filenames. The calibration procedures generate, by default, these filenames:
4.- CCD correction
Most CCD cameras generate 2-dimensional FITS images that in most cases require some image process treatment before they can be processed with other FIASCO procedures.
In particular the FIASCO pipeline expects instrument raw images to contain spectral data aligned in horizontal rows. If it happens that the CCD camera generates data in vertical columns then they have to be rotated before entering the pipeline. Another assumption is that raw images are expected to have recorded spectra with shorter wavelength values (bluer) at the left side of the raw image and longer values (redder) to the right, the contrary require that the images have to flipped (left to right and right to left) before been further processed.
Other issues to be corrected in the raw images before continuing with the pipeline are:
Copy it from the original location in $HOME/midwork to the current directory where you are generating the calibration data.
% cp $HOME/midwork/compute_fits.prgEdit it to reflect the corrections required for a given CCD camera (the file itself describes use of command and examples to apply the above corrections).
% vi compute_fits.prg (or any other editor)Syntax:
Midas> @@ compute_fits input [output]Examples:input: name of the FITS file to be corrected. If the extension is not given the extension .fit is assumed.
output: name of the file generated after correction. If not given the input name will be used with extension .bdf.
Midas> @@ compute_fits vega.fit vega.bdfMidas> @@ compute_fits vega.fit
Both commands generates a corrected vega.bdf output file.
5.- Master Bias
A bias frame is a frame taken with exposure time 0 and in absence of any signal (in darkness). A master bias frame is the result of averaging a set of bias frames (10 or more).
The master bias frame used by the pipeline is called master_bias.bdf and is created with the procedure averaging.prg . The master bias frame is the result of averaging all bias frames using a MEDIAN mode (cosmic rays are therefore filtered out).
Syntax:
Midas> @@ averagingExamples:frames master_frame frames: Comma ',' separated list of BDF or FITS frames to be averaged. UNIX wild characters like ? and * can be used to specify a list.
master_frame: Output frame created by MEDIAN averaging the input list. Extension .bdf is added if not specified.
Midas> @@ averaging bias*.fit master_bias.bdfPreconditions:Creates an averaged frame called master_bias.bdf by averaging all bias*.fit files existing in your current directory
Midas> @@ averaging bias0.fit,bias1.fit,bias2.fit master_bias
Creates a master_bias.bdf frame by averaging files bias0.fit bias1.fit and bias2.fit
The file computer_fits.prg is required in your current directory in order to run this procedure.
6.- Master Dark Currents
Dark current are frames with a given exposure and in absence of any signal (in darkness). Several dark current frames with different exposures are required for the data processing of raw frames. The exposure times should be similar to real exposures used with raw frames. E.g. for exposures up to 20 minutes we may need dark current frames at 5, 10, 15 and 20 minutes.
Better that one single dark current is a master dark current: the result frame from median averaging of a set of dark currents of the same exposure. Typically 5 frames are used to generate a master dark current.
The procedure to generate master dark current is the same as for a master bias: averaging.prg.
Examples:
Midas> @@ averaging dark5_*.fit master_dark5.bdfThe pipeline only knows the list of master dark currents available for processing through a catalog file called master_dark.cat and a table of average values called master_dark.tbl. The catalog and table are used during the pipeline process to calculate and scale the closest master dark current frame to target values.Midas> @@ averaging dark10_*.fit master_dark10.bdf
These commands generate master dark current frames for exposure times of 5 and 10 minutes by averaging all the exiting dark currents with names starting with dark5_ and dark10_ and extension .fit.
The catalog and table are generated with the procedure master_dark.prg
Syntax:
Midas> @@ master_dark frames [area]Preconditions:frames: comma ',' separated list of BDF frames representing the master dark current frames. UNIX wild characters like ? and * can be used to specify a list.
area: coordinates of an area for the calculus of the average values. Format is x1,x2,y1,y2. Default: 10,10,XSIZE-10,110
The file computer_fits.prg is required in your current directory in order to run this procedure.
7.- Master Flat-Field
Flat-field frames are short exposures taken with the fiber (fiber flat-fields) or taken with the telescope and the fiber (dome flat-fields) using as source of light an halogen lamp.
Better that one single flat-field is a master flat-field: the result frame of a median average of a set of flat-field. Typically 10 frames are used to generate a master flat-field.
The procedure to generate master dark current is master_flat.prg. It does the same as averaging.prg but the resulted averaged frame is then normalized to 1 by dividing it by its average shape.
Usage:
Midas> @@ master_flat frames [output]Example:frames: comma ',' separated list of FITS or BDF frames representing the flat-field frames. UNIX wild characters like ? and * can be used to specify a list.
output: name of the BDF averaged and normalized master flat-field. If not specified the filename master_flat.bdf is used
Midas> @@ master_flat ff*.fitPreconditions:
The file computer_fits.prg is required in your current directory in order to run this procedure.
8.- Wavelength Calibration Function
A wavelength calibration function is used by the pipeline to convert pixel positions along the light dispersion into wavelength values.
This function, is represented by three files: coerbr.tbl, session.tbl and sessionCOE.tbl which are generated with the procedure wave_calib.prg. This procedure requires, as input, the spectrum from a known calibration lamp (neon, helium-argon, mercury, etc...). For this process to work correctly we have to provide an approximation or estimated wavelength range of the recorded spectrum (e.g. by visual comparison with plots provided by the manufacturer of the lamp).
Another input required by this procedure is a MIDAS table with the identified emission lines of the given calibration lamp. Tables for most known calibration lamps can be obtained from the directory /midas/calib/spec/line a package distributed with MIDAS as calib.tar.Z. Copy the table of your calibration lamp to your working directory (e.g. hear.tbl for the Helium-Neon calibration lamp).
% cp /midas/calib/data/spec/line/hear.tbl hear.tblThe wavelength calibration function is generated by executing wave_calib.prg
Syntax:
Midas> @@ wave_calib frame lamp.tbl wavelength_range [threshold] [search_width_window] [toleranceExample:] frame: The FITS or BDF raw frame containing the spectrum of a calibration lamp.
lamp.tbl: MIDAS table containing the emission lines of the calibration lamp being used to calibrate the spectrum.
wavelength_range: an approximate (10% accuracy) wavelength range of the recorded spectrum.
threshold: is the value of signal above noise to be consider an emission line. Default values for this parameter is 500 but it may need adjustment depending on the signal values of your spectrum.
search_width_window: is the width in pixels for emission lines to be considered as such (default 5).
tolerance: is the maximum deviation of the foreseen line and the detected value (default 0.5)
Once you know with precision the wavelength_range and the threshold play with different search_width_window and tolerance until you get a maximum number of lines detected with the minimum RMS value (both values printed at the end of each wave_calib.prg iteration).
Midas> @@ wave_calib hear01.fit hear.tbl 5000,6000 1000 4 0.1Preconditions:Wavelength calibration for a Helium-Argon spectrum recorded in hear01.fit and compared to the official emission lines defined in hear.tbl, in the wavelength range from 5000 to 6000 Angstroms, considering a threshold of 1000 counts above noise to be considered as an emission line, expecting emission lines to have a minimum width of 4 pixels and a search within a tolerance of maximum 0.1%.
The file computer_fits.prg is required in your current directory in order to run this procedure.
9.- Flux Calibration Function
The one described here is a relative flux calibration (unitless). The flux calibration function is meant to correct flux variations introduced by optical components in the light path (telescope, fiber, spectrograph and CCD), also known as the transmission of all the optical components. The transmission is calculated by comparing the spectrum of a known source, e.g. a star which flux as a function of the wavelength has been already calculated, with the spectrum obtained with the instrument.
A spectrophotometric standard star is a star which absolute flux has been previously measured and it is well known in the form of published tables. From this tables we can generated an artificial spectrum that can be compared with the same spectrum obtained with the instrument of the same star. Catalogs of calibration bright stars and their ASCII tables can be obtained from Jeremy R. Walsh in his web page http://www.eso.org/sci/observing/tools/standards/spectra (also from ftp://ftp.eso.org/pub/stecf/standards/). Please follow instructions in the README file regarding how to convert ASCII tables in MIDAS tables used here by this flux calibration procedure.
A transmission is calculated by dividing the spectrum taken of a calibration star with the calculated spectra of the same star. In our flux calibration procedure this function is recognized by the existing of a file called master_flux.bdf. When this transmission function is applied to our spectrum it gets adjusted to its relative real one. The procedure to generate the transmission function master_flux.bdf is called flux_calib.prg. It uses internally the procedure pipeline.prg that stops when it realizes that master_flux.bdf does not exist. Just type enter to continue, the procedure flux_calib.prg continues generating the artificial spectrum from the input table. By dividing the spectrum of the calibration star with its artificial spectrum, the procedure generates the transmission function master_flux.bdf.
Syntax:
Midas> @@ flux_calib frame spectrophotometric.tblExample:frame: The FITS or BDF raw frame containing the spectrum of an observed spectrophotometric star..
spectrophotometric.tbl: MIDAS table containing the flux vs wavelength of a spectrophotometric star.
Midas> @@ flux_calib vega.fit hr7001.tblPreconditions:
The file computer_fits.prg is required in your current directory in order to run this procedure.10.- Documentation:
INSTALLATION.html | Installation procedure | |
PROCEDURES.html | Describes MIDAS procedures | |
CALIBRATION.html | This file | |
PIPELINE.html | Running the pipeline |