From 09f0e0ef1cf931231eeae1505a3a023e13e91eca Mon Sep 17 00:00:00 2001 From: mancini <mancini@astron.nl> Date: Tue, 8 Nov 2022 14:11:10 +0100 Subject: [PATCH] Reapply fix and add requirement --- requirements.txt | 3 ++- scintillation/Calibrationlib.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 745b15e..d6929c0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ h5py numpy astropy matplotlib -numba \ No newline at end of file +numba +scipy \ No newline at end of file diff --git a/scintillation/Calibrationlib.py b/scintillation/Calibrationlib.py index 4ae1119..1e55130 100644 --- a/scintillation/Calibrationlib.py +++ b/scintillation/Calibrationlib.py @@ -49,12 +49,13 @@ def model_flux(calibrator, frequency): if calibrator in Cal_dict.keys(): parameters = Cal_dict[calibrator] else: - raise ValueError(calibrator, "is not in the calibrators list") + parameters = [1., 0.] + # raise ValueError(calibrator, "is not in the calibrators list") flux_model = 0 freqs = frequency * 1.e-3 # convert from MHz to GHz for j, p in enumerate(parameters): - flux_model += p * np.log10(frequency) ** j + flux_model += p * np.log10(freqs) ** j flux_model = 10 ** flux_model # because at first the flux is in log10 return flux_model -- GitLab