Skip to content
Snippets Groups Projects
Commit 046b871d authored by Colm Talbot's avatar Colm Talbot
Browse files

change print to logging

parent 44809982
No related branches found
No related tags found
No related merge requests found
......@@ -247,7 +247,7 @@ class Interferometer(object):
n = np.cos(self.__yarm_tilt) * np.cos(self.__yarm_azimuth) * e_long + np.cos(self.__yarm_tilt) \
* np.sin(self.__yarm_azimuth) * e_lat + np.sin(self.__yarm_tilt) * e_h
else:
print('Not a recognized arm, aborting!')
logging.warning('Not a recognized arm, aborting!')
return
return n
......@@ -372,18 +372,20 @@ class PowerSpectralDensity:
self.amplitude_spectral_density_file = asd_file
self.import_amplitude_spectral_density()
if min(self.amplitude_spectral_density) < 1e-30:
print("You specified an amplitude spectral density file.")
print("{} WARNING {}".format("*" * 30, "*" * 30))
print("The minimum of the provided curve is {:.2e}.".format(min(self.amplitude_spectral_density)))
print("You may have intended to provide this as a power spectral density.")
logging.warning("You specified an amplitude spectral density file.")
logging.warning("{} WARNING {}".format("*" * 30, "*" * 30))
logging.warning("The minimum of the provided curve is {:.2e}.".format(
min(self.amplitude_spectral_density)))
logging.warning("You may have intended to provide this as a power spectral density.")
else:
self.power_spectral_density_file = psd_file
self.import_power_spectral_density()
if min(self.power_spectral_density) > 1e-30:
print("You specified a power spectral density file.")
print("{} WARNING {}".format("*" * 30, "*" * 30))
print("The minimum of the provided curve is {:.2e}.".format(min(self.power_spectral_density)))
print("You may have intended to provide this as an amplitude spectral density.")
logging.warning("You specified a power spectral density file.")
logging.warning("{} WARNING {}".format("*" * 30, "*" * 30))
logging.warning("The minimum of the provided curve is {:.2e}.".format(
min(self.power_spectral_density)))
logging.warning("You may have intended to provide this as an amplitude spectral density.")
def import_amplitude_spectral_density(self):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment