SPIDERMAN icon indicating copy to clipboard operation
SPIDERMAN copied to clipboard

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

Open tcjansen opened this issue 5 years ago • 0 comments

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!

tcjansen avatar Sep 26 '19 21:09 tcjansen