tscfat.Utils package¶
Submodules¶
tscfat.Utils.analysis_parameters module¶
Created on Mon Mar 22 11:26:36 2021
@author: ikaheia1
A helper class for storing the parameters used in the analysis. The parameters are stored in the __dict__ dictionary by using an alias name as the key.
-
class
tscfat.Utils.analysis_parameters.AnalysisParameters[source]¶ Bases:
object
tscfat.Utils.argument_loader module¶
Created on Fri Nov 20 14:31:11 2020
@author: ikaheia1
Helper functions for pytest test data loading. Load a csv file and convert it using separate loading functions for:
Numpy array format
Pandas series format
Pandas dataframe format
-
tscfat.Utils.argument_loader.setup_np()[source]¶ Load the test data and convert the values into 1D numpy array.
- Returns
A 1D numpy array containing the test data time series.
- Return type
_ = numpy array
tscfat.Utils.doi2int module¶
Created on Tue Mar 23 11:46:24 2021
@author: ikaheia1
A helper function for converting the datetime to indices used for plotting.
-
tscfat.Utils.doi2int.doi2index(doi, df)[source]¶ Convert given range given in datetime objects into corresponding Matplotlib indices, that are used to highligh the region in analysis figures.
- Parameters
doi (tuple) – Contain two datetime objects.
df (pandas DataFrame) – A dataframe with datetime index.
- Returns
ind_s (float) – Starting index. Number of days since the unix time epoch.
ind_e (float) – End index. Number of days since the unix time epoch.
tscfat.Utils.file_names module¶
Created on Mon Mar 22 11:26:36 2021
@author: ikaheia1
A helper class for storing the filenames / paths used in the analysis. The filenames are stored in the __dict__ dictionary by using an alias name as the key.
-
class
tscfat.Utils.file_names.FileNames[source]¶ Bases:
object
tscfat.Utils.plot_decorator module¶
Created on Fri Jan 8 15:49:55 2021
@author: ikaheia1
Function wrapper for handling the plotting of figure or saving it to the destined folder.
-
tscfat.Utils.plot_decorator.plot_decorator(func)[source]¶ Save the plot figure if savename and path are in function keyword arguments.
- Parameters
func (function) – Plotting function to be decorated.
- Raises
Exception – Requested folder does not exist og the agruments are not given in correct way.
- Returns
wrapper – Wrapped plotting function.
- Return type
function wrapper
tscfat.Utils.process_decorator module¶
Created on Thu Mar 25 10:23:43 2021
@author: arsi
Function wrapper for iterating dataframe columns.