volcanotech-sw / PyCamPermanent

Permanent PiCam (SO2) installation project software
GNU General Public License v3.0
2 stars 3 forks source link

Nadeau flow error after updating background ROI #231

Open twVolc opened 1 month ago

twVolc commented 1 month ago

This error is in the current dev branch - possibly related to the recent update to move all velocity settings into a single window? Or it may have alway been there I just haven't performed this sequence of events before.

To reproduce:

  1. I have preloaded calibration, so a flux is immediately generated when playing around with the GUI.
  2. I opened up the plume velocity settings and played with the Nadeau line a little, then closed this window
  3. I went back to the Analysis window and drew a new ambient ROI
  4. I then get the following error:
    Traceback (most recent call last):
    File "C:\Users\gg1tcw\.conda\envs\pycam\lib\site-packages\matplotlib\cbook\__init__.py", line 287, in process
    func(*args, **kwargs)
    File "C:\Users\gg1tcw\.conda\envs\pycam\lib\site-packages\matplotlib\widgets.py", line 1958, in release
    self._release(event)
    File "C:\Users\gg1tcw\.conda\envs\pycam\lib\site-packages\matplotlib\widgets.py", line 2950, in _release
    self.onselect(self._eventpress, self._eventrelease)
    File "C:\Users\gg1tcw\Documents\PythonProjects\PyCamPermanent\pycam\gui\figures_analysis.py", line 668, in draw_roi
    pyplis_worker.load_sequence(pyplis_worker.img_dir, plot=True, plot_bg=False)
    File "C:\Users\gg1tcw\Documents\PythonProjects\PyCamPermanent\pycam\so2_camera_processor.py", line 976, in load_sequence
    self.process_pair(self.img_dir + '\\' + self.img_list[1][0],
    File "C:\Users\gg1tcw\Documents\PythonProjects\PyCamPermanent\pycam\so2_camera_processor.py", line 3564, in process_pair
    self.fig_nadeau.update_results(nadeau_plumespeed, info_dict)
    File "C:\Users\gg1tcw\Documents\PythonProjects\PyCamPermanent\pycam\gui\figures_analysis.py", line 4926, in update_results
    self.lag_pix.configure(text='{:.1f}'.format(info_dict['lag_in_pixels']))
    File "C:\Users\gg1tcw\.conda\envs\pycam\lib\tkinter\__init__.py", line 1646, in configure
    return self._configure('configure', cnf, kw)
    File "C:\Users\gg1tcw\.conda\envs\pycam\lib\tkinter\__init__.py", line 1636, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
    _tkinter.TclError: invalid command name ".!toplevel4.!notebook.!frame3.!frame2.!frame.!label4"

I'm guessing it's trying to update the frame when it isn't open so there's probably some missed bit of code that should be setting in_frame=False when that frame was closed, or something like that. I haven't investigated yet.

twVolc commented 1 month ago

Ok this is actually a bigger issue than I first thought - I tried the same steps, then clicked to run processing and it hits the same error. So essentially opening hte velocity window and going to the Nadeau tab stops processing from running