You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a small bug that prevents loading flux points with sherpa without using a dictionary for systematics.
The simple snippet
importastropy.unitsasuimportpkg_resourcesfromagnpy.fitimportload_sherpa_flux_pointssed_path=pkg_resources.resource_filename("agnpy", "data/mwl_seds/Mrk421_2011.ecsv")
# define minimum and maximum energy to be used in the fitE_min= (1e11*u.Hz).to("eV", equivalencies=u.spectral())
E_max=100*u.TeVsed=load_sherpa_flux_points(sed_path, E_min, E_max)
gives
---------------------------------------------------------------------------UnboundLocalErrorTraceback (mostrecentcalllast)
CellIn[5], line74E_min= (1e11*u.Hz).to("eV", equivalencies=u.spectral())
5E_max=100*u.TeV---->7sed=load_sherpa_flux_points(sed_path, E_min, E_max)
File~/work/agnpy/master/agnpy/agnpy/fit/data.py:59, inload_sherpa_flux_points(sed_path, E_min, E_max, systematics_dict)
57y=np.append(y, e2dnde)
58y_err_stat=np.append(y_err_stat, (e2dnde_errn+e2dnde_errp) /2)
--->59y_err_syst=np.append(y_err_syst, e2dnde_err_syst)
61sed=Data1D("sed", x, y, staterror=y_err_stat, syserror=np.asarray(y_err_syst))
63# set the minimum energy to be used for the fitUnboundLocalError: localvariable'e2dnde_err_syst'referencedbeforeassignment
I am fixing it right now...
The text was updated successfully, but these errors were encountered:
cosimoNigro
changed the title
Small bug with declaration of systematics dictionary in
Small bug with loading data with sherpa wihout declaration of systematics dictionary
Oct 8, 2024
cosimoNigro
changed the title
Small bug with loading data with sherpa wihout declaration of systematics dictionary
Small bug: not loading data with sherpa without declaring a systematics dictionary
Oct 8, 2024
There is a small bug that prevents loading flux points with
sherpa
without using a dictionary for systematics.The simple snippet
gives
I am fixing it right now...
The text was updated successfully, but these errors were encountered: