PointReceiver¶
-
class
pysit.core.receivers.
PointReceiver
(mesh, pos, **kwargs)[source]¶ Bases:
pysit.core.mesh_representation.PointRepresentationBase
,pysit.core.receivers.ReceiverBase
Subclass of PointRepresentationBase and ReceiverBase for representing a seismic receiver on a grid.
Attributes: - mesh : pysit.Mesh
Inherited from base class.
- domain : pysit.Domain
Inherited from base class.
- position : tuple of float
Inherited from base class.
- sampling_operator : scipy.sparse matrix
Inherited from base class.
- adjoint_sampling_operator : scipy.sparse matrix
Inherited from base class.
- 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.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. sample_data_from_array
(self, arr[, k, nu, data])Generate an empty data array of appropriate length. serialize_dict
(self[, i])unserialize_dict
(self, d)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.