Download PACS Data Reduction Guide

Transcript
In the Beginning is the Pipeline. Spectroscopy
num=len(Listcube.refs) # how many cubes are there?
for i in range(num):
mycube=Listcube.refs[i].product # extract the cube from the list
waveGrid = wavelengthGrid(mycube, calTree=mycaltree, oversample=2,
upsample=3)
mycube = activateMasks(mycube, String1d(["GLITCH","UNCLEANCHOP",
"SATURATION","GRATMOVE", "BADFITPIX"]), exclusive=True)
mycube = specFlagOutliers(mycube, waveGrid, nIter=2, nSigma=5)
mycube = activateMasks(mycube, String1d(["GLITCH","UNCLEANCHOP",
"SATURATION","GRATMOVE", "BADFITPIX", "OUTLIERS"]), exclusive=True)
rebinnedCube = specWaveRebin(mycube, waveGrid)
Listrcubes.refs.add(ProductRef(rebinnedCube))
projectedCube = specProject(Listrcubes)
We are iterating over all the cubes held in the ListcubesA, extracting out the cubes, running the pipeline
tasks on them, and then putting the final cube into a new ListContext, in the same order that you
originally sliced on. This last step is not necessary but in this way, at least, you can track the relationship
between the final cubes and the originally slices frames.
If your Listcubes is a combination of nod A and B (cubeA and cubeB from above) then rather than
doing this part of the pipeline in a for loop, just do it first for Listcubes.refs[0].product (nod A) and
then Listcubes.refs[1].product (nod B), creating a projectedCubeA and projectedCubeB.
Now for a description of the tasks. In wavelengthGrid, oversample is by how much you want to
oversample the wavelength bins from what they are at present and upsample is by how much you
move forward along the original wavelength array as you calculate the new resampled wavelength
array. These are both optional parameters. The values given here are our recommendations, but you
are welcome to play around: it is likely that the way you should do the spectral resampling will depend
on the type of observation you have, so try various grids and compare the resulting spectra. Bins too
large with smooth the data, bins too small will make the spectra too "bitty". specWaveRebin resamples
the flux domain based on this wavelength grid. specFlagOutliers does a type of sigma-clipping, and
by activating the masks before running it you are telling it not to mask these data points which have
already been masked. The parameters we specify are our recommendations, and they are optional
(there are good default values hardwired into the task). nIter is the number of iterations and nSigma
the sigma value to flag at. Again, feel free to play around with the values yourself, or even write you
own clipping task. specProject is a task that projects the cube onto an irregular grid and also reduced the
size of the spaxels (but increases their number). You see, the PACS integral field unit is not completely
evenly spaced out. Although when you look at images of the cubes (as we explain below) you will
see a 5x5 square of spaxels, in fact they are a bit higgledy-piggledy. specProject corrects for this. This
task also combines the multiple pointings, which is why were here are sending it as input not a single
rebinnedCube (which is possible) but the ListContext Listrcubes.
So the end of the pipeline will be 2 projectedCubes, one for nod A and one for nod B. As we said
before, this is a temporary solution to overcome an issue we still have with the calibration of PACS
spectroscopy. You can compare the spectra from the same spaxels for the two cubes and see if they
look the same (the CubeAnalysisToolBox allows you to do this). If you have gotten to this stage in
your data reduction then you need to contact the Herschel Help Desk to ask what to do next. Oh,
and....CONGRATULATIONS!
The mycube is a final Level 0.5 product, rebinnedCube is Level 1 and projectedCube is a Level 2
product. The mycube is a PacsCube class product, the rebinnedCube is a PacsRebinnedCube, and the
projectedCube is a SpectrumSimpleCube.
Spatial coordinates: at present (Nov. 2009) the calibration of the pointing for all the pixels/spaxels
of PACS is not 100% correct. This is being worked on, but at present consider the positions in the
cube to be of "browse" quality rather than full science quality. It can be off in absolute terms by a few
arcsec, less in relative terms within a cube.
Skewed lines: if your target is a point source (or close to one) and has spectral lines, then if it was
not placed in the centre of the a spaxel (normally 2,2) the lines may display a skew (google "skewed
40