skymov


 SKYMOV  -- moves sky region files according to movement along slit.

 In time series work the basic regions are unlikely to change much except
 that the star may wander along the slit. skymov is designed to re-jig a
 file dumped by 'regpic' to account for such movement. It works by starting
 from a template set-up with regpic and looking at the change in position of
 a reference object. 

 Beyond the edges of the valid X range skymov takes whatever value (sky or 
 not) that the edge pixels have. Thus the edge pixels should be sky if you
 want more sky to be brought in following a large shift.

 If you there are particular bad pixels fixed in position then these are best applied
 using kappa's ardmask to mask them.

 Parameters:

  IMAGE   -- Data file which will define the modified sky regions.

  FLAT    -- Balance frame. 

  REGION  -- Name of input sky region file

  TRACE   -- TRUE if you will use a poly fit to define the spectrum position

  If TRACE

     TRACK  -- The poly fit file


 OUTSKY -- Name of modified region file (not same as INSKY)

 XSTART, XEND -- valid region of data in X.

 YSTART, YEND -- valid region of data in Y

 SLO, SHI -- the reference object will only be searched for between these
             limits (allows one to choose a fainter star if that is what
             is wanted).

 FWHM  -- The reference object is located and its position measured by
          cross-correlation with a gaussian of width FWHM

 XPOS  -- position of object used to determine REGION. This is best found
          by running skymov once on REGION, putting any old value for XPOS,
          then recording whatever value it returns.

 NPOLY -- The frame is collapsed and a poly fitted to the background. This
          fit can be used to reject bad pixels.

 THRLO, THRHI -- low, high sigma reject thresholds. You might set THRHI
          more tightly than THRLO because it is easy to get stars on the
          slit which would produce an excess. With time series data where
          you can be sure that stars will not appear on the slit, you should
          set these to be very wide.

 NMIN  -- Pixels only rejected if there is a group of NMIN or more next
          to each other. This is a safeguard against rejecting good sky
          pixels because of cosmic rays.

 MEDIAN - TRUE to median filter to remove cosmic rays before collapsing 
          profile

 if MEDIAN

    NWIDTH  -- Half width of median fileter. Will use 2*NWIDTH+1

This command belongs to the classes: sky , tilted


Tom Marsh, Warwick