def on_import_segy_seis(event):
style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST
wildcard="Arquivos SEG-Y (*.sgy)|*.sgy"
file_dlg = wx.FileDialog(wx.App.Get().GetTopWindow(),
'Escolha o arquivo SEG-Y',
wildcard=wildcard, style=style
)
result = file_dlg.ShowModal()
if result == wx.ID_OK:
file_name = file_dlg.GetFilename()
dir_name = file_dlg.GetDirectory()
file_dlg.Destroy()
if result == wx.ID_CANCEL:
return
name = file_name.split('.')[0]
app_utils.load_segy(event, os.path.join(dir_name, file_name),
new_obj_name=name, comparators_list=None,
iline_byte=9, xline_byte=21, offset_byte=37
)
评论列表
文章目录