next up previous 277
Next: Corrections for Instrumental Effects
Up: Data Reduction Using POLPACK
Previous: Data Reduction Using POLPACK


Format Conversion

The first step is to ensure that your data files are in a format which POLPACK can process. The native data format used by POLPACK is the Starlink NDF format (note, NDF structures are usually stored in files with a file type of .sdf). If your data is already in this format, then you can proceed immediately to the next step. Otherwise, you have two options:

  1. You can convert your data files into NDF format explicitly at the beginning, and use the NDF versions there-after. The CONVERT package provides facilities for converting to and from most common astronomical data formats. For instance, if your data is in the form of a set of FITS files, you could use commands similar to the following to convert them into NDFs:

    % convert
    % fits2ndf "*.fit" "*"
    

    Note that the % represents the C-shell prompt and should not be typed. The first command initialises the commands required to use the CONVERT package. The second command converts all FITS files with a file type of .fit within the current directory, into equivalent NDFs with the same file names, but a file type of .sdf4. The .sdf files can then be given as inputs to any application from POLPACK, CCDPACK or KAPPA.

  2. Alternatively, you can rely on the facilities of the NDF library to perform automatic on-the-fly data conversions as and when necessary. Using this technique, POLPACK, CCDPACK and KAPPA all appear to process your data files directly without you needing to do any explicit data conversion. All you need to do to enable these facilities is to initialise the CONVERT package using the single command:

    % convert
    

    If you adopt this approach, you may still see references to ``NDFs'' appearing on the screen. There is usually no significance in the use of the term ``NDF'' in this context (unless there are indications to the contrary), and you should understand these as referring to your own non-NDF data files.

For spectropolarimetry data, the spectral channel must vary along pixel axis 3, and pixel axes 1 and 2 must be spatial axes. The KAPPA application PERMAXES can be used to rearrange axes into the required order. If your data is one dimensional (i.e. has no spatial coverage) then you can use PERMAXES as follows to add two spatial axes each covering a single pixel:

% permaxes in="data-1d(,1,1)" out=data-3d perm="[2,3,1]"

where data-1d.sdf is the 1-dimensional input file, and data-3d.sdf is the 3-dimensional output file. The section specifier ``(,1,1)'' indicates that data-1d should be treated as if it had 2 extra trailing axes each spanning a single pixel. PERMAXES then rearranges the axes so that the spectral axis (previously axis 1) becomes the last axis (axis 3). Of course, since there is no spatial coverage, you will not be able to display such data using POLPLOT (use POLIMAGE and KAPPA LINPLOT instead).


next up previous 277
Next: Corrections for Instrumental Effects
Up: Data Reduction Using POLPACK
Previous: Data Reduction Using POLPACK

POLPACK
Starlink User Note 223
D.S. Berry & T.M. Gledhill
17th December 2012
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council