Developer Reference Manual#

Release:

1.5.0

Date:

May 08, 2024

This is the developer reference guide for PySP2 which covers most of the available functions, modules, and classes.

io module#

pysp2.io#

This module contains all of the procedures for reading and writing SP2 data.

read_hk_file(file_name)

This procedure will read in an SP2 housekeeping file and then store the timeseries data into a pandas DataFrame.

get_hk_variable_names(my_df)

This procedure will return al ist of variables in the housekeeping file.

read_sp2(file_name[, debug, arm_convention])

Loads a binary SP2 raw data file and returns all of the wave forms into an xarray Dataset.

read_config(file)

This loads the INI file into an easy to use ConfigParser() object.

write_dat(ds, file_name)

This writes the .dat files that generate the intermediate parameters used by the Igor processing.

write_dat_concs(ds, file_name)

This writes the .dat files for the mass and number concentrations by the Igor processing.

write_dat_concs_arm(ds, file_name, location, ...)

Write the SP2 size distribution and mass concentration in the standard ARM convention.

read_dat(file_name, type)

This reads the .dat files that generate the intermediate parameters used by the Igor processing.

read_arm_dat(file_name[, num_bins])

This reads mass and number distribution data that has been stored in the format used in the ARM Archive.

read_calibration(directory)

This reads data from a bead calibration from the SP2.

testing module#

pysp2.tests (pysp2.tests)#

This module contains links to test files for PySP2

util module#

pysp2.util#

These subroutines contain the utilities for calculating particle statistics from SP2 data.

gaussian_fit(my_ds, config[, parallel, ...])

Does Gaussian fitting for each wave in the dataset.

DMTGlobals([cal_file_name])

This class stores the default parameters used for particle processing.

calc_diams_masses(input_ds[, debug, factor, ...])

Calculates the scattering and incandescence diameters/BC masses for each particle.

process_psds(particle_ds, hk_ds, config[, ...])

Processes the Scattering and BC mass size distributions:

vis module#

pysp2.vis#

This module contains visualization subroutines for SP2 data.

plot_wave(ds, record_no, chn[, plot_fit, ...])

Plots the raw waveform for a given record_no and channel.