phoebe-project / phoebe2

PHOEBE - Eclipsing Binary Star Modeling Software
http://phoebe-project.org
GNU General Public License v3.0
80 stars 30 forks source link

Running phoebe script meeting error with "ValueError: x must be strictly increasing if s = 0" #744

Open d11122 opened 1 year ago

d11122 commented 1 year ago

Dear developer, I would like to generate a script for Phoebe 2.4 similar to what I did last year with Phoebe 2.3. Everything went smoothly, and I successfully saved the .py and .bundle files. However, When I run the .py file, I encountered the following error:

Sun, 04 Jun 2023 11:21 BUNDLE WARNING 'secondary' probably has a radiative atm (teff=15000K>=8000K), for which irrad_frac_refl_bol>0.8 (suggestion: 1.0) might be a better approx than irrad_frac_refl_bol=0.00. Traceback (most recent call last): File "/mnt/d/astro_work/RSG_binary/phoebe/14.039186_-72.469299/inverse_first_14.039186_-72.469299.py", line 14, in <module> solution_ps = b.run_solver(out_fname=out_fname, use_server='none', niters=2000,progress_every_niters=50,nwalkers=50,solver='emcee_solver',solution='emcee_sol'); File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/parameters/parameters.py", line 423, in _send_if_client return fctn(self, *args, **kwargs) File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/frontend/bundle.py", line 13633, in run_solver params = solver_class().run(self, solver_ps.solver, compute, solution=solution, **{k:v for k,v in kwargs.items() if k not in ['compute']}) File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/solverbackends/solverbackends.py", line 555, in run rpacketlists_per_worker = [self.run_worker(**packet)] File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/solverbackends/solverbackends.py", line 1539, in run_worker dc, params_uniqueids, p0 = b.sample_distribution_collection(distribution=init_from, File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/frontend/bundle.py", line 8941, in sample_distribution_collection sampled_values = dc.sample(size=sample_size).T File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/dependencies/distl/distl.py", line 4280, in sample samples = _np.asarray([dist.sample(*args, seed=seeds, cache_sample=cache_sample, **sample_kwargs) for dist in self.dists], **array_kwargs).T File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/dependencies/distl/distl.py", line 4280, in <listcomp> samples = _np.asarray([dist.sample(*args, seed=seeds, cache_sample=cache_sample, **sample_kwargs) for dist in self.dists], **array_kwargs).T File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/dependencies/distl/distl.py", line 4845, in sample return super(Composite, self).sample(size=size, unit=unit, as_quantity=as_quantity, wrap_at=wrap_at, seed=seed, cache_sample=cache_sample) File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/dependencies/distl/distl.py", line 2753, in sample sample = self.ppf(qs, wrap_at=False) File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/dependencies/distl/distl.py", line 2262, in ppf ppf = self.dist_constructor_object.ppf(q) File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/dependencies/distl/distl.py", line 1082, in dist_constructor_object self._dist_constructor_object_cache = self.dist_constructor_func(*self.dist_constructor_args) File "/home/dm/miniconda3/lib/python3.10/site-packages/phoebe/dependencies/distl/distl.py", line 4734, in dist_constructor_args spline = _interpolate.UnivariateSpline(x, pdf, k=1, s=0) File "/home/dm/miniconda3/lib/python3.10/site-packages/scipy/interpolate/_fitpack2.py", line 217, in __init__ x, y, w, bbox, self.ext = self.validate_input(x, y, w, bbox, k, s, ext, File "/home/dm/miniconda3/lib/python3.10/site-packages/scipy/interpolate/_fitpack2.py", line 245, in validate_input raise ValueError("x must be strictly increasing if s = 0") ValueError: x must be strictly increasing if s = 0

Can you help me and tell me how to fix it? Thanks!

kecnry commented 1 year ago

This is likely a bug related to your input distributions. Can you either attach your bundle immediately before calling run_solver and/or a minimal script to create the distributions and reproduce this traceback?

d11122 commented 1 year ago

This is likely a bug related to your input distributions. Can you either attach your bundle immediately before calling run_solver and/or a minimal script to create the distributions and reproduce this traceback?

Ok, this is my created bundle and minimal script in attachment. error.zip

aprsa commented 1 year ago

@dai7599, I attempted to load the attached bundle but could not; can you please attach a script that generates the bundle?