Univeristy of Alabama in Huntsville

UAH LTG IDL Library

IDL Routines from Phillip Bitzer and UAH Lightning Group

summary     class     fields     routine details     file attributes

lis/

lis_check_alert.pro

LIS


Every second, LIS data contains information about the spacecraft and instrument. Among other things, this includes an integer that describes any alerts and warnings for that one second time period.

This function takes in a set of alert flags from LIS and decides whether any of the alerts were high. It only looks for the fatal flag and ignores the warning flags.

The parameter of the function is the alert summary, which can be found in the "One Second data." See the example.

For completeness, the alert summary is comprised of (possible) an array of integers. Each bit of each integer corresponds to a different type of alert:

bit 0 : Instrument Fatal 1 : Instrument Warning 2 : Platform Fatal 3 : Platform Warning 4 : External Fatal 5 : External Warning 6 : Processing Fatal 7 : Processing Warning
This function looks at bits 0, 2, 4, 6 to see if they are high. The output is set to zero if so. See the LIS/OTD User's Guide for more information about these flags.

It could be argued that this function should be named lis_is_good or something like that, since a one means no alert and zero means there is an alert. Oh well...

Examples

Suppose you have a variable that contains the name of a LIS file. Then:

oneSec = READ_LIS(lisFIle, /ONE_SECOND, /UTC) isGood = LIS_CHECK_ALERT(oneSec.alert_summary)
Clearly, you can use READ_LIS to read the one second data.

Author information

Author

Phillip M. Bitzer, University of Alabama in Huntsville, pm.bitzer "AT" uah.edu

History

Modification History:

First written: 2012...sometime Added documentation 20140425 PMB Added alerts keyword 20140808 PMB

Routines

top lis_check_alert

result = lis_check_alert(flags [, Indices=array] [, count=long integer] [, alerts=byte array])

This function will check the LIS alert flags and return a one if no alerts are present, zero if not.

Return value

An array of ones (no alert) and zeros (at least one alert high).

Parameters

flags in required type=type

Keywords

Indices out optional type=array

The indices of the "good" one seconds, i.e., the one second times where there are no alerts.

count out optional type=long integer

The number of "good" one seconds.

alerts out optional type=byte array

This will return a 8xn array containing the value of each bit.

File attributes

Modification date: Thu Oct 19 12:53:10 2017
Lines: 16
Docformat: rst rst