iSpec icon indicating copy to clipboard operation
iSpec copied to clipboard

CustomizableRegion.py throws TypeError in get_wave_base()

Open pmaxted opened this issue 1 year ago • 0 comments

While running "Find line masks" function I was getting a long error message that ends with ...

  File "/Users/pflm/iSpec/ispec/gui/CustomizableRegion.py", line 348, in get_wave_base
    return self.axvspan.get_xy()[0,0]
           ~~~~~~~~~~~~~~~~~~~~~^^^^^
TypeError: tuple indices must be integers or slices, not tuple

The following code starting at line 348 of CustomizableRegion.py seems to fix this

    def get_wave_base(self):
        return self.axvspan.get_x()

    def get_wave_top(self):
        return self.axvspan.get_x()+self.axvspan.get_width()

pmaxted avatar Dec 14 '24 22:12 pmaxted