Mondaic
This API reference is not for the latest stable Salvus version.

salvus.flow.simple_config.stf

Source time functions.

Classes

Custom

class Custom(salvus.flow.simple_config.stf._Base):
    def __init__(self, filename: str, dataset_name: str): ...

Custom source time function.

This function can be used to model arbitrary source time functions.

The source time function is generated from an equidistantly sampled time series, and automatically resampled to the internally used time step during the simulation.

Here is an example:

Parameters
  • filename str — The hdf5 filename of the source. Example: source.h5
  • dataset_name str — The hdf5 dataset name containing the source time function. Example: /stf
Methods
from_array()
def from_array(
    array: Union[numpy.ndarray, List[numpy.ndarray]],
    sampling_rate_in_hertz: float,
    start_time_in_seconds: float = 0.0,
    dataset_name: str = "/stf",
) -> Custom: ...

Create a custom STF by directly passing a numpy array.

Parameters
  • array Union[numpy.ndarray, List[numpy.ndarray]] — The array to use as a source time function. Has to have shape [npts, N] where npts is the just the number of time series samples and N is either the number of source components or 1. Can also be the transposed array or a list of arrays - this function does its best to figure out the correct order/shape for running Salvus.
  • sampling_rate_in_hertz float — The sampling rate in Hz.
  • start_time_in_seconds float — Time of the first sample relative to the simulation start and end times.
  • dataset_name str — The dataset name to use.
Returns Custom
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Delta

class Delta(salvus.flow.simple_config.stf._Base):
    def __init__(self): ...

Delta source time function.

A Dirac pulse emitted at the first time step of the simulation.

Methods
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

FilteredHeaviside

class FilteredHeaviside(salvus.flow.simple_config.stf.Custom):
    def __init__(
        self,
        end_time_in_seconds: float,
        min_frequency_in_hertz: float,
        max_frequency_in_hertz: float,
        start_time_in_seconds: float = 0.0,
        highpass_corners: int = 3,
        lowpass_corners: int = 3,
        zerophase: bool = False,
        sampling_rate_in_hertz: Optional[float] = None,
    ): ...

Specialized custom source time function for filtered heaviside

Parameters
  • end_time_in_seconds float — End time of source wavelet.
  • min_frequency_in_hertz float — Minimum frequency for high pass filter.
  • max_frequency_in_hertz float — Minimum frequency for low pass filter.
  • start_time_in_seconds float — End time of source wavelet.
  • highpass_corners int — High pass filter corners / order.
  • lowpass_corners int — Low pass filter corners / order.
  • zerophase bool — If True, apply filter once forwards and once backwards.
  • sampling_rate_in_hertz Optional[float] — Optionally specify the sampling rate in Hz for full control. If not given it will default to 100 points cycle measured by the maximum frequency.
Methods
from_array()
def from_array(
    array: Union[numpy.ndarray, List[numpy.ndarray]],
    sampling_rate_in_hertz: float,
    start_time_in_seconds: float = 0.0,
    dataset_name: str = "/stf",
) -> Custom: ...

Create a custom STF by directly passing a numpy array.

Parameters
  • array Union[numpy.ndarray, List[numpy.ndarray]] — The array to use as a source time function. Has to have shape [npts, N] where npts is the just the number of time series samples and N is either the number of source components or 1. Can also be the transposed array or a list of arrays - this function does its best to figure out the correct order/shape for running Salvus.
  • sampling_rate_in_hertz float — The sampling rate in Hz.
  • start_time_in_seconds float — Time of the first sample relative to the simulation start and end times.
  • dataset_name str — The dataset name to use.
Returns Custom
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

FlatSpectrumWavelet

class FlatSpectrumWavelet(salvus.flow.simple_config.stf.Custom):
    def __init__(
        self,
        f0: float,
        f1: float,
        f2: float,
        f3: float,
        time_shift_in_seconds: float = 0.0,
    ): ...

Create a source time function with a flattened spectrum.

This type of source is sometimes used in the exploration community as an alternative to a classical Ricker source. Users can specify a set of 4 frequencies: f0, f1, f2, and f3. Frequency components below f0 will be zeroed out, and a cosine “up” ramp will be applied in the frequency domain between f0 and f1. Between f1 and f2 the spectrum is flat, and between f2 and f3 a cosine “down” ramp is again applied in the frequency domain. Frequencies higher than f3 are zeroed out.

As is the case with any finite signal, some ringing will be present in the frequency spectrum. We recommend using the stf.plot() functionality (demonstrated below) in order to validate that the behavior of the generated source is as you expect.

Create a source time function with a flattened spectrum.

Parameters
  • f0 float — Lowest desired frequency (in hertz).
  • f1 float — Low end of flat range (in hertz).
  • f2 float — High end of flat range (in hertz).
  • f3 float — Highest desired frequency (in hertz).
  • time_shift_in_seconds float — Shift the center of the wavelet by this amount in seconds. Defaults to 0.0.
Methods
from_array()
def from_array(
    array: Union[numpy.ndarray, List[numpy.ndarray]],
    sampling_rate_in_hertz: float,
    start_time_in_seconds: float = 0.0,
    dataset_name: str = "/stf",
) -> Custom: ...

Create a custom STF by directly passing a numpy array.

Parameters
  • array Union[numpy.ndarray, List[numpy.ndarray]] — The array to use as a source time function. Has to have shape [npts, N] where npts is the just the number of time series samples and N is either the number of source components or 1. Can also be the transposed array or a list of arrays - this function does its best to figure out the correct order/shape for running Salvus.
  • sampling_rate_in_hertz float — The sampling rate in Hz.
  • start_time_in_seconds float — Time of the first sample relative to the simulation start and end times.
  • dataset_name str — The dataset name to use.
Returns Custom
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

GaussianRate

class GaussianRate(salvus.flow.simple_config.stf._Base):
    def __init__(
        self,
        half_duration_in_seconds: float,
        decay_rate: Optional[float] = None,
        time_shift_in_seconds: Optional[float] = None,
    ): ...

Gaussian rate source time function.

This source time function models a Gaussian for the first time derivative (corresponding to slip rate or moment rate). This source time function itself is given by the error function

s(t)=12+1πt0texp(α(tt0)τ)2dξ,s(t) = \frac{1}{2} + \frac{1}{\sqrt{\pi}} \int_{t_0}^{t} \exp{ \left(- \frac{\alpha (t - t_0)}{\tau} \right)^2} \,d\xi,

where

  • tt is the current time,
  • t0t_0 is an optional time shift (default: 0.0),
  • α\alpha is the decay rate (default 3.5), and
  • τ\tau is the half duration.

Hence, the first time derivative is a Gaussian given by

s(t)=ατπexp(α(ξt0)τ)2.s(t)' = \frac{\alpha}{\tau\sqrt{\pi}} \exp{ \left(- \frac{\alpha (\xi - t_0)}{\tau} \right)^2}.

Here is an example:

Parameters
  • half_duration_in_seconds float — The half duration Example: 1.0
  • decay_rate Optional[float] — The source decay rate. Default: 3.5 Example: 3.5
  • time_shift_in_seconds Optional[float] — Optional time shift to center the ricker wavelet around a time different than zero. Example: 1.0
Methods
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Heaviside

class Heaviside(salvus.flow.simple_config.stf._Base):
    def __init__(self): ...

Heaviside source time function.

