Univeristy of Alabama in Huntsville


IDL Routines from Phillip Bitzer and UAH Lightning Group

summary     class     fields     routine details     file attributes




LMA data is saved into text files, but the format of the files is not very uniform. This routine will try to automagically determine the format and import the data. The files can be Gzipped. This routine has been tested with files from the North Alabama Lightning Mapping Array and output from the flash algorithms from McCaul and XLMA. On error, 0 is returned.

The main routine is pmb_import_lma_data.


Provide an example

Files tested: ALAOUT_070301_165500_0300.dat.new0 (mccaul)

Author information


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


Modification History:

First written (again): Aug 20, 2012 Added formal error catcher. Cleaned doc 20121016 PMB More doc cleaning 20121016 PMB Fixed bug when reading in McCaul data 20121215 PMB Added quiet keyword 20121217 PMB Changed from "source" structure definition to `pmb_lma_source`__define Added `file_type` keyword to force the read of a particular type of file. 20140430 PMB (well, this is when it was committed) Deprecate the use of "best_binary" in favor of `PMB_BINARY`. Also fixed some of the documentation 20140910 PMB Add ability to load in XLMA files with flash data. I try to figure this out on the fly, but YMMV. 20150904 PMB


top pmb_import_lma_data

result = pmb_import_lma_data(files [, /Convert_Time] [, Header=string array] [, /Only_header] [, File_type=string] [, /Quiet])

The main routine. Given a set of LMA files, return a structure.

Return value

A structure is returned, with fields as defined in source__define


files in required type=string array

The files to be imported. These can be gzipped.


Convert_Time in optional type=boolean default=0

If set, the time is returned as number of seconds past Jan 1, 1970. Otherwise, the time is the same as what is in the file (usually seconds past midnight)

Header out optional type=string array

the header of the file

Only_header in optional type=boolean default=0

If set, only the header is returned. NOTE: THIS IS NOT FUNCTIONAL RIGHT NOW

File_type in optional type=string

Force the routine to read a certain file. Useful when the file type cannot be determined from the header. Allowed values are: 'xlma', 'mcaul', 'nalma'

Quiet in optional type=boolean default=0

If this is set, the time for import is not printed to the console

Other attributes


Valid_num (IDLAstro library), pmb_binary, pmb_lma_source__define

File attributes

Modification date: Tue Feb 21 14:44:11 2017
Lines: 151
Docformat: rst rst