Skip to content

Utils

Common constants and functions for AQG data analysis

AQG_SENSITIVITY = 500 module-attribute

Nominal AQG sensitivity, nm/s²*sqrt(Hz)

aqg_dtypes(names)

Change data types of columns to save memory space

Parameters:

Name Type Description Default
names list[str]

Column names.

required

Returns:

Type Description
dict

Mapping of column name to new data type.

clean_aqg_dataframe(df)

Clean dataframe of AQG rawdata from a CSV file

Parameters:

Name Type Description Default
df DataFrame

Input dataframe, modified in place.

required

merge_aqg_raw_dataframes(df_raw, df_preprocessed)

Merge dataframes of AQG rawdata and preprocessed data

The AQG rawdata folder contains CSV files of the full raw data and CSV files of preprocessed data in intervals with additional temperature columns. This function merges the dataframes into one for easier handling.

Argument df_raw is modified in place.

read_aqg_csvs(paths)

Read multiple .csv files of AQG raw data.

Parameters:

Name Type Description Default
paths list[str | Path | Path]

Paths of .csv files to read.

required

Returns:

Type Description
Dataframe

Data read from .csv files.

rename_columns(names)

Rename column names to shorten and remove symbols

Parameters:

Name Type Description Default
names list[str]

Original column names.

required

Returns:

Type Description
dict

Mapping of original to new column names.