ReceiverSet¶
-
class
pysit.core.receivers.
ReceiverSet
(mesh, receivers, **kwargs)[source]¶ Bases:
pysit.core.mesh_representation.MeshRepresentationBase
,pysit.core.receivers.ReceiverBase
Subclass of list and ReceiverBase for representing a set of seismic receivers on a mesh.
This is currently a very simple extension of list. In the future, this must include overrides of all of the basic list functionality, so that operations like appending and inserting correctly handle changes in the data storage and operations like __getslice__ returns another receiver set.
Attributes: - sampling_operator : scipy.sparse matrix
Linear operator describing how the set of receivers is represented on a mesh.
- adjoint_sampling_operator : scipy.sparse matrix
The adjoint of the sampling operator.
- data : numpy.ndarray
Array of seismic data.
Methods
sample_data_from_array(p, k, m, data=None, record_interpolation=’nearest’) Record data from array p at point self.pos at time index k. extend_data_to_array(k, resid=False, data=None) Puts self.data[k]
ordata[k]
orself.data[k]-data[k]
on the grid.Attributes Summary
data
interpolator
receiver_count
Methods Summary
clear_data
(self, data_length)Generate an empty data array of appropriate length. compute_data_dft
(self, frequencies[, …])Precompute the DFT of the data at the given list of frequencies. extend_data_to_array
(self[, k, resid, data])Place data on the grid using the specified numerical delta approximation. get_data
(self)get_interpolator
(self)get_receiver_count
(self)sample_data_from_array
(self, arr[, k, nu, data])Generate an empty data array of appropriate length. serialize_dict
(self)set_data
(self, ndata)set_interpolator
(self, interpolator)set_shot
(self, shot)time_window
(self, ts)unserialize_dict
(self, d)Attributes Documentation
-
data
¶
-
interpolator
¶
-
receiver_count
¶
Methods Documentation
-
clear_data
(self, data_length)[source]¶ Generate an empty data array of appropriate length.
Parameters: - data_length : int
Length of the data array.
-
compute_data_dft
(self, frequencies, force_computation=False)[source]¶ Precompute the DFT of the data at the given list of frequencies.
Parameters: - frequencies : float, iterable
The frequency or frequencies for which to compute the DFT.
- force_computation : bool {optional}
Force computation of DFT. By default already computed frequencies are not recomputed.
Notes
- These computed values are not passed down the line to other receivers in the set.
-
extend_data_to_array
(self, k=None, resid=False, data=None)[source]¶ Place data on the grid using the specified numerical delta approximation.
This routine is designed to help form right-hand-side vectors for the wave equation.
Parameters: - k : int
Time-index of data to place on the grid.
- resid : bool, optional
Compute with self.data - data.
- data : numpy.ndarray, optional
Optional source location for data.
Notes
k
is the index into the data array. It is up to the programmer accessing this to ensure thatk
corresponds to the correctt
.Providing the optional data argument will read the source from the provided array, rather than self.data.
Setting
resid
toTrue
will place the difference of data and self.data on the grid, rather than data or self.data.
-
sample_data_from_array
(self, arr, k=None, nu=None, data=None)[source]¶ Generate an empty data array of appropriate length.
Parameters: - arr : numpy.ndarray
Array of values on domain.
- k : int, optional
Time-index of data to record. If none, recored data are returned.
- data : numpy.ndarray, optional
Optional storage location for recorded data.
Notes
k
is the index into the data array. It is up to the programmer accessing this to ensure thatk
corresponds to the correctt
.Providing the optional data argument will store the result in the provided array, rather than self.data.