Delivery: baches1-.tar.gz Author: Carlos Guirao Release: $Id$ Content: -------- baches_calib.prg # BACHES calibration baches_pipeline.prg # BACHES pipeline compute_fits.prg # Pre-computation of fits files. Default:none file_ext.prg # Check file extensions clean.prg # Cleaning procedure th_ref.fit # Thorium lamp used as reference th_ref_ident.fit # Identifier of a couple of thorium lines thar.fit # Catalog of thorium-argon lines demo_ff.fit # Spectrum of flat field (halogen) lamp demo_thorium.fit # Spectrum of thorium-argon calibration lamp demo_zeta-tau.fit # Spectrum of star Zeta-Tau Installation: ------------- Move or copy the content of this baches-.tar.gz file to directory with BACHES data you want to reduce. Start MIDAS ---------- % inmidas Midas 000> NOTE: The MIDAS package ECHELLE used here assumes raw data is delivered with orders displayed from left to right, and with increasing order number from top to buttom (red up, blue down); within an order the wavelength increases from left to right (from blue to red). The orientation of raw files can be changed by editing the script "compute_fits.prg" (see examples with FLIP/IMA commands) Calibration: ----------- Execute the MIDAS script "baches_calib.prg" with two arguments: .fit Spectrum of a continuum lamp used to identified the orders. You may need to combine several flats with differnt filters in order to cover all the orders. The spectrum of a direct halogen lamp is enough to cover 23 orders. The spectrum of a halogen lamp with a blue filter (bg23) is enough to cover upto 26 orders. To cover more orders (28-30) you will need a composite of flats with different filters and from UV lamps. .fit Spectrum of a thorium-argon lamp. Examples with demo data files: Example 1: Midas 001> @@ baches_calib.prg demo_ff.fit demo_thorium.fit Example 2: To identify only the first 24 orders Midas 001> @@ baches_calib.prg demo_ff.fit demo_thorium.fit ? 24 The procedure will first display the flat field image and identify the orders (green lines). If the identification or orders stops with the prompt: ************************************************** * Now you can: * * 1 - Go on * * 2 - Stop here * ************************************************** * Enter your choice : is because there was an error with the identification. Enter '2' to stop the procedure and repeat it with less orders as in "Example 2" above, or review the composition of your flat image to be as smooth as possible between orders. The identification of orders gets completed with the prompt: baches_calib: do you want to continue [yn] (y)? If the identification is ok for you, enter 'y' and the procedure will continue with the line identification of the thorium lamp spectrum. It will displayed an old thorium spectrum as a reference (th_ref.fit) and mark the lines to be identified. In a second display the new thorium spectrum will be displayed and the cursor will show a square that should be reduced (use arrows to increase/decrease the square) to the size of a thorium line. Using the reference display as a guide, try to center the square in the same lines and select them with a click of the mouse left botton in the following order: 1st click: top left line 2nd click: top rigth line 3rd click: buttom left line 4th click: buttom right line Finish the sequence by clicking the mouse right botton. The procedure will ask you to enter the order number: Enter absolute order number of first pointed line (square mark) : 32 Sequence no. 0001, Order no. 0032. Enter wavelength : 6834.924 Sequence no. 0002, Order no. 0048. Enter wavelength : 4579.390 And the calibration will start automatically. The calibration will run several rounds of line identification. Typically you can stop the calibration when 80% of total lines have been identified. You can continue the identification by hand if you type 'n' to the question: "Do you want to clean temporary files [yn] (y)", and continue with MIDAS command like: set/eche tol = 0.4 (set the tolerance to 0.4. Default 0.3) ident/eche (another round of identification) save/eche baches (save the solution if the number of lines identified is) (greater than the previous round) The calibration will leave two files: bachesORDE.fit bachesLINE.fit that are needed for the next step: the pipeline. Pipeline: --------- You can calibrate any spectra after calibration with the procedure "baches_pipeline.prg". Execute: Midas 001> @@ baches_pipeline.prg .fit Example with demo data files: Midas 001> @@ baches_pipeline.prg demo_zeta-tau.fit The procedure will produce two FITS files: _wr.fit Bi-dimensional file with each order per row. _wrm.fit Mono-dimensional file with all orders merged. To plot a result with MIDAS try: Midas 001> CREA/GRAP Midas 002> PLOT/AXES 6520,6620 0,6000 0 "Wavelength" "Relative Intensity" Midas 003> OVERPLOT/ROW _wrm.fit To measure the FWHM of a plotted line, try: Midas 001> CENTER/GAUSS gcursor (and type left and right of the given line) To create a postscript file from your graph, try: Midas 001> COPY/GRAPH postscript To clean the directory from the garbage left by MIDAS: Midas 001> @@ clean.prg Demo data: