The validator component is a bit of a police. It can check if there is anything missing or wrong with the imported data in the project. It does however not guarantee that everything is perfect, it meerly tries its best. As we all do.
Component responsible for validating data inside a project. Needs access to a lot of functionality and should therefore be initialized fairly late.
communicator – The communicator instance.
component_name – The name of this component for the communicator.
clean_up_project(clean_up_file: str, delete_outofbounds_events: bool = False)¶
Clean up lasif project based on a toml file with the events that can be deleted.
is_event_station_raypath_within_boundaries(event_name: str, station_latitude: float, station_longitude: float, raypath_steps: int = 500)¶
Checks if the full station-event raypath is within the project’s domain boundaries.
Returns True if this is the case, False if not.
validate_data(data_and_station_file_availability: bool = False, raypaths: bool = False)¶
Validates all data of the current project.
This commands walks through all available data and checks it for validity. It furthermore does some sanity checks to detect common problems. These should be fixed.
- Event files:
Validate against QuakeML 1.2 scheme.
Make sure they contain at least one origin, magnitude and focal mechanism object.
Check for duplicate ids amongst all QuakeML files.
Some simply sanity checks so that the event depth is reasonable and the moment tensor values as well. This is rather fragile and mainly intended to detect values specified in wrong units.
Checks that all raypaths are within the specified domain boundaries.
Returns a list of waveform files violating that assumtion.