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 9 forks source link

Outdated MIRI coronagraphy example - small fixes #112

Closed aggle closed 4 months ago

aggle commented 9 months ago

Hi folks, the MIRI coronagraphy example (examples/example_miri_sky_1386.py) is a little outdated. It two following changes to work: replace the contrast module with analysistools, and remove the frame=None argument from ImageTools.remove_frames().

1: Line 19: import ... contrast -> import ... analysistools Line 144: Contrast = contrast.Contrast(Database) -> AnalysisTools = analysistools.AnalysisTools(Database) Line 147: Contrast.raw_contrast(subdir='rawcon') -> AnalysisTools.raw_contrast(subdir='rawcon') Line 147 also is missing a photometry table argument: AnalysisTools.raw_contrast(photometry_file, subdir='rawcon')

2: Lines 72-75:

ImageTools.remove_frames(index=[0],
                             frame=None,
                             types=['SCI', 'SCI_BG', 'REF', 'REF_BG'],
                             subdir='removed')

should be

ImageTools.remove_frames(index=[0],
                             types=['SCI', 'SCI_BG', 'REF', 'REF_BG'],
                             subdir='removed')

I still get a NotImplementedError for the raw contrast calculation with MIRI data, but that is a bigger issue.