RHESSI DETECTOR HEALTH README A. Inglis, April 2019 K. Tolbert, July 12, 2019 A. Inglis, August 5, 2019 ---------------------- Overview -------- The detector health database records the status of the 18 RHESSI detector segments on a daily basis for the entire mission, 12-Feb-2012 - 16-May-2018. The information is stored in .csv (comma separated value) files, one per detector segment per year, in the SSW software distribution in $SSW/hessi/dbase/det_health. The files are called Dxx_health_yyyy.csv, where xx identifies the detector number and segment front or rear, and yyyy is the year, e.g. D2F_health_2003.csv has the information for the front segment of Detector 2 for 2003. Monthly plots showing the status for all detector segments for each day are stored at https://hesperia.gsfc.nasa.gov/rhessi_extras/detector_health. The plots use a 'traffic light' system: green - no issues amber - caution, some concerns red - serious concerns, do not use. Database -------- The criteria used in the detector health database are described below. Each of the 18 detector segments (9 front, 9 rear) is characterized on a daily cadence. Currently, six criteria are used, with a seventh 'overall health' value calculated from these six criteria. The status of each criterion is recorded in the database with: 0 - no issues (green in plot) 1 - caution, some concerns (amber in plot) 2 - serious concerns, do not use (red in plot) 1) OVERALL HEALTH - a simple measure of detector health. This parameter takes on the worst value of all the criteria listed below for each detector segment. For example, for Detector 1F, if all criteria had value 0 except for HIGH MONITOR RATES which had value 1, the overall health value would be 1. This is the value used to determine the color shown for a particular day / detector segment in the plots described above. 2) DETECTOR OFF - value 0 if the detector is ON, value 2 if the detector is OFF. Determined by looking up the high voltage value of each detector. When the detector is off, the high monitor rate flag, unsegmented flag, and missing data flag are all set to -1. 3) DETECTOR VOLTAGE CHANGE - value 0 if there was no change to the high voltage on the given day. Value 1 if there was a voltage change. 4) HIGH MONITOR RATES - Only applies to front detector segments. Uses the detector front segment slow rates as a measure of detector noise, calculated based on baseline noise values for the detectors over the entire RHESSI mission. There are two thresholds for noise, one for 'amber' (noisy but useable) and one for 'red' (detector not useable). For each day the median of the slow rate is calculated and compared with the baseline expectations. Value 0 (no issues) if the median detector noise is below the first threshold of 1e3. Value 1 if the detector noise is above the first threshold but below the second threshold of 1e4. Value 2 if the noise is above the second threshold. 5) UNSEGMENTED - a measure of whether the front and rear segments of each detector are segmented or not. Value 0 if the detector is segmented. If unsegmented, the front segment is assigned value 1 and the rear segment is assigned value 2. Segmentation is identified by studying the rear segment slow rates. Very low rear rates but normal front rates are associated with lack of segmentation. 6) MISSING DATA - value 0 if there is continuous data for the entire day. Takes value 1 if >1% of the day registers zero counts, corresponding to ~15 minutes of zero data. Takes value 2 if zero data is recorded for the entire day. 7) LOW RATE - a measure of whether there counts in the detector are anomalously low. Determined by measuring the slow monitor rates - if the front rates are very low, the detector is marked as such. If the rear rates are ALSO very low, the rear segment is marked as well. 8) MANUAL - the RHESSI science team has manually set the status of this detector for the given time, indicating a problem not covered by the other metrics. A common example of this is when detectors transition between unsegmented and segmentation states. During these transitions, detectors often behave erratically. Software --------- 1. To read the health data into an IDL structure use: IDL> struct = hsi_get_det_health() IDL> help,struct STRUCT STRUCT = -> Array[5938] IDL> help,struct,/st ** Structure <5cb30bb8>, 8 tags, length=272, data length=268, refs=2: TIME STRING '2002/02/12 00:00:00.000' OVERALL_HEALTH INT Array[18] DETECTOR_OFF INT Array[18] DETECTOR_VOLTAGE_CHANGE INT Array[18] HIGH_MONITOR_RATES INT Array[18] UNSEGMENTED INT Array[18] MISSING_DATA INT Array[18] LOW RATES INT Array[18] MANUAL INT Array[18] Use the year keyword to read a single year, and use the dir keyword if the .csv files are not in the standard location: struct = hsi_get_det_health(year=2002) struct = hsi_get_det_health(year=[2003,2005], dir='test_csv') 2. Query the timeline for a particular date as follows: struct = hsi_query_det_health(time='3-Mar-2003') help,struct ** Structure <5cbaf4d8>, 8 tags, length=272, data length=268, refs=2: TIME STRING '2003/03/03 00:00:00.000' OVERALL_HEALTH INT Array[18] DETECTOR_OFF INT Array[18] DETECTOR_VOLTAGE_CHANGE INT Array[18] HIGH_MONITOR_RATES INT Array[18] UNSEGMENTED INT Array[18] MISSING_DATA INT Array[18] LOW RATES INT Array[18] MANUAL INT Array[18] Note - if you've already read in the structure for the whole mission or the year you're requesting (say into the variable full_struct), this routine will be faster if you pass that in using the keyword det_struct: struct = hsi_query_det_health(time='3-Mar-2003', det_struct=full_struct) 3. Modify your detector selection to disable detectors with bad health using hsi_dets2use: print, hsi_dets2use(time_range=['10-mar-2011 22:00', '11-mar-2011 03:00'], det_index=[0,0,1,1,1,1,1,1,1]) 0 0 1 1 1 1 0 1 0 As above, if you pass in det_struct containing the result of hsi_get_det_health(), it works faster. Also passing in /rear will make it apply to the rear segments. 4. The detector health timeline database and plots were written as follows: a. detector_timeline_wrapper, dir='test_csv' b. hsi_detector_timeline_manual_corrections, dir='test_csv' c. hsi_make_det_health_plots, dir='test_csv', out_dir='test_plot' detector_timeline_wrapper calls detector_timeline for each year of mission (or years in keyword year) detector_timeline gathers the info for each day for each detector segment, calling hsi_detector_hv_status and hsi_monitor_rate_status_v2 and writes a .csv file for each detector segment for each year called Dxx_health_auto_yyyy.csv. hsi_detector_timeline_manual_corrections reads the .csv file called hsi_detector_health_manual_override.csv to make any manual overrides necessary to the database. It copies all the ...auto...files to the same name without auto, and rewrites the ones that have manual overrides. The final names are Dxx_health_yyyy.csv. hsi_make_det_health_plots makes the monthly plot files. It makes PS files that are converted to PNG files using the convert command (part of ImageMagick), so need to have ImageMagick installed where this is run.