Report on MTA databases II

Goals:

This Memo is prepared May 10, 2001 (updated May 11, 2001) , as a summary of the results of testing the "1 Month" database. In this memo I summarize our analysis process, present the results of the evaluation and make specific recommendations for moving forward both for the current, first generation, databases and for the second generation databases.

An executive summary of this report:

The primary change in this test was the use of ops to populate the databases. After removal of the known long poles this process seemed to work well. Database tables were populated in 25% of realtime. The databases look fine except for the known problems (see Actions). There are no changes in the general performance from the 3 day test. The impact on ops was minimal. The operations of populating these first generation databases, should proceed as soon as possible, first populating February to present and then working backward through 2000. In parallel development on the second generation dbs should proceed. This primarily consists of moving arithmetic functions to dsops pipelines to enhance speed and correct some timing (see Limitations), and adding additional databases. Most of the current and future DBs are being maintained in a document by Mark.

Operations

ARCOPS and DSops worked together to develop a script to ingest data into the MTA DB tables. After removing slow ingest files, the process was relatively simple, stage the files for ingest and let the script run. Processing time was about 1 week of data in 2 days of run time, using available CPU. The ingest script works in 4 parallel queues. As reported by Craig, each takes about 6 hours to process 1 days worth of data into the tables. It will take about 1 month to get Feb. through May 2001 into the tables. DSops says they are ready to continue populating the tables whenever they get the go ahead. This should get started immediately!

Analysis Process

We employed a multi-pronged approach to the analysis:

Evaluation

  • Actions From March

    Here is a list of the actions outstanding from March's meeting I have added in bold the closures that I am aware of. Please send me any more closure data if you have, otherwise we'll carry the actions until the next report.
    1. Review of the Databases
      • hrmagrad_avg, hrmaheaters_avg, obagrad_avg, & obaheaters_avg - NO DATA Currently this data is not being ingested by AP ==> Mark: Work with DP to get this added to the AP registries Also, Coordinate Ops procedure to so that back data in cache gets ingested and cleaned off of disk. CLOSED- this is fixed in a recent update and data since mid March should be ingestible. We need to consider if backfilling will be a problem
      • Obsolete tables need to be deleted from the Avg DB. ==> Alesha: clean tables from mtasubsys & pcaddrift_avg marked on report
      • HRC elec - 1st row are 0's ==> Alesha: check this DB and send group finding.
      • Sim B ==> Scott/Mark : check what MTA is reading/writing for SIM B. May want to run off of the SIM L0.5 product which checks and only writes from which side is ON. CLOSED. Here are our findings: The following files are the SIM L0 data products. MSIDs monitored from these files get jumbled in the database tables due to the side A/B duality ( meaning 2 files, 1=side A, 1=side B) are ingested.
        SIM = simfN_[ab]_tlm0.fits
        SIMDIAG = simfN_[ab]_diag0.fits
        We currently monitor 26 MSIDs from these two products 15 from SIM, and 11 from SIMDIAG.

        I compared these MSIDs with the SIM L0.5 data products:
        SIMCOOR = simfN_coor0a.fits
        SIM_MRG = simfN_tlm0a.fits
        All fields currently monitored in the SIM (tlm0.fits) data product can be obtained from the merged L0.5 data product SIM_MRG. Those that are from the diagnostics file ( SIMDIAG ) do not have a match and will need some other solution. I'm not sure how we would integrate this into the current pipeline, but we could use the value of the "SEAIDENT" column of the L0.5 file to select which SIMDIAG file to monitor. Not sure what to do if the side switches in the middle of a file? Just an idea.

        We recommend a move to monitoring the L0.5 SIM_MRG product instead of the L0 "SIM" product. This will ease the A/B redundancy problem we are seeing.

        Obviously, this has an impact on DB and AP to feed/ingest/archive this different file. How much of an impact is it in each of your areas to switch from the L0 SIM file to the L0.5 SIM_MRG file? I can provide detailed file descriptions, but aside from the CONTENT keyword, they appear to have the same structure.

        All MSIDs from the L0 SIM DIAG file are going to be jumbled still. A solution to that is still needed. However only 1 diag file is valid at a time. The ingest tool could take the valid SEA as a parameter.

      • Config DB - NULL rows - may be bad data quality ==> Alesha check
      • Ephem - move mtacriteria to primary = 3rd set of DBs
      • Dataseeker Details will be worked with MTA team. ==> IE: check mwrfits for workaround to write problem with fits column name that start with a number for Jim.
        - Need a lookup table to map DB msids to P008.
        ==> Jim/Takashi -- short term solution - Done with errors noted above ==> Ian - create when translate the DB for telemetry. Need to work this requirement into that effort
    2. Enhancements/Fixes
      • Change sample time from 300s to 328s. Pros and cons outlined in Scott/Ian/Arnold discussion notes. Will add lookup table so that time can change. Not looked at as common event but need the flexibility if required. ==> Alesha - evaluate impact of change on DB code. I HEREBY WITH DRAW THIS REQUEST
      • Handling timepixr Engineering -- timepixr = 0 ACIS/HRC event -- timepixr = 0.5 1 ephin case is different - timepixr is non-zero. ==> IE: send info on timpixr for different ephin files. ==> MCD: need to handle in new averaging code ... where the time stamp is relative to the bin.
      • Primary DB -- currently implemented off to the side from Acorn files. Discussed that most of the data is in actual obspar or could be added. ==> Scott: send info on current definition so we can map to obspar and other OCAT data in order to evaluate. -CLOSED discussed in text. Though Mark Ian and I need to loop through it a few more times.
      • Config & Avg DBs - Need to review/fix time stamps.
             Now:
             ====
                                config          average
        Config bin time ---->   ------          ------- <-- avg bin start
                                  |               |
                                  |               |
                                  |               |
                snapshot -->    ------          ------  <--- avg bin stop & bin time
                                  |               |
                                  |               |
                                  |               |
                                ------          ------
        
             Need it to be:
             ==============
        
                                config          average
                                ------          -------
                                  |               |
                                  |               |     <--- avg bin start
                                  |               |
        snapshot & bin time ->  ------          ------  <--- avg bin time to file
                                  |               |
                                  |               |     <--- avg bin stop
                                  |               |
                                ------          ------
        
                ==> Alesha: evaluate current implementation.  Config has to be fixed.
                        It would be good to fix avg as well so we can go operational.
                        Evaluate the time to change config and avg to above scheme.
                        Write up algorithm change for review.
        

    Limitations

    These databases stand to be a tremendous boon to investigation of spacecraft performance and may well be able to serve in science investigations as well. There are a few issues that need to be addressed though.

    Recommendations

    I declare this test successful, there were no show stopping surprises and no errors in segments of the code not already scheduled for revamp. I suggest we proceed as follows: (All steps and dates negotiable).

    LONG TERM-NEW DATA BASES:

    There have always been a second set of tables in the offing. It looks like development could start soon. I summarized these in the March report.

    NEW TABLES:
    Executive listing of new DBTs in priority order. The previous report detailed these, the are now being maintained in Mark's document.

    1. - Level 2 sources*
    2. new secondary data base as described in text.
    3. Primary data
    4. Gratings (3)
    5. ACIS Background (should move up to 2 when the SIB is done)
    6. HRC BACKGROUND (should move up to 3 when the SIB is done)
    7. EPHIN L1
    8. ACA
    *An RDB form of this exists and should be brought into dataseeker as soon as possible.