Sure, I was suggesting it in addition to your changes. I'll do that in a
separate pull request. Thank you for fixing this bug!

Francisco


On 1 April 2014 16:50, vidartf <notifications@github.com> wrote:

> In hyperspy/gui/egerton_quantification.py:
>
> > @@ -343,7 +343,11 @@ def _interpolator_kind_changed(self, old, new):
> >          self.span_selector_changed()
> >
> >      def _ss_left_value_changed(self, old, new):
> > -        self.span_selector_changed()
> > +        try:
> > +            self.span_selector_changed()
> > +        except ValueError:
> > +            if self.ss_right_value != NaN:
>
> That's probably the best option, but not entirely sure where in the code
> that would be best to do. Maybe in
> BackgroundRemoval.span_selector_changed() ? I still believe an initial NaN
> value is useful, as that prevents the selector from trying to use zero,
> which might not be a valid value (e.g. for high-loss spectrums).
> ... <#1451dfc3d3760ddd_>
> On Tue, Apr 1, 2014 at 5:43 PM, francisco-dlp <notifications@github.com>wrote:
> In hyperspy/gui/egerton_quantification.py: > @@ -343,7 +343,11 @@ def
> _interpolator_kind_changed(self, old, new): > self.span_selector_changed()
> > > def _ss_left_value_changed(self, old, new): > -
> self.span_selector_changed() > + try: > + self.span_selector_changed() > +
> except ValueError: > + if self.ss_right_value != NaN: What about not
> letting `left` be greater than `right`? ... <#1451df58cfffaff5_> On 1 April
> 2014 16:40, vidartf <notifications@github.com> wrote: > In
> hyperspy/gui/egerton_quantification.py: > > > @@ -343,7 +343,11 @@ def
> _interpolator_kind_changed(self, old, new): > >
> self.span_selector_changed() > > > > def _ss_left_value_changed(self, old,
> new): > > - self.span_selector_changed() > > + try: > > +
> self.span_selector_changed() > > + except ValueError: > > + if
> self.ss_right_value != NaN: > > Not completely steady on python NaN
> handling. Changed to use np.NaN > everywhere, and realized I forgot to
> update background removal version: >
> https://github.com/vidartf/hyperspy/commit/176d2f51aa5851ef563e92fd0c47c6280ad4eeccMaybethebest overall option is to allow left and right to be > interchangeable
> (left is minimum value, etc.) > ... <#1451df333b0aeaf7_> > On Tue, Apr 1,
> 2014 at 5:18 PM, francisco-dlp <notifications@github.com>wrote: In
> hyperspy/gui/egerton_quantification.py: > @@ -343,7 +343,11 @@ def
> _interpolator_kind_changed(self, old, new): > self.span_selector_changed()
> > > def _ss_left_value_changed(self, old, new): > -
> self.span_selector_changed() > + try: > + self.span_selector_changed() > +
> except ValueError: > + if self.ss_right_value != NaN: Shouldn't NaN be
> np.nan instead? -- Reply to this email directly or view it on GitHub<
> https://github.com/hyperspy/hyperspy/pull/258/files#r11164877> . -- Reply
> to this email directly or view it on GitHub<
> https://github.com/hyperspy/hyperspy/pull/258/files#r11165932> . -- Reply
> to this email directly or view it on GitHub<
> https://github.com/hyperspy/hyperspy/pull/258/files#r11166072> .
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/hyperspy/hyperspy/pull/258/files#r11166435>
> .
>