s(t)={1tt0,0else,s(t) = \left\{ \begin{array}{cl} 1 & t \geq t_0, \\ 0 & \text{else} \end{array}\right.,

where

  • tt is the current time,
  • t0t_0 is an optional time shift (default: 0.0).
Methods
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Ormsby

class Ormsby(salvus.flow.simple_config.stf.Custom):
    def __init__(
        self,
        f0: float,
        f1: float,
        f2: float,
        f3: float,
        time_shift_in_seconds: float = 0.0,
    ): ...

Create an Ormsby wavelet.

An Ormsby wavelet is designed to have a trapezoidal frequency spectrum that ramps up between f0 and f1, is flat between f1 and f2, and ramps down between f2 and f3. See https://wiki.seg.org/wiki/Ormsby_wavelet for more details.

Create an Ormsby wavelet.

Parameters
  • f0 float — Lowest desired frequency (in hertz).
  • f1 float — Low end of flat range (in hertz).
  • f2 float — High end of flat range (in hertz).
  • f3 float — Highest desired frequency (in hertz).
  • time_shift_in_seconds float — Shift the center of the wavelet by this amount in seconds. Defaults to 0.0.
Methods
from_array()
def from_array(
    array: Union[numpy.ndarray, List[numpy.ndarray]],
    sampling_rate_in_hertz: float,
    start_time_in_seconds: float = 0.0,
    dataset_name: str = "/stf",
) -> Custom: ...

Create a custom STF by directly passing a numpy array.

Parameters
  • array Union[numpy.ndarray, List[numpy.ndarray]] — The array to use as a source time function. Has to have shape [npts, N] where npts is the just the number of time series samples and N is either the number of source components or 1. Can also be the transposed array or a list of arrays - this function does its best to figure out the correct order/shape for running Salvus.
  • sampling_rate_in_hertz float — The sampling rate in Hz.
  • start_time_in_seconds float — Time of the first sample relative to the simulation start and end times.
  • dataset_name str — The dataset name to use.
Returns Custom
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Ricker

class Ricker(salvus.flow.simple_config.stf._Base):
    def __init__(
        self,
        center_frequency: float,
        time_shift_in_seconds: Optional[float] = None,
    ): ...

Ricker source time function.

The Ricker wavelet is the second derivative of a Gaussian, and defined as

s(t)=(12(tt0)2π2ω2)exp((tt0)2π2ω2),s(t) = \left(1 - 2\,(t-t_0)^2\,\pi^2\,\omega^2\right) \, \exp\left(-(t-t_0)^2\,\pi^2\,\omega^2\right),

where

  • tt is the current time,
  • t0t_0 is an optional time shift (default: 0.0), and
  • ω\omega is the center frequency.

Here is an example:

Parameters
  • center_frequency float — The center frequency of the ricker wavelet. Example: 1.0
  • time_shift_in_seconds Optional[float] — Optional time shift to center the ricker wavelet around a time different than zero. Example: 1.0
Methods
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Ricker1stDerivative

class Ricker1stDerivative(salvus.flow.simple_config.stf._Base):
    def __init__(
        self,
        center_frequency: float,
        time_shift_in_seconds: Optional[float] = None,
    ): ...

Normalized first derivative of the Ricker source time function.

See the docstring of the Ricker source time function for the mathematical formula. This function here additionally normalizes the maximum absolute amplitude to 1.0.

Here is an example:

Parameters
  • center_frequency float — The center frequency of the ricker wavelet. Example: 1.0
  • time_shift_in_seconds Optional[float] — Optional time shift to center the ricker wavelet around a time different than zero. Example: 1.0
Methods
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Ricker2ndDerivative

class Ricker2ndDerivative(salvus.flow.simple_config.stf._Base):
    def __init__(
        self,
        center_frequency: float,
        time_shift_in_seconds: Optional[float] = None,
    ): ...

Normalized second derivative of the Ricker source time function.

See the docstring of the Ricker source time function for the mathematical formula. This function here additionally normalizes the maximum absolute amplitude to 1.0.

Here is an example:

Parameters
  • center_frequency float — The center frequency of the ricker wavelet. Example: 1.0
  • time_shift_in_seconds Optional[float] — Optional time shift to center the ricker wavelet around a time different than zero. Example: 1.0
Methods
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

ToneBurst

class ToneBurst(salvus.flow.simple_config.stf.Custom):
    def __init__(
        self,
        center_frequency: float,
        num_cycles: int,
        num_ramp_up_cycles: int = 2,
        num_ramp_down_cycles: int = 2,
        time_shift_in_seconds: float = 0.0,
        allow_overlapping_ramp: bool = False,
    ): ...

Specify a tapered monofrequency tone burst.

This type of source time function is commonly used to simulate ultrasound transducers with a certain resonant frequency. A variable number of sinusoidal cycles can be specified, along with a variable number of cycles over which the amplitude of the burst ramps up and down. Note that use of the ramp necessarily introduces some breadth in the frequency spectrum.

Specify a tapered monofrequency tone burst.

Parameters
  • center_frequency float — The center frequency of the tone burst in Hertz.
  • num_cycles int — The number of cycles to inject at center_frequency.
  • num_ramp_up_cycles int — Apply a shifted cosine taper to slowly ramp up to the full amplitude over this many cycles. Defaults to 2.
  • num_ramp_down_cycles int — Apply a shifted cosine taper to slowly ramp down at the end of the burst over this many cycles. Defaults to 2.
  • time_shift_in_seconds float — Shift the beginning of the burst by this amount. Defaults to 0.0.
  • allow_overlapping_ramp bool — If this is True, and if num_ramp_up_cycles + num_ramp_down_cycles is greater than num_cycles, a ValueError will be thrown.
Methods
from_array()
def from_array(
    array: Union[numpy.ndarray, List[numpy.ndarray]],
    sampling_rate_in_hertz: float,
    start_time_in_seconds: float = 0.0,
    dataset_name: str = "/stf",
) -> Custom: ...

Create a custom STF by directly passing a numpy array.

Parameters
  • array Union[numpy.ndarray, List[numpy.ndarray]] — The array to use as a source time function. Has to have shape [npts, N] where npts is the just the number of time series samples and N is either the number of source components or 1. Can also be the transposed array or a list of arrays - this function does its best to figure out the correct order/shape for running Salvus.
  • sampling_rate_in_hertz float — The sampling rate in Hz.
  • start_time_in_seconds float — Time of the first sample relative to the simulation start and end times.
  • dataset_name str — The dataset name to use.
Returns Custom
from_json()
def from_json(d: Dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_auto_end_time()
def get_auto_end_time(self) -> float: ...

Compute the automatically computed end time for that particular source time function.

If no other end time is specified in the simulation config, that start time will be used.

Returns float
get_auto_start_time()
def get_auto_start_time(self) -> float: ...

Compute the automatically computed start time for that particular source time function.

If no other start time is specified in the simulation config, that start time will be used.

Returns float
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
get_power_spectrum()
def get_power_spectrum(self) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Return the power spectrum for the source time function.

Returns Tuple[numpy.ndarray, numpy.ndarray]
get_stf()
def get_stf(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the numerical values for the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
get_stf_rate()
def get_stf_rate(
    self,
    sampling_rate_in_hertz: Optional[float] = None,
    start_time_in_seconds: Optional[float] = None,
    end_time_in_seconds: Optional[float] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray]: ...

Get the first time derivative of the source time function.

Parameters
  • sampling_rate_in_hertz Optional[float] — Sampling rate. If not given, it will be computed automatically.
  • start_time_in_seconds Optional[float] — The start time. If not given, it will be computed automatically.
  • end_time_in_seconds Optional[float] — The end time. If not given, it will be computed automatically.
Returns Tuple[numpy.ndarray, numpy.ndarray] — A tuple of two numpy arrays: The time values and the numerical values of the source time function.
plot()
def plot(self, show: bool = True) -> Optional[matplotlib.figure.Figure]: ...

Plot the STF and its power spectrum.

Parameters
  • show bool — Show the plot, otherwise return the figure.
Returns Optional[matplotlib.figure.Figure]
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — 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.
Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None