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:
% 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.
% 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).
POLPACK