| pfos_pix2wav | stpoa.poa_fos | pfos_pix2wav |
pfos_pix2wav -- Calculate wavelengths from pixels for a table of POA-recalibrated Faint Object Spectrograph (FOS) spectra.
pfos_pix2wav input pixtab wavtab
The pfos_pix2wav task takes a table of x pixel positions (which refer to a particular FOS observation), optionally applies the POA sub-pixel correction for these pixel values and then calculates wavelengths using the POA-FOS dispersion solution from the CCS6 reference table. Pixel positions should naturally be in range with the data boundries (starting from pixel 1 to the maximum position for that dataset). The table of pixel positions is the input; these positions are adjusted by default using the POA sub-pixel correction; the output wavtab table is a copy of the input pixtab positions table with new sub-pixel-corrected pixel positions along with calculated wavelength positions.
Also required as input is the FOS dataset root name for this pixel positions table. pfos_pix2wav actually requires the entire FOS data set (root.d0h, root.shh, etc) to be present in the directory where one runs this task. This requirement is due to the fact that this task needs many FOS header keyword values to determine which wavelength scale is used to calculate the pixel to wavelength conversion. The input pixel table must have at least one column, from which the pixel positions will be read in; this table can have as many other columns as one likes, all the columns will be copied to the output wave table. The pixel position default column name is "PIXPOS", but can be changed using the pixcol parameter settings.
Please note that pfos_pix2wav requires that the FOS data be at least POA pre-processed. Running the re-processing adds header keywords to the FOS data and running the processing pipeline creates the output .poa file. We assume POA FOS pipeline processing has been performed on data for which one needs the POA sub-pixel correction applied using this tool. If the FOS data have not been POA processed, the tool will exit. For more information on the POA FOS pipeline, please see the help files for poa_preproc_fos and poa_calfos. An easy check to see if the data have already been POA pre-processed is to see if the root.d0h file has the "CYCCSFR" header keyword. A quick check can be made using the command "imheader root.d0h l+ | grep CYCCSFR", replacing "root" with the appropriate file rootname. If nothing is returned, then the data need to go through POA processing.
By default the sub-pixel offset correction will be applied using an average of the OFF_DIOD value(s) from the .poa file. The user can specify the spectrum number to use as the offset, instead of taking the default average of all the spectra's OFF_DIOD values. The "PIXPOS" input pixel positions are assumed to have come from data which have been POA corrected, and therefore have already had the integer value (OFF_PIX) of the POA offset applied. The sub-pixel correction is simply an addition to this correction, the "leftover" non-integer value of the offset. The user has the option to turn off this feature, by setting the parameter sub_pix=no. In either case, new pixel positions are calculated and placed into the wavelength output table under the column name "NEWPIX". If sub-pix=no then "NEWPIX" values are all equal to "PIXPOS" values.
An added benefit of this tool is that it will calculate wavelength results for FOS IMAGE mode data. The FOS calibration pipeline does not create a wavelength scale for IMAGE data, however, this tool will be able to calculate wavelength positions from pixel positions for all FOS data that fit the POA criteria, whether or not they are spectrum or image format The poa_calfos help file lists the POA FOS processing criteria.
If one needs information on how to create an STSDAS table from an ascii list of pixel positions, the ttools package will have all the necessary information. The task tcreate will create the table in the required format.
Also, please see the poa_preproc_fos, poa_calfos and processfos help files for more details on the POA FOS re-calibration processing steps.
1. Run the pfos_pix2wav task on already POA pre-processed sample data y0k4510dt; pixel postion table is called y0k4510dt_pix.tab; output is called y0k4510dt_wav.tab. The sub-pixel correction is applied by default, using all the OFF_DIOD values in the .poa file.
st> copy poa_spec$y0k4510dt* .
[ One must first run the POA pipeline on the raw data if that
has not not already been done. ]
st> processfos y0k4510dt y0k4510dt
st> pfos_pix2wav y0k4510dt y0k4510dt_pix.tab y0k4510dt_wav.tab
2. Run the same example, but turning off the sub-pixel correction for dataset y0k4510dt.
st> copy poa_spec$y0k4510dt* .
[ One must first run the POA pipeline on the raw data if that
has not not already been done. ]
st> processfos y0k4510dt y0k4510dt
st> pfos_pix2wav y0k4510dt y0k4510dt_pix.tab y0k4510dt_wav.tab \
sub_pix-
3. Run the same example, with the sub-pixel correction turned on, for dataset y0k4510dt, using a different name for the .poa file.
st> copy poa_spec$y0k4510dt* .
[ One must first run the POA pipeline on the raw data if that
has not not already been done. ]
st> processfos y0k4510dt y0k4510dt
st> copy y0k4510dt.poa out_y0k4510dt.poa
st> pfos_pix2wav y0k4510dt y0k4510dt_pix.tab y0k4510dt_wav.tab \
poafile=out_y0k4510dt
Please make sure the FOS data have been POA processed (have run through the poa_calfos pipeline) before the pixel to wavelength conversion task is run. As noted in the POA FOS pipeline task, one cannot run POA tasks on FOS data which do not fall within the POA processing criteria. Please see the poa_calfos help file for more details on the POA processing criteria.
References to the Post Operational Archive system for HST data can be found on:
"http://www.stecf.org/poa"
For assistance using this particular task, please contact ecf-poa@eso.org, or stdesk@eso.org (see http://www.stecf.org/poa).
For assistance using this or any other tasks, please contact help@stsci.edu or call the help desk at 410-338-1082.
poa_preproc_fos, poa_calfos, processfos, imheader, tcreate, tprint
Type "help poa_fos opt=sys" for a higher-level explanation of the poa_fos package and the process of re-calibrating a FOS data set.
Type "help poa_preproc_fos" for an explanation of the task which runs the FOS data pre-processor.
Type "help poa_calfos" for an explanation of the poa_calfos task for re-calibrating FOS data.