spc¶
spctime¶
stf¶
- class dsmpy.spc.stf.SourceTimeFunction(type: str, half_duration: float, amp_corr=1.0)¶
Represent an earthquake source time function.
- Parameters
type (str) – ‘triangle’ or ‘box car’
half_duration (float) – half duration of the source time function
stfcatalog¶
- class dsmpy.spc.stfcatalog.STFCatalog¶
Utility class to read and save catalog (dict) of source time functions with entries: event_id (str): SourceTimeFunction
- static load(path)¶
Read path into a catalog using pickle.load().
- Parameters
path (str) – name of the file that contains a catalog.
- Returns
- Return type
output (PyDSMOutput)
- static read_from_file(path)¶
Read source time functions from a file.
- Parameters
path (str) – path of a file containing source time function.
The first 3 columns of each row are (informations.) –
event_id ((1)) –
amplitude correction ((3)) –
columns will be ignored. Columns starting with '#' (remaining) –
be ignored. (will) –
- Returns
source time function catalog
- Return type
catalog (dict)
- static read_scardec()¶
Returns the scardec source time function catalog.
- Returns
source time function catalog
- Return type
catalog (dict)
- static save(path, catalog)¶
Save catalog using pickle.dump().
- Parameters
path (str) – name of the output file.
catalog (dict) – source time function catalog.