ctdam.parser.read_ctd_data module¶
- ctdam.parser.read_ctd_data.create_array_coords(raw_file_data, data_length=0)[source]¶
Sets the datasets coordinates.
- Parameters:
raw_file_data (
SeabirdDataFile) – The raw data source- Return type:
dict
- ctdam.parser.read_ctd_data.create_array_attrs(raw_file_data)[source]¶
Sets the datasets attributes.
- Parameters:
raw_file_data (
SeabirdDataFile) – The raw data source- Return type:
dict
- ctdam.parser.read_ctd_data.sorting_parameters(sensor_pairs, rule=None)[source]¶
Returns sorted parameter for conversion.
- ctdam.parser.read_ctd_data.parse_oxygen_data(name, data, cnv)[source]¶
Returns oxygen data in umol/kg
- Return type:
ndarray
- ctdam.parser.read_ctd_data.read_cnv(path_to_cnv_file, only_header=False)[source]¶
Parse Seabird .cnv data to cf-compliant xarray Dataset.
- Parameters:
path_to_cnv_file (
Path|str) – The path to the .cnv fileonly_header (
bool) – Whether to only parse the header information
- Return type:
Dataset
- ctdam.parser.read_ctd_data.build_sensor_pairs(hex_file, coefficients)[source]¶
Match XMLCON sensors to their raw HEX channels.
Channels 1-5 correspond to f0-f4. Channels 6-13 correspond to v0-v7.
- Return type:
list[tuple[str,ndarray]]
- ctdam.parser.read_ctd_data.read_hex(path_to_hex_file)[source]¶
Parse Seabird .hex data to cf-compliant xarray Dataset.
- Parameters:
path_to_cnv_file (Path | str :) – The path to the .hex file
- Return type:
Dataset
- ctdam.parser.read_ctd_data.sst2xarray(input_path, delimiter=' ')[source]¶
Read CTD data from an SST .TOB data file and create an Xarray Dataset.
Parses SST .TOB files directly into a common Xarray structure with: - “scan” dimension for each measurement row - Data variables incl. metadata - Provenance and common metadata tracking
Based on a MATLAB script written by Johanna Grote and Jens Faber.
- Parameters:
input_path (
Path|str) – The path to the .TOB filedelimiter (
str) – The data file delimiter (default: “ “)
- Return type:
Dataset
- ctdam.parser.read_ctd_data.parse(file_path, downcast_only=False)[source]¶
Parse different file types to a cf-compliant xarray Dataset.
Can handle Seabirds .cnv and .hex file formats and Sea&Suns .TOB file format.
- Parameters:
file_path (
Path|str) – The path to the ctd data file- Return type:
Dataset