seidart.simulations.common_offset module¶
- class seidart.simulations.common_offset.CommonOffset(source_file: str, channel: str, project_file: str, receiver_file: str, receiver_indices: bool = False, single_precision: bool = True)¶
Bases:
ArrayUtilize the Array class to build a common offset image from a .prj file and a source location file. If offsets are not provided then a receiver file must be provided that coincides with the source file.
The
- build() None¶
Constructs domain and models based on project file and sets up source and receiver configurations.
- co_run(parallel=False) None¶
Run the electromagnetic or seismic model and extract the receiver time series.
This function loops through all source locations and runs the simulation for each source. It supports parallel execution to speed up processing.
- Parameters:
parallel (bool, optional) – If True, runs the loop in parallel using a thread pool. If False, executes the loop sequentially. Default is True.
Notes
In parallel mode, the function uses concurrent.futures.ThreadPoolExecutor to process multiple source locations concurrently.
Results from each simulation are stored in the self.co_image array, where each column corresponds to the time series for a specific source.
File cleanup is performed after processing each source.
- process_source(i)¶
Process a single source location.
- source_receiver_xyz()¶
Loads and sorts receiver and source locations from a file and adjusts them according to the domain and CPML layer.