NOTICE: ALL sky frames taken during the night of 25 Nov have incorrect DPR.TYPE keyword due to a bug in the new templates installed at the telescope. In later nights this bug in the templates was fixed. Since the pipeline uses DPR.TYPE to recognize the object/sky frames, you must manually change it to correct value (SKY) for each sky frame. Alternatively, you can subtract the sky manually (ccube "object.fits sky.fits -" result.fits) and run si_step_stack on the result.

The pipeline requires SKY_NODDING / OBJECT_NODDING labels in input frame lists even though it appears not to actually use them...

Reduction in nutshell

  • At the very least you should reduce for each day
    • Darks if you use them. Unless you are using OH lines in stacking phase to track the instrumental flexure, you do not need darks
    • Wavelength calibration
    • Flat fields
    • Telluric standards
    • Science frames
  • If you do reduce nothing else than these and use calibration database solutions for the rest of the input frames, you are already reasonably close to the optimal quality. In many (most) cases this is good enough

Basic usage of the recipes

  • The recipes can be invoked with:
    esorex <esorex parameters> recipe_name <recipe parameters>
  • All recipes display a short help message when invoked with:
    esorex --help si_rec_stdstar
  • if you need to overwrite the default band-dependant parameters used by the SINFONI pipeline, generate configuration file for the recipe:
    esorex --create-config si_rec_stdstar.
    After this edit si_rec_stdstar.rc in .esorex directory under your home directory and run the recipe with
    esorex si_rec_stdstar --gen-overpar=no example.list
    Alternatively, you can simply run the task with e.g.
    esorex si_rec_stdstar --objnod-jit-ind=FALSE example_sof
  • Generally a recipe will generate several output files, all named out_*.fits. If you are unable to tell what each file is, check the PRO.CATG keyword stored in the fits headers e.g.
    dfits out*.fits | fitsort PRO.CATG
  • It's also possible change the current naming scheme. Change esorex.caller.suppress-prefix=TRUE in .esorex/esorex.rc, and the resulting files are not renamed to out_*.fits; instead you will end up with output filenames specified in rc files (e.g. wavemap_ima.fits)

si_step_* vs. si_rec_*

  • Various si_rec_* recipes run the individual steps in cascade - therefore they include all the parameters of the steps
  • Other si_rec_* recipes should be fine, but you should not runsi_rec_objnod since it doesn't subtract the sky frames correctly. See below for details what you should do instead!

Input frames

  • Slitlet Positions are the positions of the left and right edges of each of 32 slitlets on the array. The are given relative to the left edge of the array (0 column). Reference solutions obtainable from the calibration database should be accurate enough for typical science projects.
  • Slitlet Distances are the distances from the left edge of a slitlet to the left edge of the next slitlet. There are always 31 data points in slitlet distance file - together with the first column position they describe the positions of the slitlets. Slitlet distances are derived from North-South Test frames; typically you can use the files from calibration database since no significant evolution is expected
  • First column position a single number describing the position of the left edge of the first slitlet on the array. Currently the first column position should be set to 0.0 in distortion correction, and calibration database contains a FIRST_COL file with this number.

