Processing

This defines generic processing functions to ease calls from executables.

If interacting with the API, most processing steps should probably be called by using methods on RadarData objects, so see that documentation for most of your needs. However, you may need to concatenate, which is defined separately because it acts on multiple objects.

While the process and process_and_exit directives can be used, they are generally not as useful as the direct calls.

impdar.lib.process.concat(radar_data)

Concatenate all radar data input.

Parameters

radar_data (list of RadarData) – Objects to concatenate

Returns

A single, concatenated output.

Return type

RadarData

impdar.lib.process.process(RadarDataList, interp=None, rev=False, vbp=None, hfilt=None, ahfilt=None, nmo=None, crop=None, hcrop=None, restack=None, denoise=None, migrate=None, **kwargs)

Perform one or more processing steps on a list of RadarData .

Parameters
  • RadarDataList (list of strs) – The ~impdar.RadarData objects to process

  • rev (bool, optional) – Reverse the profile orientation. Default is False.

  • vbp (2-tuple, optional) – Vertical bandpass between (vbp1, vbp2) MHz. Default None (no filtering).

  • hfilt (2-tuple, optional) – Horizontal filter subtracting average trace between (hfilt1, hfilt2). Default is None (no hfilt).

  • ahfilt (bool, optional) – Adaptively horizontally filter the data.

  • denoise (bool, optional) – denoising filter (only wiener for now).

  • migrate (string, optional) – Migrates the data.

Returns

processed – If True, we did something, if False we didn’t

Return type

bool

impdar.lib.process.process_and_exit(fn, cat=False, filetype='mat', o=None, **kwargs)

Perform one or more processing steps, save, and exit.

Parameters
  • fn (list of strs) – The filename(s) to process.

  • cat (bool, optional) – If True, concatenate files before processing rather than running through each individually.

  • filetype (str, optional) – The type of input file. Default is .mat.

  • o (str, optional) – An output path

  • kwargs – These are the processing arguments for process