Tohban Useful Routines

From RHESSI Wiki

Revision as of 01:16, 23 October 2008 by Schriste (Talk | contribs)
Jump to: navigation, search

Note that all of this assumes that you are logged on to one of the RHESSI machines here at SSL with SSW available.

How to Access the SOH data

There is now an IDL routine to make it a bit easier to get information from the vc1 packets. This should work for getting read and write pointers, etc. It's called hsi_any_sohdata, here's an example:

data=hsi_any_sohdata(['6-aug-2002 08:00', '6-aug-2002 09:00'],$
                     time_array=tim_arr, soh_label='ISC_SSR')

This will return the SSR fill level for the given time range, with a time array (seconds from 1-jan-1979). You can get different data by passing in the appropriate name using the soh_label keyword.,

The labels are listed on the App_id=1 packet map. Go to the HESSIOPS home page: http://sprg.ssl.berkeley.edu/~hessiops. Click on "Telemetry and Command Database Volume II", then "14 Packet maps", then "app0001.html".

To plot, set the plot kewyword

data=hsi_any_sohdata(['6-aug-2002 08:00', '6-aug-2002 09:00'],$

                     time_array=tim_arr, soh_label='TSSCURWRTPTR', /plot)

This will plot the write pointer position as a function of time.

If you're hessiops, you need to be on sunny, and you need to source ~/setup_ssw, then call sswidl to start up IDL before you can do this.

The stored SOH data in the vc1 files typically appears about 10-20 minutes after the end of a given pass (for BGS or WLP passes, anyway). It doesn't go directly to the data archive, until the Quicklook data is finished processing. If for some reason you cannot get the data, be sure that the environmental variable HSI_DATA_USER is set to /disks/sunny/home/raid_queue in your setup.hessi_env file. Or in SSWIDL do:

set_logenv, 'HSI_DATA_USER', '/disks/sunny/home/raid_queue' temp = hessi_data_paths(/reset)

If you're not at SSL, then you'll need to wait until the data shows up in your local archive. The Hsi_obs_summ_flag Object This object is part of the Rhessi quicklook data, and contains all sorts of information:

obs_summ_flag_obj = hsi_obs_summ_flag(obs_time_interval = '6-aug-2002 '+['8:00', '9:00']) flag_data = obs_summ_flag_obj -> getdata() saa_flag = obs_summ_flag_obj -> get(flag_name = 'saa_flag')

This returns a byte array with the SAA flag, set to 1 for SAA periods. If you want a plot, use the plot method.

obs_summ_flag_obj -> plot, flag_name = 'ATTENUATOR_STATE'

This will put up a plot of the attenuator state for the given time interval.

The different data flags are as follows:

               ['SAA_FLAG', $ ;1 for SAA, from orbit data
                'ECLIPSE_FLAG', $ ;1 for Eclipse, 0 for sunlight, from orbit data
                'FLARE_FLAG', $ ;1 for flare
                'IDPU_CONTROL', $ ;IDPU version control number
                'CRYOCOOLER_POWER', $ ;average for 4 sec interval
                'COLD_PLATE_TEMP', $ ;average for 4 sec interval
                'IDPU_TEMP', $ ;average for 4 sec interval
                'COLD_PLATE_SUPPLY', $ ;percent on for 4 sec interval
                'HV28_SUPPLY', $ ;percent on for 4 sec interval
                'ACTUATOR_SUPPLY', $ ;percent on for 4 sec interval
                'FAST_HOUSEKEEPING', $ ;percent on for 4 sec interval
                'SC_TRANSMITTER', $ ;(may affect detector 8), percent on for 4 sec interval
                'SC_IN_SUNLIGHT', $ ;percent on for 4 sec interval, from packets
                'SSR_STATE', $ ;0-8 SSR fill level, average for 4 sec interval
                'ATTENUATOR_STATE', $ ;0,1,2,3, average for 4 sec interval
                'FRONT_RATIO', $ ;Front counts /(front+rear), flare diagnostic
                'NON_SOLAR_EVENT', $ ;set to 1 for a non-solar event
                'GAP_FLAG', $ ;1 if no count rate data
                'DECIMATION_ENERGY', $ ;energy channel upper limit for decimation
                'DECIMATION_WEIGHT', $ ;decimation multiplier true_rate=weight*obs_rate
                'MAX_DET_VS_TOT', $ ;fraction of counts in 1 detector,to rule out 1 detector flares
                'NMZ_FLAG', $ ;Set to 1 if in North High-latitude Magnetic Zone
                'SMZ_FLAG', $ ;Set to 1 if in South High-latitude Magnetic Zone
                'AAZ_FLAG', $ ;Set to 1 if in the Atmospheric Absorption Zone
                'PARTICLE_FLAG', $ ;Set to 1 for a Particle Event
                'REAR_DECIMATION'] ;Set to 1 for rear detector decimation

See The documentation for the RHESSI Quicklook data for more useful objects. Note that these flags are mostly gotten from VC3 packets, so that this information may be a 1 or even 2 days behind the SOH data. HSI_GET_ORBIT_INFO This routine returns a string array containing the orbit, eclipse, SAA and Magnetic zone data for the input time range:

data = hsi_get_orbit_info('24-aug-2002 '+['0:00', '8:00'], /list)

Returns:

TIMES IN SUNLIGHT: 2002-08-24T00:00:00.000Z -- 2002-08-24T00:58:27.000Z 2002-08-24T01:28:24.000Z -- 2002-08-24T02:34:52.000Z 2002-08-24T03:04:46.000Z -- 2002-08-24T04:11:17.000Z 2002-08-24T04:41:08.000Z -- 2002-08-24T05:47:42.000Z 2002-08-24T06:17:30.000Z -- 2002-08-24T07:24:07.000Z 2002-08-24T07:53:53.000Z -- 2002-08-24T09:00:32.000Z TIMES IN SAA: NONE TIMES IN AAZ: 2002-08-24T00:58:03.000Z -- 2002-08-24T00:58:35.000Z 2002-08-24T01:28:16.000Z -- 2002-08-24T01:28:48.000Z 2002-08-24T02:34:28.000Z -- 2002-08-24T02:35:00.000Z 2002-08-24T03:04:38.000Z -- 2002-08-24T03:05:10.000Z 2002-08-24T04:10:52.000Z -- 2002-08-24T04:11:25.000Z 2002-08-24T04:41:01.000Z -- 2002-08-24T04:41:33.000Z 2002-08-24T05:47:17.000Z -- 2002-08-24T05:47:50.000Z 2002-08-24T06:17:23.000Z -- 2002-08-24T06:17:55.000Z 2002-08-24T07:23:42.000Z -- 2002-08-24T07:24:15.000Z 2002-08-24T07:53:45.000Z -- 2002-08-24T07:54:17.000Z TIMES IN NMZ: 2002-08-24T01:07:37.000Z -- 2002-08-24T01:17:11.000Z 2002-08-24T02:43:50.000Z -- 2002-08-24T02:59:00.000Z 2002-08-24T04:20:06.000Z -- 2002-08-24T04:40:51.000Z 2002-08-24T05:56:19.000Z -- 2002-08-24T06:23:38.000Z 2002-08-24T07:32:33.000Z -- 2002-08-24T08:00:00.000Z TIMES IN SMZ: 2002-08-24T00:22:06.000Z -- 2002-08-24T00:37:44.000Z 2002-08-24T01:58:18.000Z -- 2002-08-24T02:19:59.000Z 2002-08-24T03:34:34.000Z -- 2002-08-24T03:59:37.000Z 2002-08-24T05:10:47.000Z -- 2002-08-24T05:35:51.000Z 2002-08-24T06:47:01.000Z -- 2002-08-24T07:12:06.000Z


Note that the env variable HSI_FDF_DIR must be set to the directory with the orbit data archive: /disks/sunny/home/workdir/SatTrack HSI_SSR_FILL_PER_ORBIT This routine returns the difference in SSR fill for a given RHESSI orbit, it can be used with either a time input or an orbit number. E.g,

ppp = hsi_ssr_fill_per_orbit('25-aug-2002 0:00')

Returns

ORBIT NUMBER: 2993 TIME_RANGE: 2002-08-24T23:25:57.000Z -- 2002-08-25T01:02:11.000Z SSR FILL AT START: 38.8080 SSR FILL AT END: 41.5520 SSR_DIFF: 2.74400 SUNLIGHT_FRACTION: 0.695185 SAA_FRACTION: 0.00000 MZ_FRACTION: 0.236231 GOES AVG: C1.4 GOES_FRACTION ABOVE A, B, C, M, X

    1.000     1.000     1.000     0.000     0.000

AVG ATTENUATOR_STATE: 1.00000 ATTENUATOR FRACTION IN STATES 0, 1, 3

    0.000     1.000     0.000

All of the outputs printed are available via keyword. Note that the attenuator state, and fraction of time in the given attenuator states are obtained from the obs_summ_flag object, which uses vc3 data, which lags behind the vc1 data. This is being worked on. If you know the orbit number, pass it in using the orbit_in keyword: then the time passed in is ignored, and replaced by a time for that orbit.

ppp = hsi_ssr_fill_per_orbit(orbit_in=2788)

Returns:

ORBIT NUMBER: 2788 TIME_RANGE: 2002-08-11T06:36:34.000Z -- 2002-08-11T08:12:49.000Z SSR FILL AT START: 21.1680 SSR FILL AT END: 23.9120 SSR_DIFF: 2.74400 SUNLIGHT_FRACTION: 0.630996 SAA_FRACTION: 0.00000 MZ_FRACTION: 0.314459 GOES AVG: C1.0 GOES_FRACTION ABOVE A, B, C, M, X

    1.000     1.000     0.452     0.000     0.000

AVG ATTENUATOR_STATE: 0.00000 ATTENUATOR FRACTION IN STATES 0, 1, 3

    1.000     0.000     0.000

The ouput ppp is the change in fill level for that orbit. The fractions are the fraction of time for that orbit that was in the appropriate state, so orbit 2788 had 63.1% sunlught, no SAA, 31% high magnetic latitude. The average GOES level was C1.0; the GOES level was above A an B level the entire orbit, but only above C level for 45.2% of the orbit. The attenuator was in state 0 for the entire orbit.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox