ctdfjorder.CTD.CTD.remove_non_positive_samples(self) None#

Removes rows with non-positive values for depth, pressure, practical salinity, absolute salinity, or density.

Raises:

NoSamplesError – When the function is called on a CTD object with no data.

Notes

This method cleans the CTD (Conductivity, Temperature, Depth) dataset by removing any samples that have non-positive values for key parameters. Non-positive values in these parameters are generally invalid and indicate erroneous measurements.

Let \(( x_i )\) represent the value of a parameter (depth, pressure, practical salinity, absolute salinity, or density) at the \(( i )\)-th sampling event. The condition for retaining a data point is given by:

\[x_i > 0 \quad \text{and} \quad x_i \neq \text{NaN} \quad \text{and} \quad x_i \neq \text{null}\]

Rows not satisfying this condition for any of the parameters are removed.

Examples

ctd_data = CTD('example.csv')
ctd_data.remove_non_positive_samples()
# This will clean the dataset by removing samples with non-positive, null, or NaN values
# for the specified key parameters.

See also

remove_invalid_salinity_values

method to remove salinity values < 10 PSU.