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

allow to skip some routines #13

Open
cristobal-sifon opened this issue Jan 12, 2018 · 6 comments
Open

allow to skip some routines #13

cristobal-sifon opened this issue Jan 12, 2018 · 6 comments

Comments

@cristobal-sifon
Copy link
Owner

For instance, if the wavelength solution didn't quite work, it isn't necessary to do all the previous steps. It would be good if the code just started from the wavelength calibration using the (presumably) updated configuration.

@cristobal-sifon
Copy link
Owner Author

it's not obvious what's the best way to do this.

  • I could add a skip flag (e.g., --skip gsflat) but then the user would need to remember exactly which steps already happened (they kind of should, but it's not the easiest option). And it's not clear it would be good to allow the user to skip later tasks (e.g., --skip gsskysub).
  • I could have a begin flag (e.g., --begin gswavelength), but this would be very cumbersome in the code:
if not args.begin:
    tasks.call_gsflat(...)
    ...
if args.begin not in (lacos, gswavelength, gstransform, gsskysub):
    tasks.call_gsreduce(...)
    ...
if args.begin not in (gswavelength, gstransform, gsskysub):
    tasks.call_lacos(...)
    ...
if args.begin not in (gstransform, gsskysub):
    tasks.call_gswave(...)
    ...
# and so on
  • Perhaps all that's really needed are three options: start from the beginning, start with the wavelength calibration (i.e., skip gsflat and gsreduce), or start from the sky subtraction (i.e., also skip gswavelength and gstransform). These functions are the most likely to have to happen interactively or several times (?).

@cristobal-sifon
Copy link
Owner Author

For now will try option 2. However, that when skipping each task I should also make sure that the output files exist!

@cristobal-sifon
Copy link
Owner Author

implemented in 95e9c18

@cristobal-sifon
Copy link
Owner Author

the problem with all of this is that I may want to skip it for one exposure but not necessarily for all!

It will be very hard to properly get around that, but for now I'll do the following: if --begin suggests a given task exists and the output of that task exists, then the pipeline will skip it.

@cristobal-sifon
Copy link
Owner Author

gswavelength does not produce such an obvious output. Will leave for later (not allowed to skip for now)

@cristobal-sifon
Copy link
Owner Author

but then we have the opposite: what if I want to start from the beginning on (say) the second set of files? Maybe the script should just prompt whenever the output file exists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant