Version:

salvus.project.configuration.processing.seismology

salvus.project.configuration.processing.seismology salvus project configuration processing seismology
Seismological processing configurations.

Classes

BasicBandpassProcessingConfiguration

Keeps track of the initial arguments passed to an objects and can later on serialize them to JSON document.
It will only consider whatever is passed in the init.
Basic processing that detrends, tapers, and filters.
SIGNATURE
class BasicBandpassProcessingConfiguration(
    salvus.project.configuration.processing.seismology.SeismologyProcessingConfiguration
):
    def __init__(
        self,
        name: str,
        data_source_name: str,
        bandpass_minimum_frequency: float,
        bandpass_maximum_frequency: float,
        bandpass_filter_corners: int = 0,
        highpass_filter_corners: int = 4,
        lowpass_filter_corners: int = 4,
        taper_percentage: float = 0.05,
        zerophase: bool = False,
    ): ...
ARGUMENTS
Required
name
Type:str
Description:
Processing configuration name.
Required
data_source_name
Type:str
Description:
Name of the data source.
Required
bandpass_minimum_frequency
Type:float
Description:
Minimum frequency of the bandpass filter.
Required
bandpass_maximum_frequency
Type:float
Description:
Maximum frequency of the bandpass filter.
Optional
bandpass_filter_corners
Type:int
Default value:0
Description:
Corners of the bandpass filter.
Optional
highpass_filter_corners
Type:int
Default value:4
Description:
Corners of the highass filter.
Optional
lowpass_filter_corners
Type:int
Default value:4
Description:
Corners of the lowpass filter.
Optional
taper_percentage
Type:float
Default value:0.05
Description:
Taper percentage.
Optional
zerophase
Type:bool
Default value:False
Description:
Zerophase.

Class Methods

BasicBandpassProcessingConfiguration.from_json()
Recreate the object from a dictionary serialization of its initialization parameters.
SIGNATURE
def from_json(d: builtins.dict) -> Any: ...
ARGUMENTS
Required
d
Type:builtins.dict
Description:
Dictionary containing its init parameters and a few other things.

Methods

BasicBandpassProcessingConfiguration.to_json()
Convert object to a JSON-serializable dictionary.
SIGNATURE
def to_json(
    self,
    external_file_hash: str | None = None,
    timer: Timer | None = None,
    log_to_logger: bool = False,
    comm: int | None = None,
) -> dict: ...
ARGUMENTS
Optional
external_file_hash
Type:str | None
Default value:None
Description:
Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
Optional
timer
Type:Timer | None
Default value:None
Description:
Execution timer.
Optional
log_to_logger
Type:bool
Default value:False
Description:
Log timings to the logger.
Optional
comm
Type:int | None
Default value:None
Description:
MPI communicator, if any.

BasicBandpassRemoveResponseProcessingConfiguration

Keeps track of the initial arguments passed to an objects and can later on serialize them to JSON document.
It will only consider whatever is passed in the init.
Basic processing which removes the response and applies a Butterworth bandpass filter.
SIGNATURE
class BasicBandpassRemoveResponseProcessingConfiguration(
    salvus.project.configuration.processing.seismology.SeismologyProcessingConfiguration
):
    def __init__(
        self,
        name: str,
        data_source_name: str,
        bandpass_minimum_frequency: float,
        bandpass_maximum_frequency: float,
        units: str,
        bandpass_filter_corners: int = 0,
        highpass_filter_corners: int = 0,
        lowpass_filter_corners: int = 0,
        pre_filter: tuple[float, float, float, float],
        water_level: int = 200,
        taper_percentage: float = 0.05,
        zerophase: bool = False,
    ): ...
ARGUMENTS
Required
name
Type:str
Description:
Processing configuration name.
Required
data_source_name
Type:str
Description:
Name of the data source.
Required
bandpass_minimum_frequency
Type:float
Description:
Minimum frequency of the bandpass filter.
Required
bandpass_maximum_frequency
Type:float
Description:
Maximum frequency of the bandpass filter.
Required
units
Type:str
Description:
Desired output units.
Optional
bandpass_filter_corners
Type:int
Default value:0
Description:
Corners of the bandpass filter.
Optional
highpass_filter_corners
Type:int
Default value:0
Description:
Corners of the highass filter.
Optional
lowpass_filter_corners
Type:int
Default value:0
Description:
Corners of the lowpass filter.
Required
pre_filter
Type:tuple[float, float, float, float]
Description:
Pre-filter settings.
Optional
water_level
Type:int
Default value:200
Description:
Water level in dB.
Optional
taper_percentage
Type:float
Default value:0.05
Description:
Taper percentage.
Optional
zerophase
Type:bool
Default value:False
Description:
Zerophase.

Class Methods

BasicBandpassRemoveResponseProcessingConfiguration.from_json()
Recreate the object from a dictionary serialization of its initialization parameters.
SIGNATURE
def from_json(d: builtins.dict) -> Any: ...
ARGUMENTS
Required
d
Type:builtins.dict
Description:
Dictionary containing its init parameters and a few other things.

Methods

