Closed samatadas1 closed 2 months ago
Hi @samatadas1
Indeed, this seems to be a bug, since setThinning
is not called in the constructor.
The problem should affect only the cases in which havePhoton
is set to true.
If you really need this feature immediately, until it is fixed, you can declare the synchrotron module and then simply add sync.setThinning(thinning)
manually.
Dear all, In SynchrotronRadiation.cpp file,
SynchrotronRadiation::SynchrotronRadiation(ref_ptr field, bool havePhotons, double thinning, int nSamples, double limit) {
setField(field);
setBrms(0);
initSpectrum();
setHavePhotons(havePhotons);
setLimit(limit);
setSecondaryThreshold(1e6 * eV);
setMaximumSamples(nSamples);
}
SynchrotronRadiation::SynchrotronRadiation(double Brms, bool havePhotons, double thinning, int nSamples, double limit) { setBrms(Brms); initSpectrum(); setHavePhotons(havePhotons); setLimit(limit); setSecondaryThreshold(1e6 * eV); setMaximumSamples(nSamples); }
setThinning(thinning) is missing. It should be included in there.