-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrintShotPointCoordinates.pyocean
43 lines (33 loc) · 1.17 KB
/
PrintShotPointCoordinates.pyocean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from Slb.Ocean.Petrel import *
from Slb.Ocean.Petrel.DomainObject.Seismic import *
from Slb.Ocean.Core import *
def log(msg):
PetrelLogger.InfoOutputWindow(str(msg))
prj = PetrelProject.PrimaryProject
seisroot = SeismicRoot.Get(prj)
t = DataManager.NewTransaction()
t.Lock(prj)
seisproj = seisroot.GetOrCreateSeismicProject()
defsrc_id = DataManager.Workspace.DefaultSource.Id
obj_id = "a87c90dd-551d-4e1c-bec4-51d07856e530" # was dropped using the Object Dropper
objdroid = Droid(defsrc_id, obj_id)
dm = DataManager
obj = dm.Resolve(objdroid)
def conv_SP_to_XY(SP):
first_SP = seis2Dline.GetShotPoint(0)
last_SP = seis2Dline.GetShotPoint(0)
pass
for seis2Dline in obj:
sp = seis2Dline.GetShotPoint(0)
tp = seis2Dline.TracePositionAtIndex(0)
log("SP:%f\tTP:%s" %(sp,tp) )
sp = seis2Dline.GetShotPoint(seis2Dline.TraceCount-1)
tp = seis2Dline.TracePositionAtIndex(seis2Dline.TraceCount-1)
log("SP:%f\tTP:%s" %(sp,tp) )
for seis2Dline in obj:
for trace in seis2Dline.Traces:
sp = seis2Dline.GetShotPoint(trace.J)
cdp = seis2Dline.GetCDP(trace.J)
tp = seis2Dline.TracePositionAtIndex(trace.J)
#log("SP:%f\tTP:%s\tCDP:%s" %(sp,tp,cdp) )
log("END\n\n")