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

exotic/api/elca.py print_progressbool not present in dynesty API - Error when fitting the light curve (Windows Local Installation) #1285

Closed
ivenzor opened this issue Aug 13, 2024 · 3 comments

Comments

@ivenzor
Copy link
Contributor

ivenzor commented Aug 13, 2024

When using EXOTIC on Windows, if Ultranest is not installed Dynesty will be used by default.
The fitting of the curve ends with the following error:

****************************************
Fitting a Light Curve Model to Your Data
****************************************

Traceback (most recent call last):
  File "C:\Users\ivenz\EXOTIC\exotic\api\elca.py", line 308, in fit_nested
    test = ReactiveNestedSampler(freekeys, loglike, prior_transform)
NameError: name 'ReactiveNestedSampler' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ivenz\EXOTIC\exotic\exotic.py", line 2674, in <module>
    main()
  File "C:\Users\ivenz\EXOTIC\exotic\exotic.py", line 2551, in main
    myfit = lc_fitter(goodTimes, goodFluxes, goodNormUnc, goodAirmasses, prior, mybounds, mode='ns')
  File "C:\Users\ivenz\EXOTIC\exotic\api\elca.py", line 173, in __init__
    self.fit_nested()
  File "C:\Users\ivenz\EXOTIC\exotic\api\elca.py", line 326, in fit_nested
    dsampler.run_nested(maxcall=int(1e5), dlogz_init=0.05,
TypeError: run_nested() got an unexpected keyword argument 'print_progressbool'

The following line in exotic/api/elca.py is the one causing the error:
dsampler.run_nested(maxcall=int(1e5), dlogz_init=0.05, maxbatch=10, nlive_batch=100, print_progressbool=self.verbose)

Looking at Dynesty documentation, the name of the argument should be print_progress instead of print_progressbool
https://dynesty.readthedocs.io/en/stable/api.html#dynesty.sampler.Sampler.run_nested

@ivenzor ivenzor changed the title exotic/api/elca.py print_progressbool not present in dynasty API - Windows Local Installation Error exotic/api/elca.py print_progressbool not present in dynesty API - Windows Local Installation Error Aug 13, 2024
@ivenzor ivenzor changed the title exotic/api/elca.py print_progressbool not present in dynesty API - Windows Local Installation Error exotic/api/elca.py print_progressbool not present in dynesty API - Error when fitting the light curve (Windows Local Installation) Aug 13, 2024
@ivenzor
Copy link
Contributor Author

ivenzor commented Aug 13, 2024

I modified print_progressbool to print_progress in my local elca.py file and it succesfuly created the lightcurve:
dsampler.run_nested(maxcall=int(1e5), dlogz_init=0.05,
maxbatch=10, nlive_batch=100, print_progress=self.verbose)

@jpl-jengelke
Copy link
Collaborator

jpl-jengelke commented Aug 14, 2024

Closing this as it appears resolved. Thank you @ivenzor!!!

Please re-open if the issue re-appears.

@ivenzor
Copy link
Contributor Author

ivenzor commented Aug 14, 2024

Yes, I tested yersterday and found no problems.

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

No branches or pull requests

2 participants