twVolc / PyCamPermanent

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

Optismise gather_vars() #72

Open twVolc opened 9 months ago

twVolc commented 9 months ago

Optimise gather_vars() methods (mainly or entirely in figures_analysis.py) to loop through self.vars rather than explicitly writing each variable out - this is just tidier and makes it easier to add new variables. Simlarly close_window() methods can do the same. Examples: gather_vars()

for key in self.vars:
    self.pyplis_worker.config[key] = getattr(self, key)

close_window()

for key in self.vars.keys():
    setattr(self, key, self.pyplis_worker.config[key])