Adjoint Sources Component¶
The Adjoint source component takes care of adjoint source calculation and the preparation of the adjoint sources for further usage in adjoint simulations.
Contents:
-
class
lasif.components.adjoint_sources.
AdjointSourcesComponent
(folder, communicator, component_name)[source]¶ Component dealing with the 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.
-
calculate_adjoint_sources
(event: str, iteration: str, window_set_name: str, plot: bool = False, **kwargs)[source]¶ Calculate adjoint sources based on the type of misfit defined in the lasif config file. The computed misfit for each station is also written down into a misfit toml file.
-
calculate_adjoint_sources_multiprocessing
(event: str, iteration: str, window_set_name: str, num_processes: int, plot: bool = False, **kwargs)[source]¶ Calculate adjoint sources based on the type of misfit defined in the lasif config file. The computed misfit for each station is also written down into a misfit toml file. This function uses multiprocessing for parallelization
-
calculate_validation_misfits
(event: str, iteration: str)[source]¶ This fuction computed the L2 weighted waveform misfit over a whole trace. It is meant to provide misfits for validation purposes. E.g. to steer regularization parameters.
-
finalize_adjoint_sources
(iteration_name: str, event_name: str, weight_set_name: Optional[str] = None)[source]¶ Work with adjoint source in a way that it is written down properly into an hdf5 file and prepared for being used as a source time function. The misfit values and adjoint sources are multiplied by the weight of the event and the station.
-
get_misfit_file
(iteration: str)[source]¶ Get path to the iteration misfit file
- Parameters
iteration (str) – Name of iteration