Obs.print renamed to Obs.details

This commit is contained in:
Fabian Joswig 2021-11-03 10:20:48 +00:00
parent 67fc15e001
commit a4d29b54d8
2 changed files with 23 additions and 23 deletions

View file

@ -379,10 +379,11 @@ class Obs:
return return
def print(self, level=1): def print(self, level=1):
"""Print basic properties of the Obs.""" warnings.warn("Method 'print' renamed to 'details'", DeprecationWarning)
if level == 0: self.details(level)
print(self)
else: def details(self, level=1):
"""Output detailed properties of the Obs."""
if self.value == 0.0: if self.value == 0.0:
percentage = np.nan percentage = np.nan
else: else:

View file

@ -223,9 +223,8 @@ def test_overloaded_functions():
def test_utils(): def test_utils():
my_obs = pe.pseudo_Obs(1.0, 0.5, 't') my_obs = pe.pseudo_Obs(1.0, 0.5, 't')
my_obs.print(0) my_obs.details(1)
my_obs.print(1) my_obs.details(2)
my_obs.print(2)
assert not my_obs.is_zero_within_error() assert not my_obs.is_zero_within_error()
my_obs.plot_tauint() my_obs.plot_tauint()
my_obs.plot_rho() my_obs.plot_rho()