Windows Component¶
With varying data quality and the non-linearity of full-waveform inversion the data need to be windowed. LASIF has an automatic window picker which decides when data is worth comparing to synthetics.
Contents:
-
class
lasif.components.windows.
WindowsComponent
(communicator, component_name)[source]¶ Component dealing with the windows and adjoint sources.
- Parameters
folder – The folder where the files are stored.
communicator – The communicator instance.
component_name – The name of this component for the communicator.
-
get
(window_set_name: str)[source]¶ Returns the window manager instance for a window set.
- Parameters
window_set_name (str) – The name of the window set.
-
get_window_set_filename
(window_set_name: str)[source]¶ Retrieves the filename for a given window set
- Parameters
window_set_name (str) – The name of the window set.
- Returns
filename of the window set
-
get_window_statistics
(window_set_name: str, events: List[str])[source]¶ Get a dictionary with window statistics for an iteration per event. Depending on the size of your inversion and chosen iteration, this might take a while…
-
has_window_set
(window_set_name: str)[source]¶ Checks whether a window set is already defined. Returns True or False
- Parameters
window_set_name (str) – The name of the window set.
-
read_all_windows
(event: str, window_set_name: str)[source]¶ Return a flat dictionary with all windows for a specific event. This should always be fairly small.
-
select_windows
(event: str, iteration_name: str, window_set_name: str, **kwargs)[source]¶ Automatically select the windows for the given event and iteration.
Function must be called with MPI.
-
select_windows_for_station
(event: str, iteration: str, station: str, window_set_name: str, **kwargs)[source]¶ Selects windows for the given event, iteration, and station. Will delete any previously existing windows for that station if any.
-
select_windows_multiprocessing
(event: str, iteration_name: str, window_set_name: str, num_processes: int = 16, **kwargs)[source]¶ Automatically select the windows for the given event and iteration. Uses Python’s multiprocessing for parallelization.