NAME

aca_bgd_mon.pl - Monitor the ACA background levels and find anomalous periods


SYNOPSIS

aca_bgd_mon.pl [options]


OPTIONS

-help

print this usage and exit.

-tstart

Start time for processing. Allowed formats: SECS Elapsed seconds since 1998-01-01T00:00:00 DATE YYYY:DDD:hh:mm:ss.ss... CALDATE YYYYMonDD at hh:mm:ss.ss... FITS FITS date/time format YYYY-MM-DD or YYYY-MM-DDThh:mm:ss.ss...

-tstop

Stop time for processing, as per tstart

-month

Process data for the full month prior to the specified tstart, or the current date if tstart is not specified. E.g. for any date in February, -month means process from Jan 1 through Jan 31.

-dir

Put outputs in directory dir instead of the automatically generated name. Not recommended for usage.

-loud

Print processing information. This is true by default.

-get

Get ACA L0 and AIPR data from the archive for the specified time period. This is the default. The -noget option can be used if the data have already been retrieved via an earlier run of aca_bgd_mon.

-plotonly

Skip all data retrieval and processing steps and go straight to the IDL plotting routines. Default = false.

-preclean

Clean out all the old postscript and GIF plots and image directories, but leave the data *.fits files. False by default.

-image

Produce ACA data star/fid image plots for periods of high background. True by default.


DESCRIPTION

aca_bgd_mon.pl performs these steps for a specified interval of time (typically a few days to a month):

Download all ACA L0 image data from the archive and extract everything but the actual images. This is done with the code share/aca_bgd_mon/get_products.pl. The data are stored in /proj/sot/ska/data/aca_bgd_mon/ACA0/YYYY-MM-DD/.

Compress the ACA data (alot) by storing as time intervals during which all data values are constant. The image background value is allowed to vary by up to 10 DNs. This is done with the share/aca_bgd_mon/extr_products.pl and the output is data/aca_bgd_mon/YYYY-MM/aca0.fits. =item

Download all AIPR (aspect intervals) data from the archive. This is done with the code share/aca_bgd_mon/get_products.pl. The data are stored in /proj/sot/ska/data/aca_bgd_mon/AIPR/YYYY-MM-DD/.

Combine the AIPR data for the month using extr_products.pl and output to data/aca_bgd_mon/YYYY-MM/aipr.fits.

Determine the KALMAN intervals when Chandra is stably pointing in NPM, using share/aca_bgd_mon/aipr2kalman.pl. The output is data/aca_bgd_mon/YYYY-MM/kalman.fits. This file does not have obsid information.

Look for intervals of anomalously high background in one or more ACA image slots using the IDL routine plot_aca_bgd. Produce summary plots of background levels and detailed plots for each high background event.

Put plots into a web directory where they can be interactively browsed with a CGI script (http://asc.harvard.edu/mta/ASPECT/aca_bgd_mon/aca_bgd.cgi).

All processing text outputs are sent to STDOUT and a log file (named by date) in /proj/sot/ska/data/aca_bgd_mon/Log/

EXAMPLES

 # Process data for a three-hour span on day 185 (this contains a strong event)
 aca_bgd_mon.pl -tstart 2001:185:01:00:00 -tstop 2001:185:04:00:00
 # Process data for the previous month.  This is typically done as a cron job
 aca_bgd_mon.pl -month

DATA FILE FORMATS

ACA0 monthly file

The compressed aca0 monthly file consists of records with data for an interval of time over which the data columns are constant. For the bgdavg column, constant means that it does not vary by more than 10 DN.

 baffin-318: dmlist aca0.fits.gz columns
   
 -------------------------------------------------
 Columns for Table Block BINTBL
 -------------------------------------------------
   
 ColNo  Name                 Unit        Type     
    1   bgdavg                            Int2    Average background
    2   dt                                Real4   Length of interval
    3   glbstat                           Byte    Global status
    4   imgfid1                           Byte    Image is fid light
    5   imgfunc1                          Byte    Image function
    6   imgstat                           Byte    Image status
    7   quality                           Int4    Telemetry quality (must be 0)
    8   slot                              Byte    Image slot
    9   time                              Real8   Start time of interval

AIPR monthly file

The aipr monthly file is just a concatenation of the AIPR L0.5 files for the month.

 baffin-321: dmlist aipr.fits.gz columns
   
 -----------------------------------------------------
 Columns for Table Block BINTBL
 -----------------------------------------------------
   
 ColNo  Name                 Unit        Type         
    1   aspect_mode                       String[4]   KALM, NMAN, SLEW, ACQU, GUID
    2   avg_dec                           Real8       Average Dec during interval
    3   avg_ra                            Real8       Average RA during interval
    4   avg_roll                          Real8       Average Roll during interval
    5   obsid                             Int4        Obsid
    6   pcad_mode                         String[4]   NMAN, NPNT
    7   sim_mode                          String[7]   MOVING, STOPPED
    8   start_time                        Real8       Interval start time
    9   stop_time                         Real8       Interval stop time

Kalman monthly file

The kalman file is very simple:

 baffin-323: dmlist kalman.fits.gz columns
   
 -------------------------------------------------
 Columns for Table Block BINTBL
 -------------------------------------------------
   
 ColNo  Name                 Unit        Type     
    1   kalman                            Int4    Kalman processing? (0 or 1)
    2   time                              Real8   Time (either a start or stop)

The data are given in pairs to indicate intervals of Kalman (1) or not Kalman (0). There must have been a good reason to use this weird format instead of tstart/tstop, but it eludes me now:

 ROW    kalman     time
   
      1          0 244511660.9464699924
      2          0  244512599.826513350
      3          1 244512599.8465133309
      4          1 244563336.3038470447
      5          0 244563336.3238470256
      6          0 244565465.2289449871
      7          1 244565465.2489449680
      8          1 244565640.5039530396


AUTHOR

Tom Aldcroft (taldcroft@cfa.harvard.edu)