Skip to content

Commit

Permalink
Merge pull request #57 from SaOgaz/testing_setup
Browse files Browse the repository at this point in the history
adding new FUV test
  • Loading branch information
SaOgaz authored Aug 23, 2018
2 parents 7a10fac + 6637d35 commit acae126
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ class BaseCal(object):

# Numpy default for allclose comparison
rtol = 5e-7
atol = 2e-15

atol = 0

# To be defined by instrument
refstr = ''
Expand Down
23 changes: 21 additions & 2 deletions tests/test_calstis.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_ccd_imaging(self):
(outsx2, reffile_sx2)]
self.compare_outputs(outputs)

# def test_lev1_FUV(self):
# def test1_lev1_FUV(self):
# """
# This test is for level 1? FUV data
# """
Expand All @@ -45,13 +45,32 @@ def test_ccd_imaging(self):
# outroot = "calstis_lev1_FUVspec"
#
# # Run test
# calstis("o5cl02040_raw_pando.fits", outroot=outroot)
# calstis("o5cl02040_raw.fits", outroot=outroot)
#
# # Compare results
# outputs = [(outroot+"_flt.fits", outroot+"_flt_ref.fits"),
# (outroot+"_x1d.fits", outroot+"_x1d_ref.fits")]
# self.compare_outputs(outputs)


def test2_lev1_FUV(self):
"""
This test is for level 1? FUV data
"""

# Prepare input files.
self.get_input_file("input", "odj102010_raw.fits")
self.get_input_file("input", "odj102010_wav.fits")
outroot = "calstis_1lev1_FUVspec"

# Run test
calstis("odj102010_raw.fits", outroot=outroot)

# Compare results
outputs = [(outroot+"_flt.fits", outroot+"_flt_ref.fits"),
(outroot+"_x1d.fits", outroot+"_x1d_ref.fits")]
self.compare_outputs(outputs)

def test_lev2_CCD(self):
"""
This test is for level 2 CCD data
Expand Down
2 changes: 2 additions & 0 deletions tests/test_mktrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class TestMktrace(BaseSTIS):
input_loc = 'mktrace'
ref_loc = 'mktrace'

atol = 1e-14

def test_mktrace_t1(self, capsys):
"""
This tests a basic usage of stis.mktrace. To plot the results run
Expand Down

0 comments on commit acae126

Please sign in to comment.