Acquisitions
- class stride.problem.acquisitions.Shot(id, name=None, problem=None, **kwargs)[source]
Bases:
ProblemBase
A Shot is an even in which one or more transducers act as sources with a given wavelet and one or more transducers act as receivers and record some observed data.
Therefore a shot object maintains data about the ids of the transducer locations that will act as sources, the ids of the transducer locations that will act as receivers, as well as the wavelets that will be fired and the observed data that is recorded.
- Parameters:
id (int) – Identifier assigned to this shot.
name (str) – Optional name for the shot.
problem (Problem) – Problem to which the Shot belongs.
geometry (Geometry) – Geometry referenced by the source/receiver transducer locations of the shot.
sources (list) – Sources with which to initialise the shot, defaults to empty.
receivers (list) – Receivers with which to initialise the shot, defaults to empty.
delays (ndarray, optional) – Array of delays (in seconds) for each source in the shot.
grid (Grid or any of Space or Time) – Grid on which the Acquisitions is defined
- append_observed(*args, **kwargs)[source]
Append the shot to the corresponding Acquisitions file.
See
HDF5
for more information on the parameters of this method.
- delayed_wavelets
Get wavelets with delays applied to them.
- property geometry
- property num_points_receivers
Get total number of point receivers in the Shot.
- property num_points_sources
Get total number of point sources in the Shot.
- property num_receivers
Get number of receivers in the Shot.
- property num_sources
Get number of sources in the Shot.
- plot(**kwargs)[source]
Plot wavelets and observed for this shot if they are allocated.
- Parameters:
kwargs – Arguments for plotting.
- Returns:
Axes on which the plotting is done.
- Return type:
axes
- plot_observed(**kwargs)[source]
Plot observed for this shot if they are allocated.
- Parameters:
kwargs – Arguments for plotting.
- Returns:
Axes on which the plotting is done.
- Return type:
axes
- plot_wavelets(**kwargs)[source]
Plot wavelets for this shot if they are allocated.
- Parameters:
kwargs – Arguments for plotting.
- Returns:
Axes on which the plotting is done.
- Return type:
axes
- property receiver_coordinates
Get the coordinates of all receivers packed in an array format.
Coordinates are defined as a 2 or 3-dimensional array with shape (n_receivers, n_dimensions).
- property receiver_ids
Get ids of receivers in this Shot in a list.
- property receivers
Get receivers in this Shot as a list.
- property slow_time_index
Point along the slow time.
- property source_coordinates
Get the coordinates of all sources packed in an array format.
Coordinates are defined as a 2 or 3-dimensional array with shape (n_sources, n_dimensions).
- property source_ids
Get ids of sources in this Shot in a list.
- property sources
Get sources in this Shot as a list.
- sub_problem(shot, sub_problem)[source]
Create a subset object for a certain shot.
A SubProblem contains everything that is needed to fully determine how to run a particular shot. This method takes care of generating a new Shot object that is linked to this new SubProblem.
- Parameters:
shot (Shot) – Shot for which the SubProblem is being generated.
sub_problem (SubProblem) – Container for the sub-problem being generated.
- Returns:
Newly created Shot instance.
- Return type:
- class stride.problem.acquisitions.Sequence(id, acq=0, name=None, problem=None, **kwargs)[source]
Bases:
ProblemBase
A Sequence represents a set of shots that are fired at different times, defined with respect to a slow time axis.
- Parameters:
id (int) – Identifier assigned to this sequence.
acq (int, optional) – Acquisition number at which the sequence starts, defaults to 0.
name (str) – Optional name for the sequence.
problem (Problem) – Problem to which the Sequence belongs.
geometry (Geometry) – Geometry referenced by the source/receiver transducer locations of the shots.
acquisitions (Acquisitions) – Acquisitions to which the sequence belongs.
grid (Grid or any of Space or Time) – Grid on which the Acquisitions is defined
- add(frame, item)[source]
Add a new shot to the Sequence.
- Parameters:
frame (int) – Frame number where the shot is fired.
item (Shot) – Shot to be added to the Sequence.
- get(frame)[source]
Get a shot from the Acquisitions with a known frame.
- Parameters:
frame (int) – Frame number of the shot in the Sequence.
- Returns:
Found Shot.
- Return type:
- property num_shots
Get number of shots in the Sequence.
- select_shot_ids(shot_ids=None, start=None, end=None, num=None, every=1, randomly=False)[source]
Select a number of shots according to the rules given in the arguments to the method.
For every call to this method a new group of shots will be selected according to those rules until all shots have been selected. At that point, the selection will start again.
- Parameters:
shot_ids (list, optional) – List of shot IDs to select from.
start (int, optional) – Start of the slice, defaults to the first time step.
end (int, optional) – End of the slice, defaults to the last time step.
num (int, optional) – Number of shots to select every time the method is called.
every (int, optional) – How many shots to skip in the selection, defaults to 1, which means taking all shots subsequently.
randomly (bool, optional) – Whether to select the shots at random at in order, defaults to False.
- Returns:
List with selected shots.
- Return type:
list
- set(frame, item)[source]
Change an existing shot in the Sequence.
- Parameters:
frame (int) – Frame number of the shot in the Sequence.
item (Shot) – Shot to be modified in the Acquisitions.
- property shot_ids
Get all shot IDs in the Sequence as a list.
- property shot_starts
Get all starts of shots in the Sequence as a list.
- property shots
Get all shots in the Sequence as a list.
- class stride.problem.acquisitions.Acquisitions(name='acquisitions', problem=None, **kwargs)[source]
Bases:
ProblemBase
Acquisitions establish a series of shots that will be or have been fired to generate data.
A shot is an even in which one or more transducer locations act as sources with a given wavelet and one or more transducer locations act as receivers and record some observed data.
Shots are identified through a numerical ID, which is >= 0.
Shots can be added through
Acquisitions.add(shot)
and can be accessed throughAcquisitions.get(shot_id)
.The Acquisitions also provides utilities for loading and dumping these shots and their data.
- Parameters:
- add(item)[source]
Add a new shot to the Acquisitions.
- Parameters:
item (Shot) – Shot to be added to the Acquisitions.
- add_sequence(item)[source]
Add a new sequence to the Acquisitions.
- Parameters:
item (Sequence) – Sequence to be added to the Acquisitions.
- default()[source]
Fill the container with the default configuration.
In this case, that means that every location in the Geometry acts as a source once while every location acts as a receiver.
This generates as many shots as there are locations available in the Geometry. Each Shot only has one source and as many receivers as locations are in the Geometry.
- get(id)[source]
Get a shot from the Acquisitions with a known id.
- Parameters:
id (int) – Identifier of the shot.
- Returns:
Found Shot.
- Return type:
- get_sequence(id)[source]
Get a sequence from the Acquisitions with a known id.
- Parameters:
id (int) – Identifier of the shot.
- Returns:
Found Sequence.
- Return type:
- property num_receivers_per_shot
Get maximum number of receivers in any shot.
- property num_sequences
Get number of sequences in the Acquisitions.
- property num_shots
Get number of shots in the Acquisitions.
- property num_sources_per_shot
Get maximum number of sources in any shot.
- plot(**kwargs)[source]
Plot wavelets and observed for for all shots if they are allocated.
- Parameters:
kwargs – Arguments for plotting.
- plot_observed(**kwargs)[source]
Plot observed for for all shots if they are allocated.
- Parameters:
kwargs – Arguments for plotting.
- plot_wavelets(**kwargs)[source]
Plot wavelets for for all shots if they are allocated.
- Parameters:
kwargs – Arguments for plotting.
- property remaining_shot_ids
Get list of all shot IDs that have no observed allocated.
- property remaining_shots
Get dict of all shots that have no observed allocated.
- select_sequence_ids(start=None, end=None, num=None, every=1, randomly=False)[source]
Select a number of sequences according to the rules given in the arguments to the method.
For every call to this method a new group of sequences will be selected according to those rules until all shots have been selected. At that point, the selection will start again.
- Parameters:
start (int, optional) – Start of the slice, defaults to the first id.
end (int, optional) – End of the slice, defaults to the last id.
num (int, optional) – Number of shots to select every time the method is called.
every (int, optional) – How many shots to skip in the selection, defaults to 1, which means taking all shots subsequently.
randomly (bool, optional) – Whether to select the shots at random at in order, defaults to False.
- Returns:
List with selected sequences.
- Return type:
list
- select_shot_ids(shot_ids=None, start=None, end=None, num=None, every=1, randomly=False)[source]
Select a number of shots according to the rules given in the arguments to the method.
For every call to this method a new group of shots will be selected according to those rules until all shots have been selected. At that point, the selection will start again.
- Parameters:
shot_ids (list, optional) – List of shot IDs to select from.
start (int, optional) – Start of the slice, defaults to the first id.
end (int, optional) – End of the slice, defaults to the last id.
num (int, optional) – Number of shots to select every time the method is called.
every (int, optional) – How many shots to skip in the selection, defaults to 1, which means taking all shots subsequently.
randomly (bool, optional) – Whether to select the shots at random at in order, defaults to False.
- Returns:
List with selected shots.
- Return type:
list
- property sequence_ids
Get all IDs of sequences in the Acquisitions as a list.
- property sequences
Get all sequences in the Acquisitions as a list.
- set(item)[source]
Change an existing shot in the Acquisitions.
- Parameters:
item (Shot) – Shot to be modified in the Acquisitions.
- set_sequence(item)[source]
Change an existing sequence in the Acquisitions.
- Parameters:
item (Sequence) – Sequence to be modified in the Acquisitions.
- property shot_ids
Get all IDs of shots in the Acquisitions as a list.
- property shots
Get all shots in the Acquisitions as a list.
- sub_problem(shot, sub_problem)[source]
Create a subset object for a certain shot.
A SubProblem contains everything that is needed to fully determine how to run a particular shot. This method takes care of selecting the portions of the Acquisitions that are needed for a given shot.
- Parameters:
shot (Shot) – Shot for which the SubProblem is being generated.
sub_problem (SubProblem) – Container for the sub-problem being generated.
- Returns:
Newly created Acquisitions instance.
- Return type: