sup3r.qa.stats.Sup3rStatsBase
- class Sup3rStatsBase[source]
Bases:
ABC
Base stats class
Initialize base class for stats
Methods
close
()Close any open file handlers
export
(qa_fp, data)Export stats dictionary to pkl file.
get_node_cmd
(config)Get a CLI call to initialize Sup3rStats and execute the Sup3rStats.run() method based on an input config
load_cache
(file_name)Load data from cache file
save_cache
(array, file_name)Save data to cache file
- classmethod save_cache(array, file_name)[source]
Save data to cache file
- Parameters:
array (ndarray) – Wind field data
file_name (str) – Path to cache file
- classmethod load_cache(file_name)[source]
Load data from cache file
- Parameters:
file_name (str) – Path to cache file
- Returns:
array (ndarray) – Wind field data
- export(qa_fp, data)[source]
Export stats dictionary to pkl file.
- Parameters:
qa_fp (str | None) – Optional filepath to output QA file (only .h5 is supported)
data (dict) – A dictionary with stats for low and high resolution wind fields
overwrite_stats (bool) – Whether to overwrite saved stats or not