DMS Association Status Tool User's Guide

The DMS Association Status Tool takes a time period (default is a one day period of today) and determines a list of DMS associations that have been created during that time period. It uses that information to generate two files. One containing DMS associations for further DMS processing. The second file contains various reports and statistics.

Running the DMS Association Status Tool

Usage: dms_asn_status.pl [-S<DADS server name>]
                         [-D<DADS database name>]
                         [-O<OPUS database name>]
                         [<start date>]
                         [<end date>]

Ex: dms_asn_status.pl -SCATLOG -Ddadsops -Oopus
    or
Ex: dms_asn_status.pl -SCATLOG -Ddadsops -Oopus 'Jan  1 2007'
    or
Ex: dms_asn_status.pl -SCATLOG -Ddadsops -Oopus 'Jan  1 2007' 'Jul 22 2007'

Notes:
  1. The start and end dates are refering to the time period when the DMS association was created. This period has nothing to do with when the original data was taken.
  2. If no time period is specified then the time period is 1 day long starting at the previous midnight. If a start time and no end time is provided the period will be from the start time until midnight of the night after the tool is run. If both times are provided then the period will be between those two times.

Outputs

Two files are generated by the tool.
  1. dms_asn_status.lis - This file contains a list of DMS associations created in the time period that have no pdq differences within the members. This file will be used for further DMS Association processing.
  2. dms_asn_status.rpt - This file contains a report of the run as well as some statistics about all DMS associations. The report contains a number of sections. The first two sections are both optional and will only be created if at least one entry will show up in their respective reports. The last section is a summary of all DMS associations that were processed.

Basic Algorithm

  1. Get the inputs. All inputs are optional.
  2. Get all the old pdq information from dms_asn_orig_data. We need this since for a while we deleted out member pdq information. This missing information would cause problems in a comparison between members.
  3. Get the pdq information from pdq_summary for the given time period.
    1. Save the member obsnum for each association
    2. Save each member's pdq information. Use dms_asn_orig_data pdq information if there was no pdq information in DADS.
    3. Skip the association's pdq in comparison if none found
    4. Compare two successive pdq values and if a difference is found put it in a hash to be processed later.
  4. Process the DMS associations with no pdq differences. Write the association id to the .lis file. Write the association ids along with all the member's obsnums to the .rpt file.
  5. Process the DMS associations with pdq differences. Write out each member of the association and it's pdq values to the .rpt file. Put a line of '===' between each association for ease of reading.
  6. Get a list of all DMS associations from dms_asn_id. Do an outer join to dads assoc_member table. If the association is in assoc_member then it is considered completed. We know that the cleanup and pdq creation may not have been done. Save all the information in hashes.
  7. Write out all the completed associations on a month/instrument basis to the .rpt file. There is one line per month.
  8. Write out all the completed associations on an instrument basis to the .rpt file. There is one line per instrument.

Examples of a DMS Association Status Tool

The first example is giving no dates but no DMS associations were created that day. This will only generate the summary reports. The .lis file is empty since there were no DMS associations created that day.
> dms_asn_status.pl 
> cat dms_asn_status.lis
> cat dms_asn_status.rpt
      DMS Report from 08/22/2007 - 08/23/2007

Number of associations processed in report time period       : 0
Number of associations with mixed PDQs in report time period : 0

      Completed Associations by Month & Instrument

Date       Total   By Instrument                 
-------    -----   ------------------------------
2006/05       64   NICMOS(64)
2006/06      158   NICMOS(158)
2006/09       50   NICMOS(50)
2006/10      227   NICMOS(227)
2007/01      172   NICMOS(172)
2007/02      374   NICMOS(374)
2007/03      379   NICMOS(379)
2007/04      245   STIS(245)
2007/05      647   STIS(647)
2007/06      898   ACS(122), NICMOS(14), STIS(762)
2007/07      281   ACS(223), NICMOS(58)
2007/08       64   ACS(52), NICMOS(12)

Instrument   Completed Asns   Created Asns
----------   --------------   ------------
ACS                     397            397
NICMOS                 1508           1508
STIS                   1654           1654
 ----------   --------------   ------------
Total                  3559           3559

Here is example of supplying both dates

> dms_asn_status.pl 'May  16 2006' 'May 17 2006'
> more dms_asn_status.lis
N3T501010
N3T5A1010
> more dms_asn_status.rpt
      DMS Report from 05/16/2006 - 05/17/2006

          Associations without PDQ Differences 

Asn Id      ObsNums in Asn                                 
---------   -----------------------------------------------
N3T501010 : 010 C2 C3 C4 C5 C6
N3T5A1010 : 010 C7 C8 C9 CA CC

                    Associations with PDQ Differences 

Asn Id      Obsnum   PDQ Info                               
---------   ------   ---------------------------------------------------------
N3T502050   050      *GSFAIL*GUIDE STAR ACQUISITION FAILED.  PLANNED GUIDING MODE NOT OBTAINED.*DE
GRADED GUIDING MODE. SINGLE STAR FINE LOCK.*POSSIBLE MOTION OF SOURCE DUE TO UNPLANNED SINGLE STAR
 GUIDING.*
N3T502050   CZ       *GSFAIL*GUIDE STAR ACQUISITION FAILED.  PLANNED GUIDING MODE NOT OBTAINED.*DE
GRADED GUIDING MODE. SINGLE STAR FINE LOCK.*POSSIBLE MOTION OF SOURCE DUE TO UNPLANNED SINGLE STAR
 GUIDING.*
N3T502050   D3       *GSFAIL; TM_GAP*GUIDE STAR ACQUISITION FAILED.  PLANNED GUIDING MODE NOT OBTA
INED.*ENGINEERING TELEMETRY UNAVAILABLE FOR   33.63 SECONDS.*SEE COMMENTS FOR OTHER PROBLEMS.*
N3T502050   D6       *GSFAIL*GUIDE STAR ACQUISITION FAILED.  PLANNED GUIDING MODE NOT OBTAINED.*DE
GRADED GUIDING MODE. SINGLE STAR FINE LOCK.*POSSIBLE MOTION OF SOURCE DUE TO UNPLANNED SINGLE STAR
 GUIDING.*
================================================================================
N3T5B1010   010      *GSFAIL*GUIDE STAR ACQUISITION FAILED.  NO LOCK OBTAINED.*DEGRADED GUIDING MO
DE. GYRO GUIDING.**
N3T5B1010   CE       *GSFAIL*DEGRADED GUIDING MODE.***
N3T5B1010   CF       *GSFAIL*DEGRADED GUIDING MODE.***
N3T5B1010   CG       *GSFAIL*DEGRADED GUIDING MODE.***
N3T5B1010   CH       *GSFAIL*GUIDE STAR ACQUISITION FAILED.  NO LOCK OBTAINED.*DEGRADED GUIDING MO
DE. GYRO GUIDING.**
N3T5B1010   CI       *GSFAIL*GUIDE STAR ACQUISITION FAILED.  NO LOCK OBTAINED.*DEGRADED GUIDING MO
DE. GYRO GUIDING.**
================================================================================

Number of associations processed in report time period       : 4
Number of associations with mixed PDQs in report time period : 2

      Completed Associations by Month & Instrument

Date       Total   By Instrument                 
-------    -----   ------------------------------
2006/05       64   NICMOS(64)
2006/06      158   NICMOS(158)
2006/09       50   NICMOS(50)
2006/10      227   NICMOS(227)
2007/01      172   NICMOS(172)
2007/02      374   NICMOS(374)
2007/03      379   NICMOS(379)
2007/04      245   STIS(245)
2007/05      647   STIS(647)
2007/06      898   ACS(122), NICMOS(14), STIS(762)
2007/07      281   ACS(223), NICMOS(58)
2007/08       64   ACS(52), NICMOS(12)

Instrument   Completed Asns   Created Asns
----------   --------------   ------------
ACS                     397            397
NICMOS                 1508           1508
STIS                   1654           1654
 ----------   --------------   ------------
Total                  3559           3559

Note: Both the Completed sections are the same since they were all run on the same day. Over time they should change.
Lisa Gardner (gardner@stsci.edu)
Last Updated: August 22, 2007