Data reduction sequence

  • Basic data reduction follows the schematic graph included in the pipeline cookbook. Print it out on A3 size paper with a color printer!
  • Bad pixel maps
    • Generating good bad pixel mask is not trivial, and some of the bp maps in the calibration data base are known to be bad. The problem with them is that the slitlet edges are marked as bad. For the reduction of your science frames this matters little, but north-south test and wavelength calibration should not be done with these bad bad pixel maps
    • If a bad pixel map has vertical stripes placed at almost constant intervals, it is bad. Many or even most of the bp maps generated for the 25-mas pixel scale are bad while bp maps at larger pixel scales are much better
  • Flat fields are produced by si_rec_mflat. The recipe also produces bad pixel maps by default. Since this will take a long time, especially on slow computers with little memory, you may want to set sinfoni.lamp_flats.bad_ind=FALSE
  • North-South test is used to calculate slitlet distances and distortion correction. Typically both of these should be fairly constant, so you can use the files from the Calibration DataBase. At the moment this is also the only option - si_rec_find_distortion fails on all bands (a known bug).
  • Wavelength calibration is done in recipe si_rec_wavecal. Only good bad pixel maps should be used in wavecal. Instead of a bad bp map you might try to use no bp map or a bp map for different pixel scale.
  • As mentioned above, science observations should not be reduced with si_rec_objnod. Instead, you should run steps si_step_stack + si_step_objnod, or si_step_stack + si_step_cubecreate (example input frame lists for stack and objnod).
    • you should not use the default parameters in si_step_stack - there is a bug with indicating the bad pixels (every single bad pixel is shown as 4x4 px region). Instead generate a configuration file for the recipe and make sure sinfoni.stacked.ind_index=FALSE in it.
    • si_step_stack suffers from the incorrect DRP.TYPE keyword and fails to recognize the sky frames correctly. You must manually change it for all sky frames taken during Nov 25th (see the comment on top of the page)
    • If you have only one stacked frame, you can use si_step_cubecreate to create a cube out of it.
    • si_step_objnod can be used to either create separate cubes (one for each stacked input frame) or combine the stacked frames into one result cube.
    • When combining several stacked frames, si_step_objnod calculates the relative offsets between jittered frames by using cross-correlation. However, it seems that the crosscorrelation may be broken at the moment; si_step_objnod simply averages the cubes together instead of applying the jittering offsets. If the crosscorrelation doesn't work, you should overwrite the default parameters and use sinfoni.objnod.jitter_index=FALSE.
    • If you are unable to combine your cubes with si_step_objnod, recipes Juha or Markus can help you
    • None of the pipeline recipes update the fits headers with respect to CDELT3, CRPIX3 or CRVAL3 keywords. These you will have to change to the correct values manually. During the execution of the recipes, the correct values are shown (below blue text are comments, the rest is produced by pipeline):
      [ INFO ] si_step_objnod: Resampling
      [ INFO ] si_step_objnod: dispersion 0.000245This is CDELT3
      [ INFO ] si_step_objnod: minimal lambda 1.933217
      [ INFO ] si_step_objnod: maximal lambda 2.476299
      [ INFO ] si_step_objnod: central lambda 2.200000CRVAL3
      [ INFO ] si_step_objnod: central pixel 1280CRPIX3
      [ INFO ] si_step_objnod: Read distances
    • More often than in longslit spectroscopy, sky residuals (OH lines and thermal background) will be present in your SINFONI cubes. If they are unacceptably strong, contact Juha or Markus for help. Pipeline currently doesn't offer a recipe for the removal of the residual sky emission
  • Standard stars are reduced by recipe si_rec_stdstar. One of the output products is a 1D spectra of the star
    • Before you can apply this to your science frames to remove telluric features, you need to remove the stellar emission lines from it. This can be done with stellar templates (see ISAAC webpages) or in the case of hotter stars, by fitting and removing the absorption lines. This step is analogous to longslit spectroscopy.
    • You should check whether there is some flexure between science cubes and standard spectra
    • You can divide the cubes by spectrum in IRAF or eclipse

Help! The recipe doesn't work!

  • Check all the input files exist and paths to them are correct.
  • Check all the tags for input files are correct
  • Try using the default parameters

Exploring the cubes

  • QFitsView written by Thomas Ott is a simple-to-use tool for displaying the cubes.
  • There is nothing exotic in the final data format - it's completely standard 3D fits cube. Any software which can handle 3D fits files (e.g. IRAF) can be used to analyze the data

Reporting bugs

  • The SINFONI pipeline is still in fairly early development stage - after all, it's only 0.5 version, and is likely to contain other bugs in addition to the known bugs. Andrea Modigliani is maintaining the pipeline: please report any unintentional features you notice to him (cc Markus Kissler-Patig & Juha Reunanen). Do not trust somebody else is going to report it! Currently the priority is in fixing the critical bugs (show stoppers), but minor comments are very wellcome even though implementing them will have to wait for now.