Skip to content

neptoon.columns

column_information

Classes:

Functions:

ColumnInfo

Used for storing information related to the cols in CRNS time series data. The names of columns are stored here providing a clean area to update column names and have this applied across the code base.

TODO: Ideas for improvements: - Add information on whether a col is 'supplied' or 'calculated' - Use this information to organise order of 'calculated' columns

Name

Bases: Enum

All of the columns that neptoon could use during any of its methods. It provides a place to store relevant information about columns. A key aspect is it allows a user to change the expected column names during processing without needing to change the codebase. By storing as an Enum IDEs can offer autofill when typing ColumnInfo.Name....

The user calls it by requesting the string representation of a column name:

Example

crns_data_frame[str(ColumnInfo.Name.SOIL_MOISTURE)] = 1

relabel classmethod

relabel(column_name, new_label)

Class method which allows a user to change the expected string of a column type.

Parameters:

Name Type Description Default
column_name Name

The Name of the column e.g., Name.EPI_NEUTRON_COUNT

required
new_label str

A string that represents the new column name to expect throughout processing.

required

reset_labels classmethod

reset_labels()

Class method to reset all the labels to default values supplied in neptoon.

get_col_name classmethod

get_col_name(column_name)

Method to return the string representation of the name of a Column

Parameters:

Name Type Description Default
column_name str

The enum object from which the name is required

required

Returns:

Type Description
str

The string representation of the name.