def checkSurvInfo(self): self.refreshMsgBox() # if seis_ays.checkSeisInfo(self.survinfo) is False: # print("Plot2DSeisXl: Survey not found") # QtWidgets.QMessageBox.critical(self.msgbox, # 'Plot Seismic Crossline', # 'Survey not found') return False return True
def checkSurvInfo(self): self.refreshMsgBox() # if seis_ays.checkSeisInfo(self.survinfo) is False: # print("CalcMathAttribSingle: Survey not found") # QtWidgets.QMessageBox.critical(self.msgbox, # 'Calculate Math Attribute from Single Property', # 'Survey not found') return False return True
def checkSurvInfo(self): self.refreshMsgBox() # if seis_ays.checkSeisInfo(self.survinfo) is False: # print("ConvertSeis2PointSet: Survey not found") # QtWidgets.QMessageBox.critical(self.msgbox, # 'Convert Seismic to PointSet', # 'Survey not found') return False return True
def checkSurvInfo(self): self.refreshMsgBox() # if seis_ays.checkSeisInfo(self.survinfo) is False: # print("ExportSeisSegy: Survey not found") # QtWidgets.QMessageBox.critical(self.msgbox, # 'Export Seismic SEG-Y', # 'Survey not found') return False return True
def clickBtnImport(self): self.refreshMsgBox() # if os.path.exists(self.segyfile) is False or os.path.isfile( self.segyfile) is False: print("ImportSurveySegy: No SEG-Y selected for import") QtWidgets.QMessageBox.critical(self.msgbox, 'Import Survey from Seismic SEG-Y', 'No SEG-Y selected for import') return # format trace header format _traceheaderformat = seis_io.defSegyTraceHeaderFormat( x_byte=self.cbbx.currentIndex() + 1, y_byte=self.cbby.currentIndex() + 1, inl_byte=self.cbbinl.currentIndex() + 1, xl_byte=self.cbbxl.currentIndex() + 1) # _survinfo = seis_io.readSeisInfoFromSegy( self.segyfile, traceheaderformat=_traceheaderformat) print("SEG-Y survey information:") print( "----- Dimension (inline x crossline x time/depth) : %d x %d x %d" % (_survinfo['ILNum'], _survinfo['XLNum'], _survinfo['ZNum'])) print("----- Inline range (start, end, step): %d, %d, %d" % (_survinfo['ILStart'], _survinfo['ILEnd'], _survinfo['ILStep'])) print("----- Crossline range (start, end, step): %d, %d, %d" % (_survinfo['XLStart'], _survinfo['XLEnd'], _survinfo['XLStep'])) print("----- Time/depth range (start, end, step): %d, %d, %d" % (_survinfo['ZStart'], _survinfo['ZEnd'], _survinfo['ZStep'])) # if seis_ays.checkSeisInfo(_survinfo): self.survinfo = _survinfo self.checkSurvInfo() # QtWidgets.QMessageBox.information(self.msgbox, "Import Survey from Seismic SEG-Y", " Survey imported successfully") # return
def changeLdtFrom(self): self.refreshMsgBox() # self.lwgattrib.clear() # if os.path.exists(self.ldtfrom.text()) is False: print("RtrvSeisProp: No NumPy selected for retrieval") return # try: self.npydata = np.load(self.ldtfrom.text()).item() if 'Inline' not in self.npydata.keys() \ or 'Crossline' not in self.npydata.keys() \ or 'Z' not in self.npydata.keys(): print( "RtrvSeisProp: NumPy dictionary contains no Inline, Crossline, Z keys" ) QtWidgets.QMessageBox.critical( self.msgbox, 'Retrieve Seismic Property', 'NumPy dictionary contains no Inline, Crossline, Z keys') return self.npyinfo = seis_ays.getSeisInfoFrom2DMat( basic_mdt.exportMatDict(self.npydata, ['Inline', 'Crossline', 'Z'])) self.npydata.pop('Inline') self.npydata.pop('Crossline') self.npydata.pop('Z') except ValueError: _npydata = np.load(self.ldtfrom.text()) _filename = os.path.splitext(os.path.basename( self.ldtfrom.text()))[0] if np.ndim(_npydata) <= 1 or np.ndim(_npydata) >= 4: print("RtrvSeisProp: NumPy matrix shall be 2D or 3D") QtWidgets.QMessageBox.critical( self.msgbox, 'Retrieve Seismic Property', 'NumPy matrix shall be 2D or 3D') return if np.ndim(_npydata) == 2: if np.shape(_npydata)[1] < 4: print( "RtrvSeisProp: 2D NumPy matrix shall contain at least 4 columns" ) QtWidgets.QMessageBox.critical( self.msgbox, 'Retrieve Seismic Property', '2D NumPy matrix shall contain at least 4 columns') return self.npyinfo = seis_ays.getSeisInfoFrom2DMat(_npydata) _npydata = _npydata[:, 3:] if np.ndim(_npydata) == 3: self.npyinfo = seis_ays.createSeisInfoFrom3DMat(_npydata) _npydata = np.reshape(np.transpose(_npydata, [2, 1, 0]), [-1, 1]) self.npydata = {} self.npydata[_filename] = _npydata # if seis_ays.checkSeisInfo(self.npyinfo) is False: print("RtrvSeisProp: Selected not seismic numpy") QtWidgets.QMessageBox.critical(self.msgbox, 'Retrieve Seismic Property', 'Selected not seismic numpy') return # _firstattrib = None for i in sorted(self.npydata.keys()): item = QtWidgets.QListWidgetItem(self.lwgattrib) item.setText(i) self.lwgattrib.addItem(item) if _firstattrib is None: _firstattrib = item self.lwgattrib.setCurrentItem(_firstattrib)
def checkSurvInfo(survinfo): return seis_ays.checkSeisInfo(survinfo)
def checkSurvInfo(self): self.refreshMsgBox() # return seis_ays.checkSeisInfo(self.survinfo)