MIDAS procedures and scripts

MIDAS Procedures and Scripts

for the FIASCO Spectrograph in alphabetical order - Version 1.1

by C. Guirao

PROCEDURES
DESCRIPTION & USAGE
aligning.prg

Aligns the spectrum of a 2dim image in rows by rotating it. It generates a set of rotated frames.

Usage: @@ aligning frame.fit
  @@ aligning frame.bdf
alignment.prg

Calculates the central row of the spectrum on a 2dim image at three (begin, middle ane end) positions in the x-axis. Usuful information to calculate the correct alignment of the spectrum along the rows.

Usage: @@ alignment frame.fit
  @@ alignment frame.bdf
allblackbodies.prg

Plots the blackbody spectra at different temperatures (3,4,5,6,7,8,9 at 10K) between 400nm-700nm and all normalized at same value. Labels for each curve are printed with left mouse button and fixed with the right mouse button.

Usage: @@ allblackbodies
averaging.prg

Calculates a median averaged BDF image out of a set of images FITS or BDF images. Median average removes cosmic rays.

Usage: @@ averaging dark*.fit master_dark
  @@ averaging dark*.bdf master_dark

 

blackbody.prg

Plots the blackbody curve at the input temperature in the given wavelength, and creates a table blackbody_.tbl with FLUX vs. WAVELENGTH

Usage: @@ blackbody T [wavelength-range]
compute_fits.prg

Converts FITS into BDF. At the same time it may fix some CCD problems like: -Wrong range values, e.g. Hale CCDs -Negative values above a limit, e.g. Wendelstein -Negative values above a limit, e.g. Wendelstein -Flip left with right to get Blue_to_Red, e.g. Ponchado -Rotate 90 to get spectrum in horizontal. Weldenstein -Hot column corrections, e.g. Hale CCD -Bad columns, e.g. Hale CCD. -Rotating images to align spectra in rows. Default: only convert FITS into BDF.

Usage: @@ compute_fits file.fit newfile
  @@ compute_fits file.fit
dark_subtraction.prg Subtracts dark_current to a BDF or FITS frame. If input is a FITS frame, bias is also subtracted. The procedure uses a table called master_dark.tbl that contains a list of master_dark files at different exposures. It calculates the best master_dark frame based in median average and scalates it to the same value of the input frame. The scaled dark frame is subtracted to input framet. The master_dark.tbl is created with the procedure master_dark.prg.
Usage: @@ dark_subtraction file.fit output.bdf
  @@ dark_subtraction file.bdf output.bdf
displaying.prg Opens a display window with the same size of the input frame. Sets LUT to heat.lut.
Usage: @@ displaying file.bdf
  @@ displaying file.fit
extracting.prg Extracts the spectrum from a 2dim BDF or FITS frame. If input frame is in FITS format, bias and dark current are also subtracted. It calculates the central row for the spectrum and with FWHM above and below that row, extracts the spectrum and generates a 1dimensions output BDF frame.
Usage: @@ extracting file.fit output.bdf
  @@ extracting file.bdf output.bdf
identifying.prg My attempt to develop an automatic tool to identify absorption lines in Sun solar spectra by comparing them with table solar.tbl, a table of the strongest lines and the identified ions.
file_ext.prg Cannot be used interactively. Used only from other procedures to separate basename from ex,. e.g. filename dark.fit is separated in basename=dark and ext=.fit.
Usage: @@ file_ext filename.ext
flux_calib.prg Generates a BDF function master_flux.bdf as the result of dividing the computed spectra of a spectrophotometric star with an observed one. Catalogs of spectrophotometric stars are obtained from Jeremy Walsh's web page at http://www.eso.org/observing/standards/spectra. The fitting between computed and observed spectrum is done manually.
Usage: @@ flux_calib star.fit star.tbl
  @@ flux_calib star.bdf star.tbl
ills.dat A very long long ASCII table with absorption lines and their identified ions in the 4500-7000 range.
ills.fmt

Format file to create ills.dat into MIDAS ills.tbl with: CREATE/TABL ills 2 100 ills.dat ills.fmt

master_dark.prg Creates a catalog of master dark images at different exposures. It also creates a table with the mean average value for each master dark. The output from this procedure (master_dark.cat and master_dark.tbl) are used late by dark_subtraction.prg to calculate the best master dark current appropriate to each spectrum.
Usage: @@ master_dark master_dark*.bdf
master_flat.prg Creates a master flat image master_flat.bdf by averaging a set of flat images FITS or BDF and normalizing the result to 1.
Usage: @@ master_flat flats*.fit
  @@ master_flat flats*.bdf
master_trans.prg It creates a function representing the low frequency modulation of the system. It uses dome flat images, average them, remove pixel to pixel variations and extract the central row. NOT BEING USED IN PIPELINE
Usage: @@ master_trans dome_flats*.fit
pre_pipeline This script checks all the calibration data and files that should be ready for running a successful pipeline. The script also informs the operator about the procedures required to create the missing data.
pipeline Script to run the pipeline in an automatic way. The script waits in the current directory for new FITS files generated by the data acquisition system (normally the software of the CCD camera). For each FITS file, the script launches the MIDAS pipeline. The only requirement to run the pipeline is to have all the calibration data ready, which is checked by executing the pre_pipeline script.
pipeline.prg It extracts and calibrates the spectrum of a target from a raw 2dim image. The script requires to have ready all master calibration images: master_bias.bdf for bias subtraction, master_dark*.bdf for dark current subtraction, master_flat.bdf for flat field division, session.tbl for wavelength calibration, master_flux.bdf for relative flux calibration (please, use the shell script prep_pipeline to check that all the master calibration files are ready). It generates a FITS file and a postscript file with the fully calibrated spectrum.
Usage: @@ pipeline frame.fit
  @@ pipeline frame.bdf
search.prg Searches the row central of the spectrum in a 2dim image FITS or BDF.
Usage: @@ search frame.fit
  @@ search frame.bdf
solar.dat My own table with the strongest absorption lines and their ions in the Solar spectrum from 4500-7000. Used by procedure identifying.prg requires to be converted into the MIDAS table solar.tbl with the command solar.prg.
solar.fmt Format file used by solar.prg to convert solar.dat into MIDAS table solar.tbl.
solar.prg Procedure to convert solar.dat into solar.tbl.
solar_corona_plot.prg Just a set of plot commands to document a spectrum like the solar corona obtained at the eclipse 11 August 1999.
synthesizing.sh Creates a synthetic solar spectrum using the SPECTRUM and SMOOTH programs from Richard O. Gray. This script is used by the MIDAS procedure synthesizing.prg.
Usage: $cmd input output begin_wavelength \ end_wavelength output_resolution step
synthesizing.prg Plots the synthetic spectrum created with synthesizing.sh using MIDAS. It uses the script synthesizing.sh to execute the command spectrum and smooth (these two command obtained from the installation of the SPECTRUM package).
Usage: @@ synthesizing sun.dat sun.bdf 5500,6500 1.5 0.8
wave_calib.prg Probably the most useful procedure ever written for FIASCO. Automatically identifies the emission lines of a calibration line and generates the wavelength calibration function. You may need to play a little bit with the input parameters, in particular is very important you give the wavelength range. By looking to the results and repeating the procedure you will end with an acceptable calibration function. It accepts frames in FITS or BDF formats.
Usage: @@ wave_calib hear.fit hear.tbl 5500,6500 8
threeblackbodies.prg Plots the blackbody spectra of blackbodies at 4700K (Arcturus), 5780 (Sun) and 7000K (Procyon) in the wavelength range from 300nm to 900nm
Usage: @@ threeblackbodies