Error on synchrotron from interplated distribution #161
Open
Description
Hi all,
I was trying to compute the synchrotron emission from a distribution of electrons defined through the InterpolatedDistribution
of agnpy.
However, at the line
sed_synch = synch.sed_flux(nu_grid)
(where nu_grid = np.logspace(9, 27) * u.Hz
)
I obtain the following error (I am using a jupyter notebook):
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[25], line 5
2 nu_grid = np.logspace(9, 27) * u.Hz
4 # compute a synchrotron, and a self-absorbed synchrotron SED
----> 5 sed_synch = synch.sed_flux(nu_grid)
6 sed_synch_ssa = synch_ssa.sed_flux(nu_grid)
File /sw_fermipy/mambaforge/envs/agnpy-tutorial/lib/python3.9/site-packages/agnpy/synchrotron/synchrotron.py:231, in Synchrotron.sed_flux(self, nu)
220 def sed_flux(self, nu):
221 r"""Evaluates the synchrotron flux SED for a Synchrotron object built
222 from a Blob."""
223 return self.evaluate_sed_flux(
224 nu,
225 self.blob.z,
226 self.blob.d_L,
227 self.blob.delta_D,
228 self.blob.B,
229 self.blob.R_b,
230 self.blob.n_e,
--> 231 *self.blob.n_e.parameters,
232 ssa=self.ssa,
233 integrator=self.integrator,
234 gamma=self.blob.gamma_e,
235 )
AttributeError: 'InterpolatedDistribution' object has no attribute 'parameters'
I obtain the same also when trying to compute sed_synch_ssa = synch_ssa.sed_flux(nu_grid)
, sed_ssc = ssc.sed_flux(nu_grid)
, and sed_ssc_ssa = ssc_ssa.sed_flux(nu_grid)
.
Metadata
Assignees
Labels
No labels