threeML / hawc_hal

HAWC Accelerated Likelihood - python-only framework for HAWC data analysis
BSD 3-Clause "New" or "Revised" License
11 stars 22 forks source link

GoodnessOfFit().by_mc() produces error with extended sources #1

Closed colasri closed 3 years ago

colasri commented 6 years ago

GoodnessOfFit().by_mc() produces a crash when used with extended sources, see attached script and log of the error. The script runs fine when working with a point source (changing the if False on line 32). gof.log gof.py.txt

colasri commented 6 years ago

Is it ok to do a PR for a failing test? https://github.com/ColasRi/hawc_hal/blob/failing_deepcopy_test/tests/test_copy.py

PS: Is github having hiccups with LibreSSL? I had to try several times to push this branch, with a variety of errors

fatal: unable to access 'https://github.com/ColasRi/hawc_hal.git/': Empty reply from server
fatal: unable to access 'https://github.com/ColasRi/hawc_hal.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 
fatal: unable to access 'https://github.com/ColasRi/hawc_hal.git/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
giacomov commented 6 years ago

Yes, definitely

yellowdzh commented 4 years ago

Hello, everyone, I have a similar crash with Colas, when I call gof, param, likes = gf.by_mc(100) as well as doing likelihood ratio test with synthetic data sets lrt_result = lrt.by_mc(100) . It's also working well with a point source see point.log but fail with multi-sources fitting (point + extended) Logfile.log script.log point.log

henrikef commented 3 years ago

This should be resolved with the switch to python 3 & updated pyyaml, or at least the deepcopy tests pass now.

@yellowdzh , would you be able to verify that the goodness of fit works now also for extended sources?

You should be able to install the newest versions of threeML/astromodels/HAL like this:

conda create --name new_hal -c conda-forge -c threeml numpy scipy matplotlib ipython numba reproject "astromodels>=2" "threeml>=2" root
conda activate new_hal
pip install --no-binary :all: root_numpy
pip install git+https://github.com/threeml/hawc_hal.git

(btw, let me know if this works and I will update the installation instructions as well).

yellowdzh commented 3 years ago

Hello Henrike,

Thank you for the update. I will run some test next week and let you know the result.

Cheers, Dezhi

On Fri, Oct 30, 2020 at 5:16 PM Henrike F notifications@github.com wrote:

This should be resolved with the switch to python 3 & updated pyyaml, or at least the deepcopy tests pass now.

@yellowdzh https://github.com/yellowdzh , would you be able to verify that the goodness of fit works now also for extended sources?

You should be able to install the newest versions of threeML/astromodels/HAL like this:

conda create --name new_hal -c conda-forge -c threeml numpy scipy matplotlib ipython numba reproject "astromodels>=2" "threeml>=2" root conda activate new_hal pip install --no-binary :all: root_numpy pip install git+https://github.com/threeml/hawc_hal.git

(btw, let me know if this works and I will update the installation instructions as well).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/threeML/hawc_hal/issues/1#issuecomment-719803295, or unsubscribe https://github.com/notifications/unsubscribe-auth/APIHPBJ7AJFVSRFXOFZI7DLSNMUJDANCNFSM4FCBVLDQ .

yellowdzh commented 3 years ago

@henrikef Both goodneddofFit() and lrt.by_mc() works good with extended source. I got some weird error information after the script is done. It only happens with extended source analysis. The error message doesn't affect the function of goodneddofFit() and lrt.by_mc(). You can find the script I ran and logfile attached. Thank you for fixing the issue. new_hal_LRT.log test_new_hal.py.txt

henrikef commented 3 years ago

Thanks! I didn't fix anything, I think it was the move to python 3 / updating the yaml package that made it work. I'll go ahead and close this (finally! 😆 ).

@yellowdzh could you go ahead and open a new issue with the script/errors you are seeing? I will try and take a look when I have time.