[GRASS-dev] [GRASS GIS] #3027: i.atcorr's create_iwave.py broken

GRASS GIS trac at osgeo.org
Tue Aug 23 05:44:52 PDT 2016


#3027: i.atcorr's create_iwave.py broken
----------------------+---------------------------------
  Reporter:  neteler  |      Owner:  grass-dev@…
      Type:  defect   |     Status:  new
  Priority:  normal   |  Milestone:  7.0.5
 Component:  Imagery  |    Version:  svn-releasebranch70
Resolution:           |   Keywords:  i.atcorr
       CPU:  x86-64   |   Platform:  All
----------------------+---------------------------------

Comment (by nikosa):

 In
 https://trac.osgeo.org/grass/browser/grass/trunk/imagery/i.atcorr/create_iwave.py?rev=69225#L93,

 the class `interp1d` is fed with `response[:,0]` and response[:,1] as `x`
 and `y` respectively
 ([https://github.com/scipy/scipy/blob/05dc7b8b0662c9c973203b36044458ca35084833/scipy/interpolate/interpolate.py#L335
 scipy/interpolate/interpolate.py#L335 and Line 337]).

 Internally, lower and upper bounds of `x` and `y` are defined and
 [https://github.com/scipy/scipy/blob/05dc7b8b0662c9c973203b36044458ca35084833/scipy/interpolate/interpolate.py#L593
 checked] when calling later on the interpolation function returned by
 `interp1d`. In `create_iwave.py`
 [https://trac.osgeo.org/grass/browser/grass/trunk/imagery/i.atcorr/create_iwave.py?rev=69225#L95
 `2.5` is added to `y`], which, obviously, leads to the ValueError.

 See also the
 [https://github.com/scipy/scipy/blob/05dc7b8b0662c9c973203b36044458ca35084833/scipy/interpolate/interpolate.py#L390
 example in the classe's source code].

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3027#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list