Skip to content

Commit

Permalink
Merge pull request #439 from mdlpstsci/update_asc_tests
Browse files Browse the repository at this point in the history
Update ACS tests to ignore additional keywords
  • Loading branch information
stsci-hack authored Sep 27, 2019
2 parents 2d7e582 + b9bb21b commit 54cbf1e
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 10 deletions.
8 changes: 6 additions & 2 deletions tests/acs/test_hrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class TestMosaic(BaseACS):
"""
detector = 'hrc'

ignore_keywords = ['filename', 'date', 'iraf-tlm', 'fitsdate',
'opus_ver', 'cal_ver', 'proctime', 'history',
'bitpix', 'naxis', 'extend', 'simple']

def test_4point_mosaic(self):
"""
Process an HRC mosaic dataset using the standard HRC-MOSAIC-BOX
Expand All @@ -34,7 +38,7 @@ def test_4point_mosaic(self):
('j6m901c3q_flt.fits', 'j6m901c3q_flt_ref.fits'),
('j6m901d9q_flt.fits', 'j6m901d9q_flt_ref.fits'),
('j6m901deq_flt.fits', 'j6m901deq_flt_ref.fits')]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestMosaic.ignore_keywords)

def test_3point_mosaic(self):
"""
Expand All @@ -59,4 +63,4 @@ def test_3point_mosaic(self):
outputs = [('j8cd02011_crj.fits', 'j8cd02011_sfl_ref.fits'),
('j8cd020a1_crj.fits', 'j8cd020a1_sfl_ref.fits'),
('j8cd020k1_crj.fits', 'j8cd020k1_sfl_ref.fits')]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestMosaic.ignore_keywords)
6 changes: 5 additions & 1 deletion tests/acs/test_hrc_single.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class TestSingle(BaseACS):
"""
detector = 'hrc'

ignore_keywords = ['filename', 'date', 'iraf-tlm', 'fitsdate',
'opus_ver', 'cal_ver', 'proctime', 'history',
'bitpix', 'naxis', 'extend', 'simple']

def _single_raw_calib(self, rootname):
raw_file = '{}_raw.fits'.format(rootname)

Expand All @@ -30,7 +34,7 @@ def _single_raw_calib(self, rootname):
# Compare results
outputs = [('{}_flt.fits'.format(rootname),
'{}_flt_ref.fits'.format(rootname))]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestSingle.ignore_keywords)

# NOTE:
# j8bt02loq = was hrc_single1
Expand Down
5 changes: 4 additions & 1 deletion tests/acs/test_sbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class TestSingleFrame(BaseACS):
"""Process a single SBC dataset."""
detector = 'sbc'

ignore_keywords = ['filename', 'date', 'iraf-tlm', 'fitsdate',
'opus_ver', 'cal_ver', 'proctime', 'history',
'bitpix', 'naxis', 'extend', 'simple']
# NOTE:
# j9ic01vpq = pre-SM4, was sbc_single1
# jbdf10ykq = post-SM4, was sbc_single2
Expand All @@ -28,4 +31,4 @@ def test_single_frame(self, rootname):
# Compare results
outputs = [('{}_flt.fits'.format(rootname),
'{}_flt_ref.fits'.format(rootname))]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestSingleFrame.ignore_keywords)
5 changes: 4 additions & 1 deletion tests/acs/test_wfc_asn.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ class TestFullFrameASN(BaseACS):
standard calibration steps turned on.
"""
detector = 'wfc'
ignore_keywords = ['filename', 'date', 'iraf-tlm', 'fitsdate',
'opus_ver', 'cal_ver', 'proctime', 'history',
'bitpix', 'naxis', 'extend', 'simple']

# NOTE:
# j6lq01010 = pre-SM4, was wfc_asn1
Expand Down Expand Up @@ -45,4 +48,4 @@ def test_fullframe(self, rootname, outroots):
'{}_flt_ref.fits'.format(outroot)),
('{}_flc.fits'.format(outroot),
'{}_flc_ref_gen2cte.fits'.format(outroot))]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestFullFrameASN.ignore_keywords)
5 changes: 4 additions & 1 deletion tests/acs/test_wfc_single.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class TestFullFrameSingle(BaseACS):
which includes bias shift, cross talk, and destripe corrections.
"""
detector = 'wfc'
ignore_keywords = ['filename', 'date', 'iraf-tlm', 'fitsdate',
'opus_ver', 'cal_ver', 'proctime', 'history',
'bitpix', 'naxis', 'extend', 'simple']

def _single_raw_calib(self, rootname):
raw_file = '{}_raw.fits'.format(rootname)
Expand All @@ -32,7 +35,7 @@ def _single_raw_calib(self, rootname):
'{}_flt_ref.fits'.format(rootname)),
('{}_flc.fits'.format(rootname),
'{}_flc_ref_gen2cte.fits'.format(rootname))]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestFullFrameSingle.ignore_keywords)

# NOTE: This is slow test due to PCTECORR=PERFORM
# NOTE:
Expand Down
7 changes: 5 additions & 2 deletions tests/acs/test_wfc_sinkcorr.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class TestSinkcorr(BaseACS):
and no PCTE correction.
"""
detector = 'wfc'
ignore_keywords = ['filename', 'date', 'iraf-tlm', 'fitsdate',
'opus_ver', 'cal_ver', 'proctime', 'history',
'bitpix', 'naxis', 'extend', 'simple']

def test_fullframe_sinkcorr(self):
"""Ported from ``wfc_sinkcorr``, routine test_sinkcorr_fullframe."""
Expand All @@ -24,7 +27,7 @@ def test_fullframe_sinkcorr(self):

# Compare results
outputs = [('jd1y03r5q_flt.fits', 'jd1y03r5q_flt_ref.fits')]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestSinkcorr.ignore_keywords)

def test_subarray_sinkcorr(self):
"""Ported from ``wfc_sinkcorr``, routine test_sinkcorr_subarr."""
Expand All @@ -38,4 +41,4 @@ def test_subarray_sinkcorr(self):

# Compare results
outputs = [('jd0q13ktq_flt.fits', 'jd0q13ktq_flt_ref.fits')]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestSinkcorr.ignore_keywords)
7 changes: 5 additions & 2 deletions tests/acs/test_wfc_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class TestWFCSubarray(BaseACS):
Process a single WFC subarray with all standard calibration steps on.
"""
detector = 'wfc'
ignore_keywords = ['filename', 'date', 'iraf-tlm', 'fitsdate',
'opus_ver', 'cal_ver', 'proctime', 'history',
'bitpix', 'naxis', 'extend', 'simple']

# NOTE: This has PCTECORR=OMIT.
# NOTE:
Expand All @@ -30,7 +33,7 @@ def test_subarray(self, rootname):
# Compare results
outputs = [('{}_flt.fits'.format(rootname),
'{}_flt_ref.fits'.format(rootname))]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestWFCSubarray.ignore_keywords)

# NOTE: This is slow test due to PCTECORR=PERFORM
@pytest.mark.slow
Expand All @@ -49,4 +52,4 @@ def test_subarray_pctecorr(self):
# Compare results
outputs = [('jb5s01fnq_flt.fits', 'jb5s01fnq_flt_ref.fits'),
('jb5s01fnq_flc.fits', 'jb5s01fnq_flc_ref_gen2cte.fits')]
self.compare_outputs(outputs)
self.compare_outputs(outputs, ignore_keywords_overwrite=TestWFCSubarray.ignore_keywords)

0 comments on commit 54cbf1e

Please sign in to comment.