salvus.project.configuration.processing
Classes
ProcessingConfiguration
ProcessingConfigurationclass ProcessingConfiguration(
salvus.flow.utils.serialization_helpers.SerializationMixin
):
def __init__(
self,
name: str,
data_source_name: str,
processing_function: Union[str, Callable],
):
...Define processing within SalvusProject with a function. Any function with a suitable signature is acceptable.
The function must take the following arguments:
st: Anobspy.Streamobject 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: Anobspy.Inventoryobject 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.
Parameters
namestr — Name of the processing configuration.data_source_namestr — Name of the original data source.processing_functionUnion[str, Callable] — The actual function.
Methods
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
Parameters
dDict — Dictionary containing its init parameters and a few other things.
Returns Any
to_json()
to_json()def to_json(self) -> Dict:
...Convert object to a JSON-serializable dictionary.
Returns Dict