eaarl.io.waveforms.collection¶
Handling for a collection of TLD waveform data
-
class
eaarl.io.waveforms.collection.EaarlCollection(edb_file=None, tld_path=None, edb_data=None)[source]¶ Collection of EAARL waveform data.
The collection comprises an EDB file and associated TLD files.
-
__init__(edb_file=None, tld_path=None, edb_data=None)[source]¶ Create an EaarlCollection
- Parameters
- edb_file : string or None
- Path to an EDB file
- tld_path : string or None
- Path to the TLD files
- edb_data : sequence of dicts or None
- Return result from
eaarl.io.waveforms.edb.read().
-
get_rasters(rasters=None, start=None, count=1, ranges=None, progress=True)[source]¶ Retrieve raster data for raster numbers
Returns array of dicts containing the raster data. If start and count are provided, then raster records are provided for the given range. If ranges is provided, then it is treated as a sequence of (start, count) entries. If rasters is provided, it should be a sequence of raster numbers.
- Parameters
- rasters : integer or sequence of integers or None
- Mission data for a flight
- start : integer or None
- Starting raster number
- count : integer, default 1
- Number of rasters to retrieve
- ranges : sequence of tuples
- Sequence of (start, count) tuples.
- progress : tqdm.tqdm or boolean, default True
- If True and if tqdm is available for import, then a progressbar will be displayed during raster reading. Specify False to disable. You can also specify your own instance of tqdm.tqdm (or compatible) for customizing output.
-
get_rasters_by_time(start=None, stop=None, ranges=None, progress=True)[source]¶ Retrieve raster data for given time ranges
Returns array of dicts containing the raster data. If start and stop are provided, then records are returned such that start <= raster time < stop. If ranges is provided, then each tuple of start, stop are used.
- Parameters
- start : numeric or None
- A start time
- stop : numeric or None
- A stop time
- ranges : sequence of tuples or None
- Sequence of (start, stop) tuples
- progress : tqdm.tqdm or boolean, default True
- If True and if tqdm is available for import, then a progressbar will be displayed during raster reading. Specify False to disable. You can also specify your own instance of tqdm.tqdm (or compatible) for customizing output.
-
lookup_rasters_by_time(start=None, stop=None, ranges=None)[source]¶ Lookup raster number for given times
Returns array of raster numbers. If start and stop are provided, then record numbers are returned such that start <= raster time < stop. If ranges is provided, then each tuple of start, stop are used.
- Parameters
- start : numeric or None
- A start time
- stop : numeric or None
- A stop time
- ranges : sequence of tuples or None
- Sequence of start and stop tuples
-
-
eaarl.io.waveforms.collection.collection_open(*args, **kwds)[source]¶ Context manager for an
EaarlCollection.
-
eaarl.io.waveforms.collection.pulses_to_waveforms(pulses)[source]¶ Flatten sequence of pulses for their waveforms
The channel related fields are flattened out for each channel, with each pulse duplicated for each of the channels.
- Parameters
- pulses : sequence of dicts
- Pulse data
Returns sequence of dicts
-
eaarl.io.waveforms.collection.rasters_to_pulses(rasters)[source]¶ Flatten sequence of rasters to sequence of pulses
Raster records contain a pulse entry that is a list of pulse records. This flattens it to combine raster and pulse data for each pulse.
- Parameters
- rasters : sequence of dicts
- Raster data
Returns sequence of dicts
-
eaarl.io.waveforms.collection.rasters_tx_clean(rasters, pos)[source]¶ Cleans up the transmit waveforms
Sets all sample values in the tx waveforms starting at 1-based index pos to the same as the first sample value in the waveform.
- Parameters
- rasters : sequence of dicts
- Sequence of dicts that contain pulse entries, which in turn contain tx entries
- pos : integer
- 1-based index into the transmit waveforms where cleaning should start
-
eaarl.io.waveforms.collection.rasters_wf_flip(rasters)[source]¶ Flips the tx and rx waveforms
EAARL raw waveforms are inverted: high sample values indicate a low response and low sample values indicate a high response. This function flips the values so that low responses have low values and high responses have high values.
- Parameters
- rasters : sequence of dicts
- Sequence of dicts that contain pulse entries, which in turn contain tx and rx entries