Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def describe(self, flush=True):
"""Describe an instance by printing to stdout"""
dsc = xtgeo.common.XTGDescription()
dsc.title("Description of Well instance")
dsc.txt("Object ID", id(self))
dsc.txt("File source", self._filesrc)
dsc.txt("Well name", self._wname)
dsc.txt("RKB", self._rkb)
dsc.txt("Well head", self._xpos, self._ypos)
dsc.txt("Name of all columns", self.lognames_all)
dsc.txt("Name of log columns", self.lognames)
for wlog in self.lognames:
rec = self.get_logrecord(wlog)
if rec is not None and len(rec) > 3:
string = "("
nlen = len(rec)
for idx, (code, val) in enumerate(rec.items()):
if idx < 2:
string += "{}: {} ".format(code, val)
def describe(self, flush=True):
"""Describe an instance by printing to stdout or return"""
dsc = XTGDescription()
dsc.title("Description of Cube instance")
dsc.txt("Object ID", id(self))
dsc.txt("File source", self._filesrc)
dsc.txt("Shape: NCOL, NROW, NLAY", self.ncol, self.nrow, self.nlay)
dsc.txt("Origins XORI, YORI, ZORI", self.xori, self.yori, self.zori)
dsc.txt("Increments XINC YINC ZINC", self.xinc, self.yinc, self.zinc)
dsc.txt("Rotation (anti-clock from X)", self.rotation)
dsc.txt("YFLIP flag", self.yflip)
np.set_printoptions(threshold=16)
dsc.txt("Inlines vector", self._ilines)
dsc.txt("Xlines vector", self._xlines)
dsc.txt("Time or depth slices vector", self.zslices)
dsc.txt("Values", self._values.reshape(-1), self._values.dtype)
np.set_printoptions(threshold=1000)
dsc.txt(
"Values, mean, stdev, minimum, maximum",
def describe(self, flush=True):
"""Describe an instance by printing to stdout"""
dsc = xtgeo.common.XTGDescription()
dsc.title("Description of RegularSurface instance")
dsc.txt("Object ID", id(self))
dsc.txt("File source", self._filesrc)
dsc.txt("Shape: NCOL, NROW", self.ncol, self.nrow)
dsc.txt("Active cells vs total", self.nactive, self.nrow * self.ncol)
dsc.txt("Origins XORI, YORI", self.xori, self.yori)
dsc.txt("Increments XINC YINC", self.xinc, self.yinc)
dsc.txt("Rotation (anti-clock from X)", self.rotation)
dsc.txt("YFLIP flag", self._yflip)
np.set_printoptions(threshold=16)
dsc.txt("Inlines vector", self._ilines)
dsc.txt("Xlines vector", self._xlines)
np.set_printoptions(threshold=1000)
if self._isloaded:
dsc.txt("Values", self._values.reshape(-1), self._values.dtype)
dsc.txt(
def describe(self, flush=True):
"""Describe an instance by printing to stdout"""
dsc = XTGDescription()
dsc.title('Description of {} instance'.format(self.__class__.__name__))
dsc.txt('Object ID', id(self))
dsc.txt('Wells', self.names)
if flush:
dsc.flush()
else:
return dsc.astext()
def describe(self, flush=True):
"""Describe an instance by printing to stdout"""
dsc = xtgeo.common.XTGDescription()
dsc.title("Description of GridProperty instance")
dsc.txt("Object ID", id(self))
dsc.txt("Name", self.name)
dsc.txt("Date", self.date)
dsc.txt("File source", self._filesrc)
dsc.txt("Discrete status", self._isdiscrete)
dsc.txt("Codes", self._codes)
dsc.txt("Shape: NCOL, NROW, NLAY", self.ncol, self.nrow, self.nlay)
np.set_printoptions(threshold=16)
dsc.txt("Values", self._values.reshape(-1), self._values.dtype)
np.set_printoptions(threshold=1000)
dsc.txt(
"Values, mean, stdev, minimum, maximum",
self.values.mean(),
self.values.std(),
self.values.min(),
def describe(self, flush=True):
"""Describe an instance by printing to stdout"""
dsc = xtgeo.common.XTGDescription()
dsc.title("Description of RegularSurface instance")
dsc.txt("Object ID", id(self))
dsc.txt("File source", self._filesrc)
dsc.txt("Shape: NCOL, NROW", self.ncol, self.nrow)
dsc.txt("Active cells vs total", self.nactive, self.nrow * self.ncol)
dsc.txt("Origins XORI, YORI", self.xori, self.yori)
dsc.txt("Increments XINC YINC", self.xinc, self.yinc)
dsc.txt("Rotation (anti-clock from X)", self.rotation)
dsc.txt("YFLIP flag", self._yflip)
np.set_printoptions(threshold=16)
dsc.txt("Inlines vector", self._ilines)
dsc.txt("Xlines vector", self._xlines)
np.set_printoptions(threshold=1000)
if self._isloaded:
dsc.txt("Values", self._values.reshape(-1), self._values.dtype)
dsc.txt(
def describe(self, flush=True):
"""Describe an instance by printing to stdout"""
dsc = XTGDescription()
dsc.title("Description of GridProperties instance")
dsc.txt("Object ID", id(self))
dsc.txt("Shape: NCOL, NROW, NLAY", self.ncol, self.nrow, self.nlay)
dsc.txt("Attached grid props objects (names)", self._names)
if flush:
dsc.flush()
return None
return dsc.astext()
def describe(self, flush=True):
"""Describe an instance by printing to stdout"""
dsc = xtgeo.common.XTGDescription()
dsc.title("Description of {} instance".format(self.__class__.__name__))
dsc.txt("Object ID", id(self))
for inum, surf in enumerate(self.surfaces):
dsc.txt("Surface:", inum, surf.name)
if flush:
dsc.flush()
return None
return dsc.astext()