BasicBandpassRemoveResponseProcessingConfiguration.to_json()
Convert object to a JSON-serializable dictionary.
SIGNATURE
def to_json(
    self,
    external_file_hash: str | None = None,
    timer: Timer | None = None,
    log_to_logger: bool = False,
    comm: int | None = None,
) -> dict: ...
ARGUMENTS
Optional
external_file_hash
Type:str | None
Default value:None
Description:
Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
Optional
timer
Type:Timer | None
Default value:None
Description:
Execution timer.
Optional
log_to_logger
Type:bool
Default value:False
Description:
Log timings to the logger.
Optional
comm
Type:int | None
Default value:None
Description:
MPI communicator, if any.

CustomSeismologyProcessingConfiguration

Keeps track of the initial arguments passed to an objects and can later on serialize them to JSON document.
It will only consider whatever is passed in the init.
Custom processing function. Any function with a suitable signature is acceptable.
The function must take the following arguments:
  • st: An obspy.Stream object with the data.
  • receiver: The receiver object for the receiver.
  • sources: All sources for the event.
In the case of seismological data it can also optionally take:
  • inv: An obspy.Inventory object for the station in case it is stored in an ASDF file. Might be None.
The function must return the processed obspy.Stream object which must contain exactly the same number of traces.
SIGNATURE
class CustomSeismologyProcessingConfiguration(
    salvus.project.configuration.processing.seismology.SeismologyProcessingConfiguration
):
    def __init__(
        self,
        name: str,
        data_source_name: str,
        processing_function: str | typing.Callable,
    ): ...
ARGUMENTS
Required
name
Type:str
Description:
Name of the processing configuration.
Required
data_source_name
Type:str
Description:
Name of the original data source.
Required
processing_function
Type:str | typing.Callable
Description:
The actual function.

Class Methods

CustomSeismologyProcessingConfiguration.from_json()
Recreate the object from a dictionary serialization of its initialization parameters.
SIGNATURE
def from_json(d: builtins.dict) -> Any: ...
ARGUMENTS
Required
d
Type:builtins.dict
Description:
Dictionary containing its init parameters and a few other things.

Methods

CustomSeismologyProcessingConfiguration.to_json()
Convert object to a JSON-serializable dictionary.
SIGNATURE
def to_json(
    self,
    external_file_hash: str | None = None,
    timer: Timer | None = None,
    log_to_logger: bool = False,
    comm: int | None = None,
) -> dict: ...
ARGUMENTS
Optional
external_file_hash
Type:str | None
Default value:None
Description:
Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
Optional
timer
Type:Timer | None
Default value:None
Description:
Execution timer.
Optional
log_to_logger
Type:bool
Default value:False
Description:
Log timings to the logger.
Optional
comm
Type:int | None
Default value:None
Description:
MPI communicator, if any.

SeismologyProcessingConfiguration

Keeps track of the initial arguments passed to an objects and can later on serialize them to JSON document.
It will only consider whatever is passed in the init.
Define processing within SalvusProject with a function. Any function with a suitable signature is acceptable.
For block processing, the function must take the following arguments:
  • data_array: An xarray.DataArray object with the data.
  • event: The corresponding event.
Or, if the processing should be applied per receiver:
  • st: An obspy.Stream object with the data.
  • receiver: The receiver object for the receiver.
  • sources: All sources for the event.
In the case of seismological data it can also optionally take:
  • inv: An obspy.Inventory object for the station in case it is stored in an ASDF file. Might be None.
The function must return the processed xarray.DataArray or obspy.Stream object which must contain exactly the same number of traces.
SIGNATURE
class SeismologyProcessingConfiguration(
    salvus.project.configuration.processing.ProcessingConfiguration
):
    def __init__(
        self,
        name: str,
        data_source_name: str,
        processing_function: str | typing.Callable,
    ): ...
ARGUMENTS
Required
name
Type:str
Description:
Name of the processing configuration.
Required
data_source_name
Type:str
Description:
Name of the original data source.
Required
processing_function
Type:str | typing.Callable
Description:
The actual function.

Class Methods

SeismologyProcessingConfiguration.from_json()
Recreate the object from a dictionary serialization of its initialization parameters.
SIGNATURE
def from_json(d: builtins.dict) -> Any: ...
ARGUMENTS
Required
d
Type:builtins.dict
Description:
Dictionary containing its init parameters and a few other things.

Methods

SeismologyProcessingConfiguration.to_json()
Convert object to a JSON-serializable dictionary.
SIGNATURE
def to_json(
    self,
    external_file_hash: str | None = None,
    timer: Timer | None = None,
    log_to_logger: bool = False,
    comm: int | None = None,
) -> dict: ...
ARGUMENTS
Optional
external_file_hash
Type:str | None
Default value:None
Description:
Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
Optional
timer
Type:Timer | None
Default value:None
Description:
Execution timer.
Optional
log_to_logger
Type:bool
Default value:False
Description:
Log timings to the logger.
Optional
comm
Type:int | None
Default value:None
Description:
MPI communicator, if any.
PAGE CONTENTS