diff --git a/jwst/msaflagopen/msaflagopen_step.py b/jwst/msaflagopen/msaflagopen_step.py index afe5f7b1b7..9e2cf3ffc1 100755 --- a/jwst/msaflagopen/msaflagopen_step.py +++ b/jwst/msaflagopen/msaflagopen_step.py @@ -1,5 +1,7 @@ from stdatamodels.jwst import datamodels +from stpipe.crds_client import reference_uri_to_cache_path + from ..stpipe import Step from . import msaflag_open @@ -51,7 +53,6 @@ def process(self, input): def create_reference_filename_dictionary(input_model): reffiles = {} - a = Step() reffiles['distortion'] = input_model.meta.ref_file.distortion.name reffiles['filteroffset'] = input_model.meta.ref_file.filteroffset.name reffiles['specwcs'] = input_model.meta.ref_file.filteroffset.name @@ -72,5 +73,5 @@ def create_reference_filename_dictionary(input_model): # Convert from crds protocol to absolute filenames for key in reffiles.keys(): if reffiles[key].startswith('crds://'): - reffiles[key] = a.reference_uri_to_cache_path(reffiles[key], input_model.crds_observatory) + reffiles[key] = reference_uri_to_cache_path(reffiles[key], input_model.crds_observatory) return reffiles diff --git a/jwst/wavecorr/tests/test_wavecorr.py b/jwst/wavecorr/tests/test_wavecorr.py index 5ff61fc241..d2e3d08ce6 100644 --- a/jwst/wavecorr/tests/test_wavecorr.py +++ b/jwst/wavecorr/tests/test_wavecorr.py @@ -7,6 +7,7 @@ from stdatamodels.jwst import datamodels from stdatamodels.jwst.transforms import models +from stpipe.crds_client import reference_uri_to_cache_path import jwst from jwst.assign_wcs import AssignWcsStep @@ -59,7 +60,7 @@ def test_wavecorr(): # test the round-tripping on the wavelength correction transform ref_name = im_wave.meta.ref_file.wavecorr.name freference = datamodels.WaveCorrModel( - WavecorrStep.reference_uri_to_cache_path(ref_name, im.crds_observatory)) + reference_uri_to_cache_path(ref_name, im.crds_observatory)) lam_uncorr = lam_before * 1e-6 wave2wavecorr = wavecorr.calculate_wavelength_correction_transform( @@ -160,7 +161,7 @@ def test_skipped(): ref_name = outw.meta.ref_file.wavecorr.name reffile = datamodels.WaveCorrModel( - WavecorrStep.reference_uri_to_cache_path(ref_name, im.crds_observatory)) + reference_uri_to_cache_path(ref_name, im.crds_observatory)) source_xpos = 0.1 aperture_name = 'S200A1' @@ -262,10 +263,10 @@ def test_wavecorr_fs(): # test the roundtripping on the wavelength correction transform ref_name = result.meta.ref_file.wavecorr.name - freference = datamodels.WaveCorrModel(WavecorrStep.reference_uri_to_cache_path(ref_name, im.crds_observatory)) + freference = datamodels.WaveCorrModel(reference_uri_to_cache_path(ref_name, im.crds_observatory)) lam_uncorr = lam_before * 1e-6 - wave2wavecorr = wavecorr.calculate_wavelength_correction_transform(lam_uncorr, dispersion, + wave2wavecorr = wavecorr.calculate_wavelength_correction_transform(lam_uncorr, dispersion, freference, slit.source_xpos, 'S200A1') lam_corr = wave2wavecorr(lam_uncorr) assert_allclose(lam_uncorr, wave2wavecorr.inverse(lam_corr))