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

Issue with star.py --optimize=Cheb #88

Open
kevinkhu opened this issue Nov 27, 2017 · 0 comments
Open

Issue with star.py --optimize=Cheb #88

kevinkhu opened this issue Nov 27, 2017 · 0 comments

Comments

@kevinkhu
Copy link
Collaborator

I have been adapting Starfish for use on low resolution DeVeny and Hydra spectra with input BT-Settl models containing temperature and log g information. When I get to the optimize Cheb step I encounter the following error which I can't trace to its origin:

$ star.py --optimize=Cheb
/home/kevin/.conda/envs/starfish/lib/python3.6/site-packages/numpy/polynomial/polyutils.py:334: RuntimeWarning: invalid value encountered in double_scalars
  off = (old[1]*new[0] - old[0]*new[1])/oldlen
/home/kevin/.conda/envs/starfish/lib/python3.6/site-packages/numpy/polynomial/polyutils.py:335: RuntimeWarning: divide by zero encountered in true_divide
  scl = newlen/oldlen
/home/kevin/.conda/envs/starfish/lib/python3.6/site-packages/numpy/polynomial/_polybase.py:292: RuntimeWarning: invalid value encountered in multiply
  arg = off + scl*arg
grid pars are [ 2800.      4.5]
Process Process-1:
Traceback (most recent call last):
  File "/home/kevin/.conda/envs/starfish/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/kevin/.conda/envs/starfish/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/kevin/Fishy/Starfish/Starfish/parallel.py", line 555, in brain
    alive = self.interpret()
  File "/home/kevin/Fishy/Starfish/Starfish/parallel.py", line 573, in interpret
    response = func(arg)
  File "/home/kevin/Fishy/Starfish/Starfish/parallel.py", line 482, in optimize_Cheb
    result = fmin(fprob, p0, maxiter=10000, maxfun=10000)
  File "/home/kevin/.conda/envs/starfish/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 408, in fmin
    res = _minimize_neldermead(func, x0, args, callback=callback, **opts)
  File "/home/kevin/.conda/envs/starfish/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 532, in _minimize_neldermead
    fsim[k] = func(sim[k])
  File "/home/kevin/.conda/envs/starfish/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 292, in function_wrapper
    return function(*(wrapper_args + args))
  File "/home/kevin/Fishy/Starfish/Starfish/parallel.py", line 474, in fprob
    lnp = self.evaluate()
  File "/home/kevin/Fishy/Starfish/Starfish/parallel.py", line 293, in evaluate
    factor, flag = cho_factor(CC)
  File "/home/kevin/.conda/envs/starfish/lib/python3.6/site-packages/scipy/linalg/decomp_cholesky.py", line 142, in cho_factor
    check_finite=check_finite)
  File "/home/kevin/.conda/envs/starfish/lib/python3.6/site-packages/scipy/linalg/decomp_cholesky.py", line 19, in _cholesky
    a1 = asarray_chkfinite(a) if check_finite else asarray(a)
  File "/home/kevin/.conda/envs/starfish/lib/python3.6/site-packages/numpy/lib/function_base.py", line 1215, in asarray_chkfinite
    "array must not contain infs or NaNs")
ValueError: array must not contain infs or NaNs

I'm wondering if this is related to #21, but I don't have any infs or NaNs in my input flux or sigma arrays.

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

1 participant