rzellem / EXOTIC

EXOplanet Transit Interpretation Code
Other
84 stars 45 forks source link

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

Closed ivenzor closed 1 month ago

ivenzor commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

Please re-open if the issue re-appears.

ivenzor commented 1 month ago

Yes, I tested yersterday and found no problems.