Acquisition library
This package contain utilities for seismic acquisition.
Acquisition
- class geos.pygeos_tools.acquisition_library.Acquisition.Acquisition(xml, dt=None, **kwargs)[source]
Bases:
object
- Parameters:
xml (XML) – Object containing the parsed xml input file
dt (float) – Timestep
kwargs (keyword arguments) –
- sourceslist of list of float
List of all sources coordinates If None, positions are extracted from the xml
- receiverslist of list of float
List of all receivers coordinates If None, positions are extracted from the xml
- acqIdint
Acquisition id Default is 1
- acquisition_method(sources=None, receivers=None, **kwargs)[source]
Set the shots configurations The same set of receivers is used for all shots
Please provide the same type of variable for sources and receivers
- Parameters:
sources (list of list of float or str) – Sources coordinates If sources is str, filename containing all sources coordinates
receivers (list of list of float) – Receivers coordinates If receivers
Examples
>>>> from utilities.input import XML >>>> xml = XML(“xmlfile.xml”)
>>>> srcList = [[1,2,3],[4,5,6]] >>>> rcvList = [[7,8,9],[10,11,12],[13,14,15]] >>>> acquisition = Acquisition(xml, sources=srcList, receivers=rcvList)
>>>> srcArr = np.array(srcList) >>>> rcvArr = np.array(rcvList) >>>> acquisition = Acquisition(xml, sources=srcArr, receivers=rcvArr)
>>>> srcTxt = “sources.txt” >>>> rcvTxt = “receivers.txt” >>>> acquisition = Acquisition(xml, sources=srcTxt, receivers=rcvTxt)
- getMesh()[source]
Get the mesh associated to the acquisition
- Returns:
Mesh associated
- Return type:
Mesh
- getSourceCenter()[source]
Return the central position of the all the sources contained in the acquisition
- Returns:
3d list
- Return type:
Coordinates of the center
- limitedAperture(dist1=None, dist2=None, dist3=None, comm=None, export=True)[source]
Redefine each shot mesh to correspond to a limited aperture configuration.
- Parameters:
mesh (VTKMesh) – Original mesh
dist1 (float) – Distance to the submesh center in the 1st direction
dist2 (float) – Distance to the submesh center in the 2nd direction
dist3 (float) – Distance to the submesh center in the 3rd direction
comm (MPI.COMM_WORLD) – MPI communicator
EquispacedAcquisition
- class geos.pygeos_tools.acquisition_library.EquispacedAcquisition.EQUISPACEDAcquisition(xml, dt=None, **kwargs)[source]
Bases:
Acquisition
Define an acquisition with: n equispaced lines of equispaced sources and m equispaced lines of equispaced receivers The receiver set is the same for all shots
- Parameters:
xml (XML) – Object containing the parsed xml input file
dt (float) – Timestep
kwargs (keyword arguments for acquisition function) – startFirstSourceLine endFirstSourceLine startLastSourceLine endLastSourceLine startFirstReceiversLine endFirstReceiversLine startLastReceiversLine endLastReceiversLine numberOfSourceLines sourcesPerLine numberOfReceiverLines receiversPerLine
- acquisition_method(startFirstSourceLine, endFirstSourceLine, startFirstReceiversLine, endFirstReceiversLine, startLastSourceLine=None, endLastSourceLine=None, startLastReceiversLine=None, endLastReceiversLine=None, numberOfSourceLines=1, sourcesPerLine=1, numberOfReceiverLines=1, receiversPerLine=1, **kwargs)[source]
Set the shots configurations
- Parameters:
startFirstSourceLine (list of len 3) – Coordinates of the first source of the first source line
endFirstSourceLine (list of len 3) – Coordinates of the last source of the first source line
startLastSourceLine (list of len 3) – Coordinates of the first source of the last source line
endLastSourceLine (list of len 3) – Coordinates of the last source of the last source line
startFirstReceiversLine (list of len 3) – Coordinates of the first receiver of the first receiver line
endFirstReceiversLine (list of len 3) – Coordinates of the last receiver of the first receiver line
startLastReceiversLine (list of len 3) – Coordinates of the first receiver of the last receiver line
endLastReceiversLine (list of len 3) – Coordinates of the last receiver of the last receiver line
numberOfSourceLines (int) – Number of source lines Default is 1
sourcesPerLine (int or list) – Number of sources per line If int: same number for all source lines Default is 1
numberOfReceiverLines (int) – Number of receiver lines Default is 1
receiversPerLine (int or list) – Number of sources per line If int: same number for all receiver lines Default is 1
SegyAcquisition
- class geos.pygeos_tools.acquisition_library.SegyAcquisition.SEGYAcquisition(xml, dt=None, **kwargs)[source]
Bases:
Acquisition
Acquisition defined from the reading of segy files containing the positions of the sources and receivers
- Parameters:
xml (XML) – XML object corresponding to the GEOS formatted .xml input file
dt (float) – Timestep
**kwargs (keyword arguments) –
- segdirstr
Folder containing the .sgy traces
- acquisition_method(segdir, **kwargs)[source]
Set the shots configurations
- Parameters:
segdir (str) – Folder containing the .sgy traces
kwargs –
- sbittuple of int
source bit position in header for x, y and z coordinates Default is (73, 77, 49)
- rbittuple of int
receiver bit position in header for x, y, z coordinates Default is (81, 85, 41)
Shot
- class geos.pygeos_tools.acquisition_library.Shot.Receiver(x, y, z)[source]
Bases:
ShotPoint
A class representing a receiver
- coords
Coordinates of the receiver
Constructor for the receiver
- Parameters:
pos (len 3 array-like) – Coordinates for the receiver
- class geos.pygeos_tools.acquisition_library.Shot.ReceiverSet(receiverList=None)[source]
Bases:
ShotPointSet
Class representing a set receiver
- list
List of Receivers
- Type:
list
- number
Number of Receivers
- Type:
int
Constructor for the receiver set
- Parameters:
receiverList (list of Receiver) – List of Receiver
- append(receiver)[source]
Append a new receiver to the receiver set
- Parameters:
receiver (Receiver) – Receiver to be added
- getReceiver(i)[source]
Get a specific receiver from the set with its index
- Parameters:
i (int) – Index of the receiver requested
- class geos.pygeos_tools.acquisition_library.Shot.Shot(sourceSet=None, receiverSet=None, shotId=None)[source]
Bases:
object
Class representing a shot configuration : a SourceSet of 1 Source and a ReceiverSet
- source
Source object
- receivers
ReceiverSet object
- flag
A flag to say if the shot configuration has been simulated “Undone”, “In Progress”, “Done”
- id
Number identification
- Type:
str
- mesh
Mesh of the problem
- Type:
Mesh object
Constructor of Shot
- Parameters:
sourceSet (SourceSet, optional) – Set of Sources receiverSet : ReceiverSet, optional Set of receivers
shotId (str) – Number identification
- getReceiverCoords()[source]
Return the list of all receivers coordinates in the Shot configuration
- Returns:
list of all the receivers coordinates
- Return type:
list of list
- getReceiverList()[source]
Return the list of all receivers in the Shot configuration
- Returns:
list of all the sources
- Return type:
list of Receiver
- getSourceCoords()[source]
Return the list of all sources coordinates in the Shot configuration
- Returns:
list of all the sources coordinates
- Return type:
list of list
- class geos.pygeos_tools.acquisition_library.Shot.ShotPoint(x, y, z)[source]
Bases:
object
Class defining the methods common to shot points (Source or Receiver)
- coords
Coordinates of the shot point
- Type:
list of float
- Parameters:
x (str, int or float) – x coordinate
y (str, int or float) – y coordinate
z (str, int or float) – z coordinate
- isinBounds(b)[source]
Check if the receiver is in the bounds
- Parameters:
b (list or array of len 6) – Bounds of format (xmin, xmax, ymin, ymax, zmin, zmax)
- Returns:
True if receiver is in bounds, False otherwise
- Return type:
bool
- setCoordinate(coord, value)[source]
Set one of the coordinates
- Parameters:
coord (int) – Which coordinate to update Choices are 0, 1, 2
value (float or int) – New value
- setPosition(x, y, z)[source]
Set all the coordinates
- Parameters:
coords (list or array of len 3) – New coordinates
- property x
Get the x position
- Returns:
X coordinate
- Return type:
float
- property y
Get the y position
- Returns:
Y coordinate
- Return type:
float
- property z
Get the z position
- Returns:
Z coordinate
- Return type:
float
- class geos.pygeos_tools.acquisition_library.Shot.ShotPointSet(shotPointList=None)[source]
Bases:
object
Class defining methods for sets of shot points
- list
List of ShotPoint
- Type:
list
- number
Number of ShotPoint in the set
- Type:
int
- Parameters:
shotPointList (list) – List of ShotPoint Default is None
- append(shotPoint=None)[source]
Append a new shot point to the set
- Parameters:
shotPoint (ShotPoint) – Element to be added
- appendSet(shotPointSet)[source]
Append a list or a set of Shot Points to the existing one
- Parameters:
shotPointSet (list or ShotPointSet) – Set of shot points to be added
- class geos.pygeos_tools.acquisition_library.Shot.Source(x, y, z)[source]
Bases:
ShotPoint
A class representing a point source
- coords
Coordinates of the source
- Type:
list of float
Constructor for the point source
- Parameters:
coords (list of float) – Coordinates for the point source
- class geos.pygeos_tools.acquisition_library.Shot.SourceSet(sourceList=None)[source]
Bases:
ShotPointSet
Class representing a source set
- list
List of sources
- number
Number of sources
Constructor for the source set
- Parameters:
sourceList (list of Source) – List of sources
- append(source)[source]
Append a new source to the source set
- Parameters:
source (Source) – Source to be added
- getCenter()[source]
Get the position of the center of the SourceSet
- Returns:
center – Central position of the source set
- Return type:
tuple or None