Report on MTA databases

Goals:

The Memos is prepared March 3, 2001, as a summary of the results of testing the "3day" database. In this memo I summarize our analysis process, present the results of the evaluation and make specific recommendations for moving forward. An executive summary of this report is:
The data bases look fine except for the known timing problems. Some databases are missing. There were some edge effects in the databases which are not considered significant. The dataseeker is a great interface, but needs thorough testing. Changes/enhancements are requested to the timing scheme and data seeker. A parallel development/deployment is proposed. As an appendix the outline of additional database has been attached.

Process

We employed a multi-pronged approach to the analysis:

Evaluation

Database data from dataseeker was compared with re-run daily report data. Timing is such that at time n, average is given for the data points within the next n+300s. Data gap in all tables: 88936800 - 88938300s, other gaps in individual tables appear below. Average and standard deviation and limits have been spot checked for all tables/columns - no problems.

Permission/system problems seem prevalent. SQL calls which work at on time return permission errors at others. Part of the problem is that the databases seem to contain many obsolete tables.

Recommendations

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.

LONG TERM-NEW DATA BASES:

There have always been a second set of tables in the offing. It looks like development could start soon. Here is a level B specification. I expect 2 or 3 rounds of back and forth between myself and the programmers until these are finalized. Specifically I expect a revision of these in the April 15 report.

NEW TABLES:
Executive listing of new DBTs in priority order

  1. - Level 2 sources*
  2. Primary data
  3. Gratings (3)
  4. ACIS Background (should move up to 2 when the SIB is done)
  5. HRC BACKGROUND (should move up to 3 when the SIB is done)
  6. EPHIN L1
  7. ACA
*An RDB form of this exists and should be brought into dataseeker as soon as possible.
The priorities may not reflect the state of code. For example the \ relevant ACA codes are done, so table creation may be strait forward. There is no new code requirement for the Level 2 database table so this is expected to be relatively easy.
details:

PRIMARY DATA

These data are currently provided by SCIENCE to dataseeker.
As such they exist in RDB format, this slows the operation of the 
dataseeker, SI-mode is also not captured. Primary data are essentially 
the observational criteria of each observation and so could probably 
be gleaned from the obspar, so long as we can insure that these 
are "as flown."

Primary data include:
Tstart, tstop, RA, DEC,OBSID, SI, Grating, SI-mode


timestart = last TS time before the first photon
timestart = first TS time after the last photon


EPHIN L1

the binning time on this can be 4 ST (1312 seconds instead of 328 seconds)
These are level 1 data Not L0 as in the other database.

ARCHIVE SPACE ESTIMATE 1 record of ~20 COLUMNS/20 MINUTES

This could supersede the other one (EPKEY) though 

 SCP4GM          Hz      1E   sci coincidence counter P4GM rate
 SCP8GM          Hz      1E   sci coincidence counter P8GM rate
 SCH4GM          Hz      1E   sci coincidence counter H4GM rate
 SCH8GM          Hz      1E   sci coincidence counter H8GM rate
 SCCT0           Hz      1E   sci coincidence counter CT0 rate
 SCE150          Hz      1E   sci coincidence counter E150 rate
 SCE300          Hz      1E   sci coincidence counter E300 rate
 SCE1300         Hz      1E   sci coincidence counter E1300 rate
 SCE3000         Hz      1E   sci coincidence counter E3000 rate
 SCINT           Hz      1E   sci coincidence counter INT rate
 SCP25GM         Hz      1E   sci coincidence counter P25GM rate
 SCP41GM         Hz      1E   sci coincidence counter P41GM rate
 SCH25GM         Hz      1E   sci coincidence counter H25GM rate
 SCH41GM         Hz      1E   sci coincidence counter H41GM rate


ACA
This is the input to ACA trend. and was in ACA_TRD spec.

The following are the appropriate entries for the database table.


FROM FIDROPS: 
time slot_ID, ID_num,id_status, OBS_ID,mag_i_avg,
mag_i_min, mag_i_max for each time interval in FIDPROPS.

FROM GSPROPS: 
time slot_ID, agasc_id ,id_status, OBS_ID, mag_aca_avg,
mag_aca_min, mag_aca_max, for each time interval in GSPROPS.

FROM ACACENT 

time angynea(1-8), angznea(1-8) this is a total of 16
elements for  each time interval in ACACENT.  This is a low priority data base 
as it is
quite large

 Other notes for the data base: id\_status (0= good,5=marginal 9=bad)
time = (tstop+tstart)/2, dt = tstop -tstart if there is only one entry
and no time is specified (I can't tell from the ICD if that is the case).



ACIS Background
ALL SIB output
HRC BACKGROUND
ALL SIB output
ARCHIVE SPACE ESTIMATE 1 record of ~20 COLUMNS/1 SECOND OF OBSERVING TIME
(WE MAY NEED TO USE a COARSE RA/DEC HERE, THE ABOVE ASSUMES 1' resolution,
We lower are archive usage by a factor of 16 if we go to 4' resolution
i.e. per node.  I think this latter choice is the way to go.
 

Level 1.5
Gratings
These require an improvement to the current grate_mon code
being run by AP.  namely, it should only be run on L1.5 files and needs to
use the source location from the file to make it's guess on the location of 
zero
order. SOT has been manually running these to date. 
So the source data exists from which to populate the databases.
Note, timing should be to the nearest 300 interval, just like the discretes.

3 data bases are required:
general grating data  L1.5 gratings data and line data.

ARCHIVE SPACE ESTIMATE 1 record of ~75 COLUMNS/ gratings observation 
(~200/year)
ARCHIVE SPACE ESTIMATE 1 record of ~10 COLUMNS/ gratings observation 
(~200/year)
ARCHIVE SPACE ESTIMATE 10 records of ~9 COLUMNS/ gratings observation 
(~200/year)

general grating data
this should be a copy of the output parameter file produced by grat_mon:
1 file maps to 1 record.
Here is a sample output file.
1 record per observation.

 # 
 # rdb parameter file ("rpf") format
 # 
 S     rpf_creation_time : "Mon Nov 20 09:39:02 2000"                          
 S              filename : "acisf00644_000N001_evt1a.fits"                     
 S              detector : "ACIS-S"                                            
 S               grating : "HETG"                                              
 N           file_events :  1910749.0 +/- 0.0000000                            
 N        abs_start_time :  90628038. +/- 0.0000000 second                     
 N     interval_duration :  57401.546 +/- 0.0000000 second                     
 N        ave_event_rate :  33.287414 +/- 0.024081206 event/second             
 S           proc_method : "Sky"                                               
 N        expnos_ratio_0 :  0.0000000 +/- 0.0000000                            
 N        expnos_ratio_1 :  0.0000000 +/- 0.0000000                            
 N        expnos_ratio_2 :  0.0000000 +/- 0.0000000                            
 N        expnos_ratio_3 :  0.0000000 +/- 0.0000000                            
 N        expnos_ratio_4 :  0.93644834 +/- 0.0000000                           
 N        expnos_ratio_5 :  1.0046040 +/- 0.0000000                            
 N        expnos_ratio_6 :  0.97997612 +/- 0.0000000                           
 N        expnos_ratio_7 :  0.99704790 +/- 0.0000000                           
 N        expnos_ratio_8 :  0.68658620 +/- 0.0000000                           
 N        expnos_ratio_9 :  0.97340453 +/- 0.0000000                           
 N         live_interval :  57401.546 +/- 0.0000000 second                     
 N       live_event_rate :  4.6695607 +/- 0.0090193698 event/second            
 N         zo_det_events :  10873.000 +/- 0.0000000                            
 N          zo_live_rate :  0.18941999 +/- 0.0018165657 event/second           
 S          x_coord_name : "SkyX"                                              
 S          y_coord_name : "-SkyY"                                             
 N              zo_loc_x :  4116.8389 +/- 0.0000000 pixel                      
 N              zo_loc_y :  -4105.1914 +/- 0.0000000 pixel                     
 N       zo_det_fwtenthm :  4.0000000 +/- 0.0000000 pixel                      
 N           zo_det_fwhm :  2.0000000 +/- 0.0000000 pixel                      
 N             roll_axay :  -78.270645 +/- 0.0000000 degrees                   
 N             zo_chip_x :  207.03865 +/- 0.0000000 pixel                      
 N             zo_chip_y :  373.82413 +/- 0.0000000 pixel                      
 N        det_rms_radius :  13.889139 +/- 0.0000000 pixel                      
 N            zo_loc_fit :  2.3640544 +/- 0.0085596079 pixel                   
 N           zo_fwhm_fit :  40.662022 +/- 0.38683730 micron                    
 N                zo_acf :  0.034153013 +/- 0.00087427217 fraction in pixel/10 
 N      zo_detail_events :  7841.0000 +/- 0.0000000                            
 N        zo_detail_rate :  0.13659911 +/- 0.0015426313 event/second           
 N          strk_loc_fit :  26.163422 +/- 6.0589576 pixel                      
 N         strk_fwhm_fit :  408.91910 +/- 293.44986 micron                     
 N              strk_acf :  0.00097127842 +/- 2.6852255e-05 fraction in pixel/5
 N           strk_events :  6009.0000 +/- 0.0000000                            
 N             strk_rate :  0.10468359 +/- 0.0013504469 event/second           
 N             zo_loc_ax :  4119.2031 +/- 0.0000000 pixel                      
 N             zo_loc_ay :  -4105.1914 +/- 0.0000000 pixel                     
 N      heg_minus_events :  3499.0000 +/- 0.0000000                            
 N       heg_minus_angle :  -5.2510018 +/- 0.0000000 degree                    
 N       meg_plus_events :  5063.0000 +/- 0.0000000                            
 N        meg_plus_angle :  4.7232814 +/- 0.0000000 degree                     
 N      meg_minus_events :  6793.0000 +/- 0.0000000                            
 N       meg_minus_angle :  4.7415104 +/- 0.0000000 degree                     
 N       heg_plus_events :  3033.0000 +/- 0.0000000                            
 N        heg_plus_angle :  -5.1984057 +/- 0.0000000 degree                    
 N        heg_all_events :  6532.0000 +/- 0.0000000                            
 N         heg_all_angle :  -5.2342334 +/- 0.0000000 degree                    
 N        meg_all_events :  11856.000 +/- 0.0000000                            
 N         meg_all_angle :  4.7173090 +/- 0.0000000 degree                     
 N         MEGm1_Res1keV :  247.98160 +/- 0.0000000                            
 N         MEGp1_Res1keV :  0.0000000 +/- 0.0000000                            
 N         HEGm1_Res1keV :  0.0000000 +/- 0.0000000                            
 N         HEGp1_Res1keV :  0.0000000 +/- 0.0000000                            
 N     L1a_MEGm1_Res1keV :  0.0000000 +/- 0.0000000                            
 N     L1a_MEGp1_Res1keV :  0.0000000 +/- 0.0000000                            
 N     L1a_HEGm1_Res1keV :  0.0000000 +/- 0.0000000                            
 N     L1a_HEGp1_Res1keV :  0.0000000 +/- 0.0000000                            


General observation (II) 

timestart = last TS time before the first photon
timestart = first TS time after the last photon

>From the L1.5 file
1 record/ spectrum observed.
TIMESTART TIMESTOP DET GRAT Shape X Y R ROTANG COMP SOURCE 

Line data
Take directly from L2
1 record for each line

TIMESTART TIMESTOP DET GRAT INDEX   POS.  FWHM   AMP.   CONT.  CONT.SLOP.



Level 2 sources - We have a prototype available, the data seeker could
be hooked into this immediately.  How we want to handle time is a
question for L1.5 and L2 data products.  I think each one should come
with Tstart and Tstop which are the DB times preceding and following
the Tstart and Tstop in the datafile.

for each source
(still need Hardness numbers The tool which would create this 
is not in the pipeline.
) 
again take directly from L2 data 
ARCHIVE SPACE ESTIMATE 20 records of ~15 COLUMNS/ observation (~1000/year)  

timestart  Timestop RA DEC X Y NET_COUNTS BKG_COUNTS NET_RATE BKG_RATE SNR THETA EE50_OBS 
PSF50_OBS EXT