ctdam.parser.bottlelogfile module

class ctdam.parser.bottlelogfile.BottleLogFile(path_to_file, create_dataframe=False)[source]

Bases: DataFile

Bottle Log file (.bl) representation, that extracts the three different data types from the file: reset time and the table with bottle IDs and corresponding data ranges.

Parameters:
  • path_to_file (Path | str) – Path to .bl file

  • create_dataframe (bool) – Whether to parse as dataframe

data_whitespace_removal()[source]

Strips the input from whitespace characters, in this case especially newline characters.

Return type:

list

obtaining_reset_time()[source]

Reading reset time with small input check.

Return type:

datetime

create_list()[source]

Creates a list of usable data from the list specified in self.data. the list consists of: an array of ID’s representing the bottles, the date and time of the data sample and the lines of the cnv corresponding to the bottles

Return type:

list

convert_date(date)[source]

Converts the Dates of the .bl files to an ISO 8601 standard

Parameters:

date (str) – The date to convert

Return type:

a string with the date in the form of “yymmddThhmmss”

create_dataframe()[source]

Creates a dataframe from the list specified in self.data.

Return type:

DataFrame