Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fergalm opened this issue May 11, 2021 · 0 comments
Open

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

fergalm opened this issue May 11, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@fergalm
Copy link
Collaborator

fergalm commented May 11, 2021

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

@fergalm fergalm added the enhancement New feature or request label May 11, 2021
@fergalm fergalm self-assigned this May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant