sinfoni2euro3d - convert a SINFONI reduced cube to Euro3D format
SYNOPSIS
sinfoni2euro3d [options] -if INPUT -of OUTPUT
DESCRIPTION
Convert an ESO pipeline reduced SINFONI datacube into Euro3D format.
Mandatory arguments are
-if
and
-of.
The output data file is trimmed by removing every spectra with all
not-a-number NaN values (typically the corners and edges of mosaiced
cubes) and using only the valid spectral range common to all slitlets.
This will effectively remove most of the Nan values at the blue and
red ends of the spectra, and results in smaller file size.
As SINFONI spaxels on the sky are rectangular and are mapped into two
pixels during the reductions, the resulting data cube from a single
object raw frame contains two indentical spectra. The option -bin_y
can be used to combine them into a single spaxel while conserving the
flux; however, if the pipeline has combined two or more on-source
frames (jittered observations), this option should never be used.
Conversion from counts to flux units is done based on BSCALE and BZERO
keywords, if they are present, according to the formula
FLUX = BZERO + BSCALE * COUNTS.
The conversion tool uses several header keywords to determine the
physical characteristics of the file. These include the keywords related
to the World Coordinate System (WCS) and several important detector
keywords: pixel scale (INS.OPTI1.NAME), filter (INS.FILT1.NAME) and position
angle (ESO.ADA.POSANG). Furthermore, several parameters describing
the ambient conditions during the observations are also read
(airmass, pressure, temperature, parallactic angle, humidity...)
and stored in the output file.
-if INPUT
Name of the data cube to be converted.
-of OUTPUT
The name of the output file.
-b, -bin_y
Save only unique spaxels. The pipeline reduced data cube for a single
input frame contains two identical spectra since a spaxel on the sky
is rectangular and is mapped onto two square spaxels in output
cube. This option can be used to revert the data back to rectangular
spaxels, thereby reducing the file size by 50 %.
NOTE:
It is not safe to use this option if two or more object (not sky)
frames were used to produce a jittered (mosaiced) cube!
-copyheaders
Copy non-standard cards from input fits file to output Euro3D file.
Currently this option may cause crash if the fits file contains
COMMENT, HISTORY or blank fields - this is a known bug in LCL. It
is recommended that you remove all COMMENT and HISTORY cards from
fits file before using this option.
-h, -help
Output a brief help message.
-n, -notrim
Disable trimming (i.e. removal of the spaxels, where all the pixels are
NaN)
-rotang ANGLE
Overrule the rotation angle stored in ADA.POSANG keyword in the fits
header. Angle is given in degrees.
Convert a single (uncombined) cube into Euro3D format. Even for an
uncombined cube using option -n would typically generate ~5 %
larger output file
>
sinfoni2euro3d
-if cube1068.fits -of cube1068.e3d -bin_y
Convert all cubes (cube001.fits, cube_K.fits...) in directory to Euro3D format using bash (GNU Bourne-Again SHell)
> for input in `ls cube*.fits`; do sinfoni2euro3d -if $input -of `echo $input | sed 's/.fits/.e3d/g'`; done
BUGS
Flux units cannot be saved since the LCL library does not support
CUNITS keyword specified in Euro3D format. Intensities are, however,
scaled by BSCALE keyword if it is present.
The data is trimmed using the common wavelength range of valid
data. SPEC_STA (field 5 in data spectrum header) is always 1.