kammerje / spaceKLIP

Pipeline for reducing JWST high-contrast imaging data. Published in Kammerer et al. 2022 and Carter et al. 2022.
https://ui.adsabs.harvard.edu/abs/2022SPIE12180E..3NK/abstract
MIT License
16 stars 10 forks source link

No default value for save_rolls in pyklippipeline.py #94

Closed ecmatthews closed 1 year ago

ecmatthews commented 1 year ago

There is no default value for the key save_rolls in the function run_obs in pyklippipeline.py. If the value is not explicitly set, this causes the code to crash at line 572:

del kwargs_temp_temp['save_rolls']

since the key does not exist and cannot be deleted.

I believe the fix is to add a default value in the # Check Input section, line 516:

    if 'save_rolls' not in kwargs_temp.keys():
        kwargs_temp['save_ints'] = False

should be

    if 'save_rolls' not in kwargs_temp.keys():
        kwargs_temp['save_ints'] = False
        kwargs_temp['save_rolls'] = False

I can submit a PR with this change if you agree

AarynnCarter commented 1 year ago

Resolved with a quick hotfix, thanks for the fix!