General Tools¶
-
phyto_photo_utils._tools.
calculate_blank_FIRe
(file_) Calculates the blank by averaging the fluorescence yield for the saturation phase.
Parameters: file (str) – The path directory to the raw blank file. Returns: res – The blank results: blank, datetime Return type: pandas.DataFrame Example
>>> ppu.calculate_blank_FIRe(file_)
-
phyto_photo_utils._tools.
calculate_blank_FastOcean
(file_, seq_len=100, delimiter=', ') Calculates the blank by averaging the fluorescence yield for the saturation phase.
Parameters: - file (str) – The path directory to the raw blank file in csv format.
- seq_len (int, default=100) – The length of the measurement sequence.
- delimiter (str, default=',') – Specify the delimiter to be used by Pandas.read_csv for loading the raw files.
Returns: res – The blank results.
Return type: pandas.DataFrame
Example
>>> ppu.calculate_blank_FastOcean(file_, seq_len=100)
-
phyto_photo_utils._tools.
correct_fire_instrument_bias
(df, pos=1, sat_len=100) Corrects for instrumentation bias in the relaxation phase by calculating difference between flashlet 0 the relaxation phase & flashlet[pos]. This bias is then added to the relaxation phase.
Parameters: - df (pandas.DataFrame) – A dataframe of the raw data, can either be imported from pandas.read_csv or the output from phyto_photo_utils.load
- pos (int, default=1) – The flashlet number after the start of the phase, either saturation or relaxation, to calculate difference between.
- sat_len (int, default=100) – The length of saturation measurements.
Returns: df – A dataframe of FIRe data corrected for the instrument bias.
Return type: pandas.DataFrame
Example
>>> ppu.correct_fire_bias_correction(df, pos=1, sat_len=100)
-
phyto_photo_utils._tools.
remove_outlier_from_time_average
(df, time=4, multiplier=3) Remove outliers when averaging transients before performing the fitting routines, used to improve the signal to noise ratio in low biomass systems.
The function sets a time window to average over, using upper and lower limits for outlier detection. The upper and lower limits are determined by mean ± std * [1]. The multiplier [1] can be adjusted by the user.
Parameters: - df (pandas.DataFrame) – A dataframe of the raw data, can either be imported from pandas.read_csv or the output from phyto_photo_utils.load
- time (int, default=4) – The time window to average over, e.g. 4 = 4 minute averages
- multiplier (int, default=3) – The multiplier to apply to the standard deviation for determining the upper and lower limits.
Returns: df – A dataframe of the time averaged data with outliers excluded.
Return type: pandas.DataFrame
Example
>>> ppu.remove_outlier_from_time_average(df, time=2, multiplier=3)