| 
 
      Generate a photometric lightcurve from ACA monitor data
     
monitor_photom  infile output [dark_ratio] [min_dark_limit]
[min_dark_meas] [max_dither_motion] 
       
        The Aspect Camera Assembly (ACA) is capable of providing
        simultaneous optical monitoring of a target during an
        observation. The monitor_photom script is used to generate a
        photometric lightcurve for a Chandra target which was observed
        using an ACA monitor window.   
        
        The basic idea of the detection algorithm is to sample pixels
        from the outer edge of the readout window and look for values
        higher than a threshold. At the edge, the contamination of the 
        dark current measurement from the monitor star is minimized.
        Since the readout window moves with respect to the CCD due to
        dither, the edge pixels end up sampling much of the CCD region
        used for imaging. In this way one can build up a map of warm
        pixels. 
       
        The main processing steps of the monitor_photom script are:
       
	  Read the image data file.
	
	  Median filter image data in time on a pixel-by-pixel basis
	  to remove cosmic rays. 
	
	  Search for "warm" pixels that have a dark current well
	  outside the normal distribution. These pixels can
	  significantly affect photometry as they dither in and out of
	  the 8x8 pixel image readout window. 
	
	  Subtract the background from each image readout. For warm
	  pixels the detected value for that pixel is used, while for
	  all others the median background dark current reported by
	  the ACA is used. 
	
	  Produce lightcurves in counts, counts/sec, and mags.
	  
        There are three limitations to the algorithm:
       
	  Background pixel sampling is not complete nor uniform.
	
	  For brighter stars, even the edge pixels have significant
	  contribution from the star light so it is not possible to
	  get a true dark current measurement. The "dark_ratio"
	  parameter specifies that the warm pixel threshold be no less
	  than dark_ratio * avg_source_counts.  
	
	  The current algorithm does not account for flickering.
	         
        This script is used in the Processing ACA Monitor Window Data thread.
       
        If the monitor photometry data indicate scientifically
	interesting results worthy of detailed study, users may wish
	to contact aspect_help@cfa.harvard.edu for further advice on
	possible techniques to reduce the systematic errors.  
       
monitor_photom pcad_adat71.fits monitor_lc.fits
	  
	    monitor_photom is run with all the default parameter
	    values.  The following screen output is generated:
	   
Filtering image data (cosmic ray removal)...
  Image 23624 of 23624
Average counts  (e-) = 2137.996582
Warm dark limit (e-) = 80.000000
Stacking dark current data...
  Image 23624 of 23624
Warm pixel at CCD (row,col) =  -18,10     Dark current (e-) = 85
Warm pixel at CCD (row,col) =  -17,11     Dark current (e-) = 325
Warm pixel at CCD (row,col) =  -11,11     Dark current (e-) = 615
Warm pixel at CCD (row,col) =  -15,12     Dark current (e-) = 105
Warm pixel at CCD (row,col) =   -8,16     Dark current (e-) = 115
Warm pixel at CCD (row,col) =  -10,17     Dark current (e-) = 105
Warm pixel at CCD (row,col) =  -17,19     Dark current (e-) = 170
Warm pixel at CCD (row,col) =  -14,20     Dark current (e-) = 130
Warm pixel at CCD (row,col) =  -13,20     Dark current (e-) = 175
Warm pixel at CCD (row,col) =   -9,20     Dark current (e-) = 110
Warm pixel at CCD (row,col) =   -7,20     Dark current (e-) = 350
Enter return to exit the program: 
 
	  ACA image data file
         
          
	    The PCAD Level 1 ACA image data files (pcad...adat71.fits)
	    are a "supporting" data product.  The "7" in "adat71"
	    refers to image slot 7, which is the slot where monitor
	    window data always appear.    
           
	    The monitor window data are available beginning with
	    standard data processing (SDP) version DS 7.6.0.  Check
	    the ASCDSVER keyword in the event file header to see which
	    software version was used in processing the data. 
	   
	    Typically the image data are split over a number of
	    files.  Use dmmerge to merge them into a single file for
	    input to monitor_photom: 
	   
unix% ls -1 *adat71.fits > adat71.lis
unix% dmmerge infile=@adat71.lis outfile=pcad_adat71.fits \
      outBlock=ACADATA 
 
	  Output lightcurve
         
          
	    The lightcurve contains columns with the time, counts,
	    count rate, magnitude, and background-subtracted
	    image. The magnitude is defined as 
	   
m_ACA = 10.32 - 2.5 * log10(cnt_rate / 5263.0)
	    An approximate formula relating B and V magnitude to m_ACA
	    is given in the Aspect chapter of the Proposers' Observatory Guide.
           
	  Dark ratio
         
          
	    This parameter affects the way in which warm pixels are
	    detected.  
           
	  Minimum warm pixel dark current
         
          
	    This parameter affects the way in which warm pixels are
	    detected. 
           
	  Minimum warm pixel measurements
         
          
	    This parameter affects the way in which warm pixels are
	    detected. 
           
	  Maximum possible dither motion (pixels)
         |