Helium6CRES / he6-cres-spec-sims

A python package to simulate cres data for the 6He CRES experiment at CENPA (University of Washington).
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Bug fixes for running locally #3

Closed rjtayl closed 1 year ago

rjtayl commented 1 year ago

A few small changes and the return of a missing function to allow develop to run bug free again.

buzinsky commented 1 year ago

Are you actually getting energy spectra? Can you show a histogram of what you are getting? I am getting a bunch of NaNs

You can get rid of the commented lines - the git history will still have it if we need to go back (seems unlikely)

Screenshot 2023-08-28 at 10 50 59 AM

test.py.txt

rjtayl commented 1 year ago

I am not seeing that error. I tried running a much higher statistics run and am now seeing rarely a integration nonconvergence warning: IntegrationWarning: The algorithm does not converge. Roundoff error is detected in the extrapolation table. It is assumed that the requested tolerance cannot be achieved, and that the returned result (if full_output = 1) is the best which can be obtained. T_a = 4 / velocity(energy) * integrate.quad(sec_theta, 0, zmax)[0]

However, this warning does not appear to break anything like yours.

Here is a histogram of energies. Looks like we may be calling cobs incorrectly. image

buzinsky commented 1 year ago

@rjtayl Did you have other changes in the works? Or should I test it so that we can finalize/ merge this commit Can you explain why the beta spectra was broken before and now working?

rjtayl commented 1 year ago

@buzinsky You can go ahead and test. The spectra are being pulled correctly, the shape we see is different because we always test the same number of betas at each field.

buzinsky commented 1 year ago

Done with my comments, hopefully you got them. Once those two (.png & gitignore) are resolved, you are good to merge

test