Univeristy of Alabama in Huntsville


IDL Routines from Phillip Bitzer and UAH Lightning Group

summary     class     fields     routine details     file attributes



LMA, Lightning, ATS509

Given an LMA file which has flash information, this routine reads all the sources as an array of structures. The flash file should have been created by XLMA. The data is an ASCII file, and contains these fields in columns:

{time:0D, lat:0D, lon:0D, alt:0., chi2:0., num_stations:0B, power:0E, flash_number:0US, mask:''}
Also, XLMA has an error when assigning the flash number. Apparently, it uses a signed short integer when an unsigned short (or possibly long integer) should be used. This routine will correct this field to a unsigned integer, so it might not exactly match the value in the file.

On error, a negative one is returned. If successful, a structure with the above fields is returned. This means this can be used to check if the function was run correctly:

lma = ess_import_lma_flash() IF N_TAGS(lma) GT 0 THEN print, 'Good output'
NOTE: There is a more flexible LMA read routine available in the PMB library (pmb_import_lma_data)!


The routine is pretty straightforward:

lma = ess_import_lma_flash() help, lma

Author information


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


Modification History:

First written: Oct 25, 2012 Changed variable naming convention 201310?? PMB


top ess_import_lma_flash

result = ess_import_lma_flash( [file] [, Header=string array])

Main routine to import LMA data processed by XLMA into flashes.

Return value

A n element structure of LMA sources.


file in optional type=string

The file containing LMA data. If it is not provided, a dialog will pop up to ask the user for a file. In this case, file becomes an output parameter.


Header out optional type=string array

The header of the LMA file.

File attributes

Modification date: Tue Mar 25 17:14:03 2014
Lines: 26
Docformat: rst rst