scatcluster.structure¶
Classes¶
Module Contents¶
- class scatcluster.structure.Structure[source]¶
- prepare_directory_structure(directories: List[str] | None = None) None[source]¶
Build directory structure required for workflow processing
- Parameters:
directories (List[str], optional) – Directories created as part of the workflow.
['scatterings' (Defaults to) –
'figures' –
'networks' –
'ICA' –
'clustering' –
'data' –
'config']. –
- config_store()[source]¶
Stores the configuration of the current object as a JSON file.
This function creates a dictionary sc_config containing the configuration parameters of the current object. The dictionary includes the following keys: - ‘data_savepath’: The path to the main directory where data is saved. - ‘data_client_path’: The path to the client data. - ‘data_network’: The network name. - ‘data_station’: The station name. - ‘data_location’: The location name. - ‘data_channel’: The channel name. - ‘data_sample_starttime’: The start time of the data sample. - ‘data_sample_endtime’: The end time of the data sample. - ‘data_starttime’: The start time of the data. - ‘data_endtime’: The end time of the data. - ‘data_exclude_days’: The excluded days for the data. - ‘network_segment’: The network segment. - ‘network_step’: The network step. - ‘network_sampling_rate’: The network sampling rate. - ‘network_banks’: The network banks. - ‘network_pooling’: The network pooling. - ‘ica_ev_limit’: The ICA event limit. - ‘ica_min_ICAs’: The minimum number of ICAs. - ‘ica_max_ICAs’: The maximum number of ICAs. - ‘ica_overwrite_previous_models’: Whether to overwrite previous models. - ‘dendrogram_method’: The method for generating the dendrogram. - ‘waveforms_n_samples’: The number of samples for waveforms.
The function then constructs the path to the JSON file by combining the values of ‘data_savepath’, ‘data_network’, ‘data_station’, ‘data_location’, and ‘network_name’. The JSON file is opened in write mode with UTF-8 encoding. The sc_config dictionary is dumped into the JSON file using the json.dump() function. Finally, a message is printed indicating the location where the JSON file was stored.
Parameters: - self: The current object.
Returns: - None
- config_show()[source]¶
Prints the attributes of the object as a dictionary.
- This function prints the attributes of the object as a dictionary using the __dict__ attribute. The attributes
are the instance variables of the object.
- Parameters:
self (object) – The object whose attributes are to be printed.