cpol

 CPOL N1 N2 N3 N4 N5 -- Combines polarsisation spectra

 Parameters: 
     
  N1    -- Start slot of left-hand polarisation components
  N2    -- End slot of left-hand polarisation components
  N3    -- Start slot of right-hand polarisation components
  N4    -- End slot of right-hand polarisation components
  N5    -- First slot for results 
  ANGLE -- name of header parameter with waveplate angle
  TYPE  -- data type of waveplate angle ('D' or 'R')
  DELTA -- maximum time difference between two exposures to b e combined into
           a V spectrum (units of days)

 CPOL handles the following task: in a circular spectropolarimetry run,
 one will have two spectra per frame, which I call the left and right
 components. During the run the waveplate will switch by 90 degrees, e.g.
 -45 ---> +45 ---> +45 ---> -45 ---> -45 ---> +45. Note that it is not
 always switching to save overheads for example. Each separate pair of
 -45/+45 exposures can be used to derive a measure of the polarisation.
 CPOL handles this combination for you assuming you have two blocks for
 the left and right components in CORRECT TIME ORDER. This is convenient
 because one typically reduces all left-component spectra in one go and
 then the right-components. The routine only combines independent spectra.
 e.g. in a run of -45,+45,-45,+45 the first two and the last two spectra
 will be combined, but not the middle two. From every 4 input spectra, two
 left, two right-side components, 3 spectra will be produced which will
 be Stokes I, Stokes V and the percentage polarisation. 

 NB The times 'RJD' are set correctly by this routine BUT ANY OTHER
 TIME RELATED QUANTITIES SHOULD BE RE_COMPUTED, e.g HJD, phase.

 This routine is fussy. If anything goes wrong -- incompatible spectrum
 lengths, empty slots etc -- it simply throws in the towel.

This command belongs to the classes: polarisation , arithematic


Tom Marsh, Warwick