Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding a fix in Synchrotron emission #498

Closed
samatadas1 opened this issue Aug 21, 2024 · 1 comment · Fixed by #501
Closed

Regarding a fix in Synchrotron emission #498

samatadas1 opened this issue Aug 21, 2024 · 1 comment · Fixed by #501
Labels

Comments

@samatadas1
Copy link

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.

@rafaelab rafaelab added the bug label Aug 22, 2024
@rafaelab
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants