55from jwst .lib .set_telescope_pointing import add_wcs
66from jwst .stpipe import Step
77
8+ # Mark all tests in this module
9+ pytestmark = [pytest .mark .bigdata ]
10+
811
912@pytest .fixture (scope = "module" )
10- def run_pipelines (rtdata_module ):
13+ def run_pipelines (rtdata_module , resource_tracker ):
1114 """Run stage 2-3 tso pipelines on NIRCAM TSO grism data."""
1215 rtdata = rtdata_module
1316
14- # Run tso-spec2 pipeline on the _rateints file, saving intermediate products
15- rtdata .get_data ("nircam/tsgrism/jw01366002001_04103_00001-seg001_nrcalong_rateints.fits" )
16- args = ["calwebb_spec2" , rtdata .input ,
17- "--steps.flat_field.save_results=True" ,
18- "--steps.extract_2d.save_results=True" ,
19- "--steps.srctype.save_results=True"
20- ]
21- Step .from_cmdline (args )
22-
23- # Get the level3 association json file (though not its members) and run
24- # the tso3 pipeline on all _calints files listed in association
25- rtdata .get_data ("nircam/tsgrism/jw01366-o002_20230107t004627_tso3_00001_asn.json" )
26- args = ["calwebb_tso3" , rtdata .input ]
27- Step .from_cmdline (args )
17+ with resource_tracker .track ():
18+ # Run tso-spec2 pipeline on the _rateints file, saving intermediate products
19+ rtdata .get_data ("nircam/tsgrism/jw01366002001_04103_00001-seg001_nrcalong_rateints.fits" )
20+ args = ["calwebb_spec2" , rtdata .input ,
21+ "--steps.flat_field.save_results=True" ,
22+ "--steps.extract_2d.save_results=True" ,
23+ "--steps.srctype.save_results=True"
24+ ]
25+ Step .from_cmdline (args )
26+
27+ # Get the level3 association json file (though not its members) and run
28+ # the tso3 pipeline on all _calints files listed in association
29+ rtdata .get_data ("nircam/tsgrism/jw01366-o002_20230107t004627_tso3_00001_asn.json" )
30+ args = ["calwebb_tso3" , rtdata .input ]
31+ Step .from_cmdline (args )
2832
2933 return rtdata
3034
@@ -41,7 +45,10 @@ def run_pipeline_offsetSR(request, rtdata_module):
4145 return rtdata
4246
4347
44- @pytest .mark .bigdata
48+ def test_log_tracked_resources_pipelines (log_tracked_resources , run_pipelines ):
49+ log_tracked_resources ()
50+
51+
4552def test_nircam_tsgrism_stage2_offsetSR (run_pipeline_offsetSR , fitsdiff_default_kwargs ):
4653 """
4754 Test coverage for offset special requirement specifying nonzero offset in X.
@@ -58,7 +65,6 @@ def test_nircam_tsgrism_stage2_offsetSR(run_pipeline_offsetSR, fitsdiff_default_
5865 assert diff .identical , diff .report ()
5966
6067
61- @pytest .mark .bigdata
6268@pytest .mark .parametrize ("suffix" , ["calints" , "extract_2d" , "flat_field" ,
6369 "o002_crfints" , "srctype" , "x1dints" ])
6470def test_nircam_tsgrism_stage2 (run_pipelines , fitsdiff_default_kwargs , suffix ):
@@ -74,7 +80,6 @@ def test_nircam_tsgrism_stage2(run_pipelines, fitsdiff_default_kwargs, suffix):
7480 assert diff .identical , diff .report ()
7581
7682
77- @pytest .mark .bigdata
7883def test_nircam_tsgrism_stage3_x1dints (run_pipelines , fitsdiff_default_kwargs ):
7984 rtdata = run_pipelines
8085 rtdata .input = "jw01366-o002_20230107t004627_tso3_00001_asn.json"
@@ -85,7 +90,6 @@ def test_nircam_tsgrism_stage3_x1dints(run_pipelines, fitsdiff_default_kwargs):
8590 assert diff .identical , diff .report ()
8691
8792
88- @pytest .mark .bigdata
8993def test_nircam_tsgrism_stage3_whtlt (run_pipelines ):
9094 rtdata = run_pipelines
9195 rtdata .input = "jw01366-o002_20230107t004627_tso3_00001_asn.json"
@@ -99,7 +103,6 @@ def test_nircam_tsgrism_stage3_whtlt(run_pipelines):
99103 assert len (setdiff (table , table_truth )) == 0
100104
101105
102- @pytest .mark .bigdata
103106def test_nircam_setpointing_tsgrism (rtdata , fitsdiff_default_kwargs ):
104107 """
105108 Regression test of the set_telescope_pointing script on a level-1b NIRCam file.
0 commit comments