zblz / naima

Derivation of non-thermal particle distributions through MCMC spectral fitting
http://naima.readthedocs.io
BSD 3-Clause "New" or "Revised" License
45 stars 53 forks source link

Redefinition of electron Emin and Emax in Compton #224

Open VadimRomansky opened 2 years ago

VadimRomansky commented 2 years ago

Hi! In code we initialize the electron distribution, for example ECPL = naima.models.ExponentialCutoffPowerLaw(amplitude,Emin, alpha, Emax, beta) and then evaluate InverseCompton IC = naima.models.InverseCompton(ECPL, seed_photon_fields=['CMB']) But inside the constructor of class InverseCompton there is redefinition of minimal and maximal energy of electrons! def init( self, particle_distribution, seed_photon_fields=["CMB"], kwargs ): super().init(particle_distribution) self.seed_photon_fields = self._process_input_seed(seed_photon_fields) self.Eemin = 1 u.GeV self.Eemax = 1e9 mec2 self.nEed = 100 self.param_names += ["seed_photon_fields"] self.dict.update(kwargs)

so after that radiation will be evaluated not for initial distribution of electrons, but for something else. And it is crucial for low energies < 1 Gev

santimda commented 11 months ago

isn't that just a default value that is later updated in the " self.dict.update(**kwargs) " line?