Closed fmemuir closed 4 months ago
Issue was related to the parameters going into adjust_detection()
, vegline
is defined from the outset but not vegline_latlon
or vegline_proj
. When the condition on line 1994 is not satisfied (if len(pt) > 0:
), thenProcessShoreline()
is not called in order to define vegline_latlon
or vegline_proj
and the variables don't exist to be passed back upon return
of the function.
Bug appears when adjust_detection() is called to adjust the NDVI threshold used for veg edge extraction. If a point is clicked, the plot updates with the new veg edge position relating to that updated NDVI threshold. If no point is clicked however, and the user hits 'Enter' without clicking anything, the plot breaks with the error:
vegline_latlon referenced before assignment
Investigating to see where
vegline
might have been defined but notvegline_latlon
orvegline_proj