diff --git a/tupak/detector.py b/tupak/detector.py index 9bb94c41cae9fc548c792c1d0fa704a9d2b26d57..ed0c694ced12b3c2151e32e1bfe9d7936d7916c9 100644 --- a/tupak/detector.py +++ b/tupak/detector.py @@ -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): """