aerosoltools.loaders.Load_OPS_file

aerosoltools.loaders.Load_OPS_file(file, extra_data=False)

Load data from an OPS (Optical Particle Sizer) file and route to the appropriate parser.

This function inspects the file header and determines whether the file was exported via the AIM software or directly from the instrument. Based on this, it dispatches to the correct loader: Load_OPS_AIM or Load_OPS_Direct.

Parameters

filestr

Path to the OPS data file.

extra_databool, optional

If True, attaches unused columns to the returned object as ._extra_data. Passed directly to the underlying loader. Default is False.

Returns

OPSAerosol2D

A class containing size-resolved particle data and instrument metadata.

Raises

Exception

If the file type cannot be identified from the header.

Notes

  • This function depends on Com.detect_delimiter() and assumes either AIM-exported or direct instrument export file formats.

  • If new formats are introduced, this function should be updated accordingly.

Parameters:
  • file (str)

  • extra_data (bool)