Required
project| Type: | Project |
| Description: | The project for the component. |
class SeismologyActionComponent(builtins.object):
def __init__(self, project: Project): ...| Type: | Project |
| Description: | The project for the component. |
def add_asdf_file(
self,
filename: pathlib.Path | str,
data_name: str,
receiver_fields: list[str],
event_name: str | None = None,
) -> None: ...| Type: | pathlib.Path | str |
| Description: | Path to the ASDF file. |
| Type: | str |
| Description: | Name of the data set within the project. |
| Type: | list[str] |
| Description: | Receiver fields for the new to be created receivers. |
| Type: | str | None |
| Default value: | None |
| Description: | Specify a custom event name. If not given it will automatically derive a descriptive event name. |
WindowAndWeight component in SalvusProject.def add_receiver_weights_to_windows(
self,
data_selection_configuration: str,
events: (
str
| collections.abc.Sequence[str]
| Event
| collections.abc.Sequence[Event]
| EventCollection
),
weighting_chain: list[dict],
normalize: bool,
) -> None: ...| Type: | str |
| Description: | Name of the data selection configuration. |
| Type: | str | collections.abc.Sequence[str] | Event | collections.abc.Sequence[Event] | EventCollection |
| Description: | Events to pick weights for. |
| Type: | list[dict] |
| Description: | A list of weighting functions to be applied in order. Weights from different functions will be multiplied together. |
| Type: | bool |
| Description: | If True (recommended) normalize the sum of all weights to be equal to the receiver count after the all weighting functions have been applied. |
def download_data_for_event(
self,
data_name: str,
event: str | Event,
add_receivers_to_project_event: bool,
receiver_fields: list[str] | None = None,
seconds_before_event: salvus._core.types.float_,
seconds_after_event: salvus._core.types.float_,
download_providers: collections.abc.Sequence[str] | None = None,
channel_priorities: typing.Sequence[str] = (
"BH[Z,N,E,1,2,3]",
"LH[Z,N,E,1,2,3]",
"HH[Z,N,E,1,2,3]",
"EH[Z,N,E,1,2,3]",
"MH[Z,N,E,1,2,3]",
),
location_priorities: typing.Sequence[str] = (
"",
"00",
"10",
"20",
"01",
"02",
),
minimum_interstation_distance_in_m: salvus._core.types.float_ = 1000.0,
network: str | None = None,
station: str | None = None,
location: str | None = None,
channel: str | None = None,
) -> None: ...| Type: | str |
| Description: | The name the data set will have in the project. |
| Type: | str | Event |
| Description: | The event. |
| Type: | bool |
| Description: | Add new receivers to the project or not. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | Receiver fields. |
| Type: | salvus._core.types.float_ |
| Description: | Use this many seconds before the event. |
| Type: | salvus._core.types.float_ |
| Description: | Use this many seconds after the event. |
| Type: | collections.abc.Sequence[str] | None |
| Default value: | None |
| Description: | Download providers. |
| Type: | typing.Sequence[str] |
| Default value: | ('BH[Z,N,E,1,2,3]', 'LH[Z,N,E,1,2,3]', 'HH[Z,N,E,1,2,3]', 'EH[Z,N,E,1,2,3]', 'MH[Z,N,E,1,2,3]') |
| Description: | Channel priority list. |
| Type: | typing.Sequence[str] |
| Default value: | ('', '00', '10', '20', '01', '02') |
| Description: | Location priority list. |
| Type: | salvus._core.types.float_ |
| Default value: | 1000.0 |
| Description: | Minimum interstation distance in meters. |
| Type: | str | None |
| Default value: | None |
| Description: | Only use these network codes if specified. |
| Type: | str | None |
| Default value: | None |
| Description: | Only use these station codes if specified. |
| Type: | str | None |
| Default value: | None |
| Description: | Only use these location codes if specified. |
| Type: | str | None |
| Default value: | None |
| Description: | Only use these channel codes if specified. |
max_count elements have been added or until
min_distance_in_meter or some other constraint can no longer be
satisfied. The first event will always be random if the project does
not yet have any events.def get_events_from_csv_catalog_file(
self,
filename: pathlib.Path,
max_count: salvus._core.types.int_,
min_moment_magnitude: salvus._core.types.float_,
max_moment_magnitude: salvus._core.types.float_,
min_distance_in_meters: salvus._core.types.float_,
min_year: salvus._core.types.int_,
max_year: salvus._core.types.int_,
random_seed: salvus._core.types.int_ | None = None,
) -> EventCollection: ...| Type: | pathlib.Path |
| Description: | Path to the CSV file. |
| Type: | salvus._core.types.int_ |
| Description: | Get at max this many events. Less events might be returned if any of the other constraints can no longer be fulfilled. |
| Type: | salvus._core.types.float_ |
| Description: | Lower magnitude bound for the chosen events. |
| Type: | salvus._core.types.float_ |
| Description: | Upper magnitude bound for the chosen events. |
| Type: | salvus._core.types.float_ |
| Description: | Minimum acceptable great-circle distance in meters between any two events. |
| Type: | salvus._core.types.int_ |
| Description: | Minimum year from which to choose events. |
| Type: | salvus._core.types.int_ |
| Description: | Maximum year from which to choose events. |
| Type: | salvus._core.types.int_ | None |
| Default value: | None |
| Description: | The first event is randomly chosen if the project does not yet contain any events. Specify a seed to make it reproducible. Useful for test and potentially tutorials. |
def get_events_with_windows(
self, data_selection_configuration_name: str
) -> list[str]: ...| Type: | str |
| Description: | Name of the data selection configuration. |
def pick_windows(
self,
data_selection_configuration: str,
observed_data_name: str,
synthetic_data_name: str,
events: (
str
| collections.abc.Sequence[str]
| Event
| collections.abc.Sequence[Event]
| EventCollection
),
receiver_field: str,
window_taper_width_in_seconds: salvus._core.types.float_,
taper_type: str = "hanning",
window_picking_function: str | collections.abc.Callable,
window_picking_function_kwargs: dict[str, typing.Any],
save_results_in_project: bool = True,
receiver_name_pattern: str | None = None,
overwrite: bool = False,
) -> list[EventWindowAndWeightSet]: ...| Type: | str |
| Description: | Name of the data selection configuration. If it does not exist yet, it will be created, otherwise a new one will be created. |
| Type: | str |
| Description: | Name of the data set to be considered observed data. |
| Type: | str |
| Description: | Name of the data set to be considered synthetic data. |
| Type: | str | collections.abc.Sequence[str] | Event | collections.abc.Sequence[Event] | EventCollection |
| Description: | List of events to pick windows for. |
| Type: | str |
| Description: | Receiver field name on which to pick the windows. |
| Type: | salvus._core.types.float_ |
| Description: | Taper width in seconds when the windows will be applied to the data. The taper width will never be larger than half a window length. This is just passed on to the to be created EventWindowAndWeightSet. |
| Type: | str |
| Default value: | 'hanning' |
| Description: | The type of taper to use. Currently only "hanning" is supported which will use the classical cosine bell Hann/Hanning window. Will default to "hanning" if not given. This is just passed on to the to be created EventWindowAndWeightSet. |
| Type: | str | collections.abc.Callable |
| Description: | Either the string "built-in" in which case the built-in window picking function is used or an actual function which will be called for each receiver component. |
| Type: | dict[str, typing.Any] |
| Description: | Additional keyword arguments to be passed to the window picking function. |
| Type: | bool |
| Default value: | True |
| Description: | Optionally choose not to save the results in the current project. This is useful when debugging window picking algorithms and trying to find the best settings. |
| Type: | str | None |
| Default value: | None |
| Description: | Optionally specify a wildcarded receiver name pattern so only windows for matching receivers will be picked. Most useful for debugging and when save_results_in_project is False. |
| Type: | bool |
| Default value: | False |
| Description: | If True potentially already existing window sets for individual will be overwritten with freshly picked windows. |