Skip to content
Snippets Groups Projects
Commit 09f0e0ef authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Reapply fix and add requirement

parent e9f4e0ed
Branches
No related tags found
1 merge request!5Try numba implementation
Pipeline #39048 failed
......@@ -3,3 +3,4 @@ numpy
astropy
matplotlib
numba
scipy
\ No newline at end of file
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment