spacetelescope / exovetter

Exoplanet vetting
https://exovetter.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Vetter.run() should accept keyword argument plot #65

Open fergalm opened 3 years ago

fergalm commented 3 years ago

The current design of a vetter is

class Vetter:
    def run():
        pass

    def plot():
        pass 

The thinking was that computing metrics and plotting results were two separate operations. We've discovered that plotting typically happens deep inside the code wrapped by the class, and we had to store a lot of intermediate data in the vetter, violating the principle of encapsulation.

A better way to do things is to have

def run(self, tce, lc, plot=False):
     ...

The plot keyword can then be passed into the code executing the logic. We can then get rid of the plot method