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

Stellar grid(?) going out of range of filter interpolation #25

Open
tcjansen opened this issue Sep 26, 2019 · 0 comments
Open

Stellar grid(?) going out of range of filter interpolation #25

tcjansen opened this issue Sep 26, 2019 · 0 comments

Comments

@tcjansen
Copy link

Hi again,

I'm attempting to provide spiderman with a bandpass filter - but when I set spider_params.filter = 'filter.txt' and attempt to run, I get this traceback:

Traceback (most recent call last):
  File "spiderman_test.py", line 37, in <module>
    lc = spider_params.lightcurve(t)
  File "//anaconda/lib/python3.5/site-packages/spiderman/params.py", line 357, in lightcurve
    return sp.lightcurve(t,self,**kwargs)
  File "//anaconda/lib/python3.5/site-packages/spiderman/web.py", line 95, in lightcurve
    star_grid = sp.stellar_grid.gen_grid(spider_params.l1,spider_params.l2,logg=logg,response=spider_params.filter, stellar_model = spider_params.stellar_model)
  File "//anaconda/lib/python3.5/site-packages/spiderman/stellar_grid.py", line 56, in gen_grid
    totals += [sum_flux(b_wvl,b_flux,l1,l2,filter)]
  File "//anaconda/lib/python3.5/site-packages/spiderman/stellar_grid.py", line 94, in sum_flux
    r = f(wvl)
  File "//anaconda/lib/python3.5/site-packages/scipy/interpolate/polyint.py", line 79, in __call__
    y = self._evaluate(x)
  File "//anaconda/lib/python3.5/site-packages/scipy/interpolate/interpolate.py", line 663, in _evaluate
    below_bounds, above_bounds = self._check_bounds(x_new)
  File "//anaconda/lib/python3.5/site-packages/scipy/interpolate/interpolate.py", line 695, in _check_bounds
    raise ValueError("A value in x_new is above the interpolation "
ValueError: A value in x_new is above the interpolation range.

So the filter gets set, but it looks like the grid is trying to go over the filter interpolation range.
A fix or a suggestion would be appreciated, thanks!

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