Cleaning Residual 1/f Noise in NIRSpec MOS Products with NSClean#
Notebook Goal#
The goal of this notebook is to generate cleaned MOS (_rate.fits) files by removing residual 1/f noise. These cleaned files will be used as input for the level 3 (Spec3Pipeline) pipeline.
Table of Contents#
1. Introduction #
The JWST NIRSpec instrument has a number of features and characteristics that observers should be aware of when planning observations and interpreting data. One notable feature seen in NIRSpec pipeline products is negative and/or surplus flux in the extracted 1-D spectrum, typically with an irregular wavelength-dependent undulation. The cause of this artifact is correlated noise, known as 1/f noise, from low-level detector thermal instabilities, seen as vertical banding in 2-D count rate images, particularly in exposures of the NRS2 detector. While the IRS2 readout mode reduces this effect, it is not completely eliminated.
To address this issue, the JWST Science Calibration Pipeline has integrated an external package developed by Bernard Rauscher, known as NSClean, within the Spec2Pipeline under NSCleanStep. This algorithm uses dark areas of the detector to fit a background model to the data in Fourier space. It requires an input mask to identify all dark areas of the detector. The more thorough and complete this mask is, the better the background fit.
In this notebook, we will use the NSClean algorithm integrated into the pipeline, utilizing a mask generated on-the-fly with default parameters to remove 1/f noise. In some cases, this mask may not be complete enough/too restrictive for the best possible noise removal. To address this, we demonstrate how one can manually modify the default mask, as well as how to create an alternative mask by adjusting the NSCleanStep parameters. If needed, see the NSClean documentation for some suggestions on manually creating a custom mask.
This notebook utilizes a MOS observation from the CEERS program with grating/filter G395M/F290LP, which is part of the JWST Early Release Science program ERS-1345 observation 61, as an example.
2. Import Library #
# ---------- Set CRDS environment variables ----------
import os
import jwst
# Set the CRDS context if you'd like something different from the default
# os.environ['CRDS_CONTEXT'] = 'jwst_1210.pmap'
os.environ['CRDS_PATH'] = os.environ['HOME']+'/crds_cache'
os.environ['CRDS_SERVER_URL'] = 'https://jwst-crds.stsci.edu'
print(f'CRDS cache location: {os.environ["CRDS_PATH"]}')
print("JWST Calibration Pipeline Version={}".format(jwst.__version__))
# print("Current Operational CRDS Context = {}".format(crds.get_default_context()))
CRDS cache location: /home/runner/crds_cache
JWST Calibration Pipeline Version=1.20.2
# ------ General Imports ------
import numpy as np
import time as tt
import logging
import warnings
# ------ JWST Calibration Pipeline Imports ------
from jwst.pipeline.calwebb_spec2 import Spec2Pipeline
# ------ Plotting/Stats Imports ------
from matplotlib import pyplot as plt
from astropy.io import fits
from utils import get_jwst_file, plot_dark_data, plot_cleaned_data, plot_spectra
# Hide all log and warning messages.
logging.disable(logging.ERROR)
warnings.simplefilter("ignore", RuntimeWarning)
3. Download the Data #
The input data for this notebook features a MOS observation from the CEERS program with grating/filter G395H/F290LP. The dataset is part of the JWST Early Release Science program ERS-1345, specifically observation 61. It consists of 3 integrations (3 dither points; 3-SHUTTER-SLITLET) with 9 groups each. This notebook focuses on the third dithered exposure (00003) as an example. However, it’s important to note that before proceeding to the Spec3Pipeline, all exposures must first be processed through the Spec2Pipeline.
# Define a downloads directory.
mast_products_dir = "./mast_products/"
# Check if the directory exists.
if not os.path.exists(mast_products_dir):
# Create the directory if it doesn't exist.
os.makedirs(mast_products_dir)
# This notebook focuses on the third dithered exposure.
obs_ids = ["jw01345061001_07101_00003"]
detectors = [1, 2] # Both Detectors NRS1 and NRS2.
# Specify countrate products
rate_names = []
for obs_id in obs_ids:
for detector in detectors:
rate_names.append(f"{obs_id}_nrs{detector}_rate.fits")
# Download all the FITS files and associated MSA files.
msa_names = []
for name in rate_names:
print(f"Downloading {name}")
get_jwst_file(
name,
mast_api_token="75f915f251544013bb127b7f6f6edc80",
save_directory=mast_products_dir,
)
# Retrieve the MSA file from the header in the downloaded file.
msa_name = fits.getval(mast_products_dir + name, "MSAMETFL")
if not os.path.isfile(msa_name):
print(f"Downloading {msa_name}")
get_jwst_file(
msa_name,
mast_api_token=None,
save_directory=mast_products_dir,
)
msa_names.append(msa_name)
Downloading jw01345061001_07101_00003_nrs1_rate.fits
The file jw01345061001_07101_00003_nrs1_rate.fits already exists in the directory. Skipping download.
Downloading jw01345061001_01_msa.fits
The file jw01345061001_01_msa.fits already exists in the directory. Skipping download.
Downloading jw01345061001_07101_00003_nrs2_rate.fits
The file jw01345061001_07101_00003_nrs2_rate.fits already exists in the directory. Skipping download.
Downloading jw01345061001_01_msa.fits
The file jw01345061001_01_msa.fits already exists in the directory. Skipping download.
4. Running Spec2Pipeline without NSClean (Original Data) #
The cell below executes the Spec2Pipeline, explicitly skipping the NSClean step during processing. The level 2 products generated will serve as a reference point to illustrate how the countrate images and final extracted spectra appear without the removal of 1/f noise.
# Set up directory for running the pipeline without NSClean.
stage2_nsclean_skipped_dir = "./stage2_nsclean_skipped/"
if not os.path.exists(stage2_nsclean_skipped_dir):
os.makedirs(stage2_nsclean_skipped_dir) # Create the directory if it doesn't exist.
# Original data (no NSClean Applied).
# Estimated run-time: 1-2 minutes.
start = tt.time()
for i in rate_names:
print(f"Processing {i}...")
if "nrs1" in i:
slit_name = "80"
else:
slit_name = "11"
Spec2Pipeline.call(
mast_products_dir + i,
save_results=True,
steps={"nsclean": {"skip": True}, "extract_2d": {"slit_names": slit_name}},
output_dir=stage2_nsclean_skipped_dir,
)
print(f"Saved {i[:-9]}" + "cal.fits")
print(f"Saved {i[:-9]}" + "x1d.fits")
end = tt.time()
print("Run time: ", round(end - start, 1) / 60.0, " min")
Processing jw01345061001_07101_00003_nrs1_rate.fits...
Saved jw01345061001_07101_00003_nrs1_cal.fits
Saved jw01345061001_07101_00003_nrs1_x1d.fits
Processing jw01345061001_07101_00003_nrs2_rate.fits...
Saved jw01345061001_07101_00003_nrs2_cal.fits
Saved jw01345061001_07101_00003_nrs2_x1d.fits
Run time: 0.7683333333333333 min
5. Clean up 1/f Noise with NSClean (Default Pipeline Mask) #
If a user-supplied mask file is not provided to the NSClean step in the Spec2Pipeline, the pipeline will generate a mask based on default parameters. This mask will identify any pixel that is unilluminated. That is, the mask must contain True and False values, where True indicates that the pixel is dark, and False indicates that the pixel is illuminated (not dark).
By default, the pipeline marks the following detector areas as illuminated, non-dark areas (False):
Pixels designated as open slits for this MOS observation.
Traces from failed-open MSA shutters.
5-sigma outliers (default value).
Any pixel set to NaN in the rate data.
To tune the outlier detection in the mask, try modifying the n_sigma parameter (explored in the next section). A higher value will identify fewer outliers. A lower value will identify more.
The default generated mask is saved and analyzed below.
# Set up directory for running NSClean with default parameters.
stage2_nsclean_default_dir = "./stage2_nsclean_default/"
if not os.path.exists(stage2_nsclean_default_dir):
os.makedirs(stage2_nsclean_default_dir) # Create the directory if it doesn't exist.
# 1/f noise cleaned data (default NSClean pipeline mask).
# Estimated run time: 6 minutes.
start = tt.time()
for i in rate_names:
print(f"Processing {i}...")
if "nrs1" in i:
slit_name = "80"
else:
slit_name = "11"
Spec2Pipeline.call(
mast_products_dir + i,
save_results=True,
steps={
"nsclean": {"skip": False, "save_mask": True, "save_results": True},
"extract_2d": {"slit_names": slit_name},
},
output_dir=stage2_nsclean_default_dir,
)
print(f"Saved {i[:-9]}" + "mask.fits")
print(f"Saved {i[:-9]}" + "nsclean.fits")
print(f"Saved {i[:-9]}" + "cal.fits")
print(f"Saved {i[:-9]}" + "x1d.fits")
end = tt.time()
print("Run time: ", round(end - start, 1) / 60.0, " min")
Processing jw01345061001_07101_00003_nrs1_rate.fits...
2026-03-27 13:30:27,139 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Creating mask
2026-03-27 13:30:27,140 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Finding slit/slitlet pixels
2026-03-27 13:30:30,411 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Masking the fixed slit region for MOS data.
2026-03-27 13:30:30,725 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Cleaning image jw01345061001_07101_00003_nrs1_rate.fits
2026-03-27 13:30:32,970 - jwst.nsclean.nsclean_step - INFO - Saving mask file ./stage2_nsclean_default/jw01345061001_07101_00003_nrs1_mask.fits
2026-03-27 13:30:34,765 - stpipe.step - INFO - Saved model in ./stage2_nsclean_default/jw01345061001_07101_00003_nrs1_nsclean.fits
2026-03-27 13:30:34,766 - stpipe.step - INFO - Step nsclean done
2026-03-27 13:30:35,078 - stpipe.step - INFO - Step imprint_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_nsclean.fits>, []).
2026-03-27 13:30:35,080 - stpipe.step - INFO - Step skipped.
2026-03-27 13:30:35,341 - stpipe.step - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_nsclean.fits>, []).
2026-03-27 13:30:35,343 - stpipe.step - INFO - Step skipped.
2026-03-27 13:30:35,591 - stpipe.step - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:30:35,597 - jwst.extract_2d.extract_2d - INFO - EXP_TYPE is NRS_MSASPEC
2026-03-27 13:30:35,598 - jwst.extract_2d.nirspec - INFO - Slits selected:
2026-03-27 13:30:35,599 - jwst.extract_2d.nirspec - INFO - Name: 80, source_id: 1509
2026-03-27 13:30:35,662 - jwst.extract_2d.nirspec - INFO - Name of subarray extracted: 80
2026-03-27 13:30:35,663 - jwst.extract_2d.nirspec - INFO - Subarray x-extents are: 423 1777
2026-03-27 13:30:35,664 - jwst.extract_2d.nirspec - INFO - Subarray y-extents are: 262 295
2026-03-27 13:30:35,939 - jwst.extract_2d.nirspec - INFO - set slit_attributes completed
2026-03-27 13:30:35,947 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.817179331 52.830822659 214.816253456 52.830818677 214.816255004 52.830763514 214.817180881 52.830767490
2026-03-27 13:30:35,948 - jwst.extract_2d.nirspec - INFO - Updated S_REGION to POLYGON ICRS 214.817179331 52.830822659 214.816253456 52.830818677 214.816255004 52.830763514 214.817180881 52.830767490
2026-03-27 13:30:36,016 - stpipe.step - INFO - Step extract_2d done
2026-03-27 13:30:36,266 - stpipe.step - INFO - Step srctype running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:30:36,412 - jwst.srctype.srctype - INFO - Input EXP_TYPE is NRS_MSASPEC
2026-03-27 13:30:36,414 - jwst.srctype.srctype - INFO - source_id=1509, stellarity=1.0000, type=POINT
2026-03-27 13:30:36,415 - stpipe.step - INFO - Step srctype done
2026-03-27 13:30:36,842 - stpipe.step - INFO - Step master_background_mos running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:30:36,849 - jwst.master_background.master_background_mos_step - WARNING - No background slits available for creating master background. Skipping
2026-03-27 13:30:37,003 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:30:37,004 - stpipe.step - INFO - Step master_background_mos done
2026-03-27 13:30:37,272 - stpipe.step - INFO - Step wavecorr running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:30:37,455 - jwst.wavecorr.wavecorr_step - INFO - Using WAVECORR reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf
2026-03-27 13:30:37,455 - jwst.wavecorr.wavecorr - INFO - Detected a POINT source type in slit 80
2026-03-27 13:30:37,541 - jwst.wavecorr.wavecorr - INFO - Using wavelength zero-point correction for aperture MOS
2026-03-27 13:30:37,585 - stpipe.step - INFO - Step wavecorr done
2026-03-27 13:30:37,868 - stpipe.step - INFO - Step flat_field running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:30:37,893 - jwst.flatfield.flat_field_step - INFO - No reference found for type FLAT
2026-03-27 13:30:38,058 - jwst.flatfield.flat_field_step - INFO - Using FFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits
2026-03-27 13:30:38,598 - jwst.flatfield.flat_field_step - INFO - Using SFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0225.fits
2026-03-27 13:30:38,762 - jwst.flatfield.flat_field_step - INFO - Using DFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0001.fits
2026-03-27 13:30:38,905 - jwst.flatfield.flat_field - INFO - Working on slit 80
2026-03-27 13:30:39,329 - stpipe.step - INFO - Step flat_field done
2026-03-27 13:30:39,615 - stpipe.step - INFO - Step pathloss running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:30:39,629 - jwst.pathloss.pathloss_step - INFO - Using PATHLOSS reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits
2026-03-27 13:30:39,695 - jwst.pathloss.pathloss - INFO - Input exposure type is NRS_MSASPEC
2026-03-27 13:30:39,840 - jwst.pathloss.pathloss - INFO - Working on slit 0
2026-03-27 13:30:39,841 - jwst.pathloss.pathloss - INFO - Shutter state = 11x, using MOS1x3 entry in ref file
2026-03-27 13:30:39,842 - jwst.pathloss.pathloss - INFO - Shutter above fiducial is closed, using upper region of pathloss array
2026-03-27 13:30:39,914 - stpipe.step - INFO - Step pathloss done
2026-03-27 13:30:40,200 - stpipe.step - INFO - Step barshadow running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:30:40,215 - jwst.barshadow.barshadow_step - INFO - Using BARSHADOW reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits
2026-03-27 13:30:40,395 - jwst.barshadow.bar_shadow - INFO - Working on slitlet 80
2026-03-27 13:30:40,396 - jwst.barshadow.bar_shadow - INFO - Bar shadow correction skipped for slitlet 80 (source not uniform)
2026-03-27 13:30:40,404 - stpipe.step - INFO - Step barshadow done
2026-03-27 13:30:40,693 - stpipe.step - INFO - Step photom running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:30:40,711 - jwst.photom.photom_step - INFO - Using photom reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits
2026-03-27 13:30:40,711 - jwst.photom.photom_step - INFO - Using area reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits
2026-03-27 13:30:40,874 - jwst.photom.photom - INFO - Using instrument: NIRSPEC
2026-03-27 13:30:40,875 - jwst.photom.photom - INFO - detector: NRS1
2026-03-27 13:30:40,875 - jwst.photom.photom - INFO - exp_type: NRS_MSASPEC
2026-03-27 13:30:40,876 - jwst.photom.photom - INFO - filter: F290LP
2026-03-27 13:30:40,877 - jwst.photom.photom - INFO - grating: G395M
2026-03-27 13:30:40,925 - jwst.photom.photom - INFO - Working on slit 80
2026-03-27 13:30:40,925 - jwst.photom.photom - INFO - PHOTMJSR value: 1
2026-03-27 13:30:40,956 - stpipe.step - INFO - Step photom done
2026-03-27 13:30:41,400 - stpipe.step - INFO - Step pixel_replace running with args (<MultiSlitModel from ./stage2_nsclean_default/jw01345061001_07101_00003_nrs1_cal.fits>,).
2026-03-27 13:30:41,402 - stpipe.step - INFO - Step skipped.
2026-03-27 13:30:41,620 - stpipe.step - INFO - Step resample_spec running with args (<MultiSlitModel from ./stage2_nsclean_default/jw01345061001_07101_00003_nrs1_cal.fits>,).
2026-03-27 13:30:41,928 - jwst.exp_to_source.exp_to_source - INFO - Reorganizing data from exposure ./stage2_nsclean_default/jw01345061001_07101_00003_nrs1_cal.fits
2026-03-27 13:30:42,320 - jwst.resample.resample_spec - INFO - Specified output pixel scale ratio: 1.0.
2026-03-27 13:30:42,331 - jwst.resample.resample_spec - INFO - Computed output pixel scale: 0.1036 arcsec.
2026-03-27 13:30:42,333 - stcal.resample.resample - INFO - Output pixel scale: 0.10360056702018924 arcsec.
2026-03-27 13:30:42,334 - stcal.resample.resample - INFO - Driz parameter kernel: square
2026-03-27 13:30:42,335 - stcal.resample.resample - INFO - Driz parameter pixfrac: 1.0
2026-03-27 13:30:42,336 - stcal.resample.resample - INFO - Driz parameter fillval: NaN
2026-03-27 13:30:42,336 - stcal.resample.resample - INFO - Driz parameter weight_type: exptime
2026-03-27 13:30:42,338 - jwst.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:30:42,393 - stcal.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:30:42,397 - stcal.resample.resample - INFO - Drizzling (33, 1354) --> (21, 1354)
2026-03-27 13:30:42,401 - stcal.resample.resample - INFO - Drizzling (33, 1354) --> (21, 1354)
2026-03-27 13:30:42,406 - stcal.resample.resample - INFO - Drizzling (33, 1354) --> (21, 1354)
2026-03-27 13:30:42,547 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.816217049 52.830790936 214.817169667 52.830790936 214.817169667 52.830795030 214.816217049 52.830795030
2026-03-27 13:30:42,699 - stpipe.step - INFO - Saved model in ./stage2_nsclean_default/jw01345061001_07101_00003_nrs1_s2d.fits
2026-03-27 13:30:42,700 - stpipe.step - INFO - Step resample_spec done
2026-03-27 13:30:42,787 - jwst.pipeline.calwebb_spec2 - INFO - Extracting 1 MSA slitlets
2026-03-27 13:30:43,027 - stpipe.step - INFO - Step extract_1d running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_s2d.fits>,).
2026-03-27 13:30:43,198 - jwst.extract_1d.extract_1d_step - INFO - Using EXTRACT1D reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json
2026-03-27 13:30:43,203 - jwst.extract_1d.extract_1d_step - INFO - Using APCORR file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits
2026-03-27 13:30:43,245 - jwst.extract_1d.extract - INFO - Working on slit 80
2026-03-27 13:30:43,246 - jwst.lib.pipe_utils - WARNING - Mismatched data shapes; skipping invalid data updates for extension 'dq'
2026-03-27 13:30:43,247 - jwst.extract_1d.extract - INFO - Turning on source position correction for exp_type = NRS_MSASPEC
2026-03-27 13:30:43,250 - jwst.extract_1d.source_location - INFO - Using source_xpos and source_ypos to center extraction.
2026-03-27 13:30:43,254 - jwst.extract_1d.extract - INFO - Computed source location is 4.78, at pixel 676, wavelength 4.07
2026-03-27 13:30:43,255 - jwst.extract_1d.extract - INFO - Nominal aperture start/stop: 7.50 -> 12.50 (inclusive)
2026-03-27 13:30:43,256 - jwst.extract_1d.extract - INFO - Nominal location is 10.00, so offset is -5.22 pixels
2026-03-27 13:30:43,258 - jwst.extract_1d.extract - INFO - Mean aperture start/stop from trace: 2.28 -> 7.28 (inclusive)
2026-03-27 13:30:43,261 - jwst.extract_1d.extract - INFO - Creating aperture correction.
2026-03-27 13:30:44,308 - stpipe.step - INFO - Step extract_1d done
2026-03-27 13:30:44,376 - stpipe.step - INFO - Saved model in ./stage2_nsclean_default/jw01345061001_07101_00003_nrs1_x1d.fits
2026-03-27 13:30:44,378 - jwst.pipeline.calwebb_spec2 - INFO - Finished processing product mast_products/jw01345061001_07101_00003_nrs1
2026-03-27 13:30:44,379 - jwst.pipeline.calwebb_spec2 - INFO - Ending calwebb_spec2
2026-03-27 13:30:44,380 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:30:44,630 - stpipe.step - INFO - Saved model in ./stage2_nsclean_default/jw01345061001_07101_00003_nrs1_cal.fits
2026-03-27 13:30:44,631 - stpipe.step - INFO - Step Spec2Pipeline done
2026-03-27 13:30:44,631 - jwst.stpipe.core - INFO - Results used jwst version: 1.20.2
2026-03-27 13:30:44,662 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
2026-03-27 13:30:44,680 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
2026-03-27 13:30:44,703 - stpipe.step - INFO - Spec2Pipeline instance created.
2026-03-27 13:30:44,704 - stpipe.step - INFO - AssignWcsStep instance created.
2026-03-27 13:30:44,706 - stpipe.step - INFO - BadpixSelfcalStep instance created.
2026-03-27 13:30:44,706 - stpipe.step - INFO - MSAFlagOpenStep instance created.
2026-03-27 13:30:44,708 - stpipe.step - INFO - NSCleanStep instance created.
2026-03-27 13:30:44,709 - stpipe.step - INFO - BackgroundStep instance created.
2026-03-27 13:30:44,709 - stpipe.step - INFO - ImprintStep instance created.
2026-03-27 13:30:44,710 - stpipe.step - INFO - Extract2dStep instance created.
2026-03-27 13:30:44,715 - stpipe.step - INFO - MasterBackgroundMosStep instance created.
2026-03-27 13:30:44,716 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:30:44,716 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:30:44,718 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:30:44,718 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:30:44,719 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:30:44,721 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:30:44,722 - stpipe.step - INFO - Extract1dStep instance created.
2026-03-27 13:30:44,723 - stpipe.step - INFO - WavecorrStep instance created.
2026-03-27 13:30:44,725 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:30:44,726 - stpipe.step - INFO - SourceTypeStep instance created.
2026-03-27 13:30:44,727 - stpipe.step - INFO - StraylightStep instance created.
2026-03-27 13:30:44,727 - stpipe.step - INFO - FringeStep instance created.
2026-03-27 13:30:44,728 - stpipe.step - INFO - ResidualFringeStep instance created.
2026-03-27 13:30:44,729 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:30:44,731 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:30:44,732 - stpipe.step - INFO - WfssContamStep instance created.
2026-03-27 13:30:44,732 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:30:44,733 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:30:44,735 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:30:44,736 - stpipe.step - INFO - CubeBuildStep instance created.
2026-03-27 13:30:44,738 - stpipe.step - INFO - Extract1dStep instance created.
Saved jw01345061001_07101_00003_nrs1_mask.fits
Saved jw01345061001_07101_00003_nrs1_nsclean.fits
Saved jw01345061001_07101_00003_nrs1_cal.fits
Saved jw01345061001_07101_00003_nrs1_x1d.fits
Processing jw01345061001_07101_00003_nrs2_rate.fits...
2026-03-27 13:30:45,005 - stpipe.step - INFO - Step Spec2Pipeline running with args ('./mast_products/jw01345061001_07101_00003_nrs2_rate.fits',).
2026-03-27 13:30:45,039 - stpipe.step - INFO - Step Spec2Pipeline parameters are:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: ./stage2_nsclean_default/
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_bsub: False
fail_on_exception: True
save_wfss_esec: False
steps:
assign_wcs:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sip_approx: True
sip_max_pix_error: 0.01
sip_degree: None
sip_max_inv_pix_error: 0.01
sip_inv_degree: None
sip_npoints: 12
slit_y_low: -0.55
slit_y_high: 0.55
nrs_ifu_slice_wcs: False
badpix_selfcal:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
flagfrac_lower: 0.001
flagfrac_upper: 0.001
kernel_size: 15
force_single: False
save_flagged_bkg: False
msa_flagging:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
nsclean:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
fit_method: fft
fit_by_channel: False
background_method: None
background_box_size: None
mask_spectral_regions: True
n_sigma: 5.0
fit_histogram: False
single_mask: False
user_mask: None
save_mask: True
save_background: False
save_noise: False
bkg_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
bkg_list: None
save_combined_background: False
sigma: 3.0
maxiters: None
soss_source_percentile: 35.0
soss_bkg_percentile: None
wfss_mmag_extract: None
wfss_maxiter: 5
wfss_rms_stop: 0.0
wfss_outlier_percent: 1.0
imprint_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
extract_2d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
slit_names:
- '11'
source_ids: None
extract_orders: None
grism_objects: None
tsgrism_extract_height: None
wfss_extract_half_height: 5
wfss_mmag_extract: None
wfss_nbright: 1000
master_background_mos:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sigma_clip: 3.0
median_kernel: 1
force_subtract: False
save_background: False
user_background: None
inverse: False
steps:
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
wavecorr:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
srctype:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
source_type: None
straylight:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
clean_showers: False
shower_plane: 3
shower_x_stddev: 18.0
shower_y_stddev: 5.0
shower_low_reject: 0.1
shower_high_reject: 99.9
save_shower_model: False
fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
residual_fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: residual_fringe
search_output_file: False
input_dir: ''
save_intermediate_results: False
ignore_region_min: None
ignore_region_max: None
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
wfss_contam:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
save_simulated_image: False
save_contam_images: False
maximum_cores: none
orders: None
magnitude_limit: None
wl_oversample: 2
max_pixels_per_chunk: 50000
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
cube_build:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: s3d
search_output_file: False
input_dir: ''
pipeline: 3
channel: all
band: all
grating: all
filter: all
output_type: None
scalexy: 0.0
scalew: 0.0
weighting: drizzle
coord_system: skyalign
ra_center: None
dec_center: None
cube_pa: None
nspax_x: None
nspax_y: None
rois: 0.0
roiw: 0.0
weight_power: 2.0
wavemin: None
wavemax: None
single: False
skip_dqflagging: False
offset_file: None
debug_spaxel: -1 -1 -1
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
2026-03-27 13:30:45,071 - stpipe.pipeline - INFO - Prefetching reference files for dataset: 'jw01345061001_07101_00003_nrs2_rate.fits' reftypes = ['apcorr', 'area', 'barshadow', 'bkg', 'camera', 'collimator', 'cubepar', 'dflat', 'disperser', 'distortion', 'extract1d', 'fflat', 'filteroffset', 'flat', 'fore', 'fpa', 'fringe', 'ifufore', 'ifupost', 'ifuslicer', 'mrsxartcorr', 'msa', 'msaoper', 'ote', 'pastasoss', 'pathloss', 'photom', 'psf', 'regions', 'sflat', 'speckernel', 'specprofile', 'specwcs', 'wavecorr', 'wavelengthrange']
2026-03-27 13:30:45,076 - stpipe.pipeline - INFO - Prefetch for APCORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits'.
2026-03-27 13:30:45,076 - stpipe.pipeline - INFO - Prefetch for AREA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits'.
2026-03-27 13:30:45,077 - stpipe.pipeline - INFO - Prefetch for BARSHADOW reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits'.
2026-03-27 13:30:45,077 - stpipe.pipeline - INFO - Prefetch for BKG reference file is 'N/A'.
2026-03-27 13:30:45,078 - stpipe.pipeline - INFO - Prefetch for CAMERA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf'.
2026-03-27 13:30:45,079 - stpipe.pipeline - INFO - Prefetch for COLLIMATOR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf'.
2026-03-27 13:30:45,079 - stpipe.pipeline - INFO - Prefetch for CUBEPAR reference file is 'N/A'.
2026-03-27 13:30:45,080 - stpipe.pipeline - INFO - Prefetch for DFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0002.fits'.
2026-03-27 13:30:45,080 - stpipe.pipeline - INFO - Prefetch for DISPERSER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf'.
2026-03-27 13:30:45,081 - stpipe.pipeline - INFO - Prefetch for DISTORTION reference file is 'N/A'.
2026-03-27 13:30:45,082 - stpipe.pipeline - INFO - Prefetch for EXTRACT1D reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json'.
2026-03-27 13:30:45,083 - stpipe.pipeline - INFO - Prefetch for FFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits'.
2026-03-27 13:30:45,083 - stpipe.pipeline - INFO - Prefetch for FILTEROFFSET reference file is 'N/A'.
2026-03-27 13:30:45,084 - stpipe.pipeline - INFO - Prefetch for FLAT reference file is 'N/A'.
2026-03-27 13:30:45,085 - stpipe.pipeline - INFO - Prefetch for FORE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf'.
2026-03-27 13:30:45,085 - stpipe.pipeline - INFO - Prefetch for FPA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf'.
2026-03-27 13:30:45,086 - stpipe.pipeline - INFO - Prefetch for FRINGE reference file is 'N/A'.
2026-03-27 13:30:45,087 - stpipe.pipeline - INFO - Prefetch for IFUFORE reference file is 'N/A'.
2026-03-27 13:30:45,087 - stpipe.pipeline - INFO - Prefetch for IFUPOST reference file is 'N/A'.
2026-03-27 13:30:45,088 - stpipe.pipeline - INFO - Prefetch for IFUSLICER reference file is 'N/A'.
2026-03-27 13:30:45,088 - stpipe.pipeline - INFO - Prefetch for MRSXARTCORR reference file is 'N/A'.
2026-03-27 13:30:45,089 - stpipe.pipeline - INFO - Prefetch for MSA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf'.
2026-03-27 13:30:45,090 - stpipe.pipeline - INFO - Prefetch for MSAOPER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json'.
2026-03-27 13:30:45,090 - stpipe.pipeline - INFO - Prefetch for OTE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf'.
2026-03-27 13:30:45,091 - stpipe.pipeline - INFO - Prefetch for PASTASOSS reference file is 'N/A'.
2026-03-27 13:30:45,091 - stpipe.pipeline - INFO - Prefetch for PATHLOSS reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits'.
2026-03-27 13:30:45,092 - stpipe.pipeline - INFO - Prefetch for PHOTOM reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits'.
2026-03-27 13:30:45,093 - stpipe.pipeline - INFO - Prefetch for PSF reference file is 'N/A'.
2026-03-27 13:30:45,093 - stpipe.pipeline - INFO - Prefetch for REGIONS reference file is 'N/A'.
2026-03-27 13:30:45,094 - stpipe.pipeline - INFO - Prefetch for SFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0232.fits'.
2026-03-27 13:30:45,095 - stpipe.pipeline - INFO - Prefetch for SPECKERNEL reference file is 'N/A'.
2026-03-27 13:30:45,095 - stpipe.pipeline - INFO - Prefetch for SPECPROFILE reference file is 'N/A'.
2026-03-27 13:30:45,096 - stpipe.pipeline - INFO - Prefetch for SPECWCS reference file is 'N/A'.
2026-03-27 13:30:45,097 - stpipe.pipeline - INFO - Prefetch for WAVECORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf'.
2026-03-27 13:30:45,097 - stpipe.pipeline - INFO - Prefetch for WAVELENGTHRANGE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf'.
2026-03-27 13:30:45,098 - jwst.pipeline.calwebb_spec2 - INFO - Starting calwebb_spec2 ...
2026-03-27 13:30:45,099 - jwst.pipeline.calwebb_spec2 - INFO - Processing product mast_products/jw01345061001_07101_00003_nrs2
2026-03-27 13:30:45,099 - jwst.pipeline.calwebb_spec2 - INFO - Working on input ./mast_products/jw01345061001_07101_00003_nrs2_rate.fits ...
2026-03-27 13:30:45,274 - stpipe.step - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>,).
2026-03-27 13:30:45,372 - jwst.assign_wcs.nirspec - INFO - Retrieving open MSA slitlets for msa_metadata_id = 83 and dither_index = 3
2026-03-27 13:30:45,381 - jwst.assign_wcs.nirspec - INFO - Slitlet 3 is background only; assigned source_id=3
2026-03-27 13:30:45,382 - jwst.assign_wcs.nirspec - INFO - Slitlet 4 is background only; assigned source_id=4
2026-03-27 13:30:45,383 - jwst.assign_wcs.nirspec - INFO - Slitlet 5 is background only; assigned source_id=5
2026-03-27 13:30:45,391 - jwst.assign_wcs.nirspec - INFO - Slitlet 9 is background only; assigned source_id=9
2026-03-27 13:30:45,394 - jwst.assign_wcs.nirspec - INFO - Slitlet 10 contains virtual source, with source_id=-59
2026-03-27 13:30:45,397 - jwst.assign_wcs.nirspec - INFO - Slitlet 12 is background only; assigned source_id=12
2026-03-27 13:30:45,398 - jwst.assign_wcs.nirspec - INFO - Slitlet 13 is background only; assigned source_id=13
2026-03-27 13:30:45,399 - jwst.assign_wcs.nirspec - INFO - Slitlet 14 is background only; assigned source_id=14
2026-03-27 13:30:45,401 - jwst.assign_wcs.nirspec - INFO - Slitlet 15 contains virtual source, with source_id=-63
2026-03-27 13:30:45,407 - jwst.assign_wcs.nirspec - INFO - Slitlet 18 is background only; assigned source_id=18
2026-03-27 13:30:45,407 - jwst.assign_wcs.nirspec - INFO - Slitlet 19 is background only; assigned source_id=19
2026-03-27 13:30:45,416 - jwst.assign_wcs.nirspec - INFO - Slitlet 23 is background only; assigned source_id=23
2026-03-27 13:30:45,424 - jwst.assign_wcs.nirspec - INFO - Slitlet 27 is background only; assigned source_id=27
2026-03-27 13:30:45,424 - jwst.assign_wcs.nirspec - INFO - Slitlet 28 is background only; assigned source_id=28
2026-03-27 13:30:45,437 - jwst.assign_wcs.nirspec - INFO - Slitlet 34 is background only; assigned source_id=34
2026-03-27 13:30:45,466 - jwst.assign_wcs.nirspec - INFO - Slitlet 48 is background only; assigned source_id=48
2026-03-27 13:30:45,480 - jwst.assign_wcs.nirspec - INFO - Slitlet 55 is background only; assigned source_id=55
2026-03-27 13:30:45,485 - jwst.assign_wcs.nirspec - INFO - Slitlet 57 contains virtual source, with source_id=-72
2026-03-27 13:30:45,495 - jwst.assign_wcs.nirspec - INFO - Slitlet 62 is background only; assigned source_id=62
2026-03-27 13:30:45,500 - jwst.assign_wcs.nirspec - INFO - Slitlet 64 contains virtual source, with source_id=-74
2026-03-27 13:30:45,505 - jwst.assign_wcs.nirspec - INFO - Slitlet 67 is background only; assigned source_id=67
2026-03-27 13:30:45,506 - jwst.assign_wcs.nirspec - INFO - Slitlet 68 is background only; assigned source_id=68
2026-03-27 13:30:45,509 - jwst.assign_wcs.nirspec - INFO - Slitlet 69 contains virtual source, with source_id=-77
2026-03-27 13:30:45,510 - jwst.assign_wcs.nirspec - INFO - Slitlet 70 is background only; assigned source_id=70
2026-03-27 13:30:45,511 - jwst.assign_wcs.nirspec - INFO - Slitlet 71 is background only; assigned source_id=71
2026-03-27 13:30:45,517 - jwst.assign_wcs.nirspec - INFO - Slitlet 74 is background only; assigned source_id=74
2026-03-27 13:30:45,524 - jwst.assign_wcs.nirspec - INFO - Slitlet 78 is background only; assigned source_id=78
2026-03-27 13:30:45,558 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:30:45,558 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:30:45,559 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:30:45,560 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:30:46,593 - jwst.assign_wcs.nirspec - INFO - Removing slit 58 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,611 - jwst.assign_wcs.nirspec - INFO - Removing slit 59 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,628 - jwst.assign_wcs.nirspec - INFO - Removing slit 60 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,645 - jwst.assign_wcs.nirspec - INFO - Removing slit 61 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,662 - jwst.assign_wcs.nirspec - INFO - Removing slit 62 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,679 - jwst.assign_wcs.nirspec - INFO - Removing slit 65 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,696 - jwst.assign_wcs.nirspec - INFO - Removing slit 66 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,713 - jwst.assign_wcs.nirspec - INFO - Removing slit 68 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,730 - jwst.assign_wcs.nirspec - INFO - Removing slit 69 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,747 - jwst.assign_wcs.nirspec - INFO - Removing slit 70 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,764 - jwst.assign_wcs.nirspec - INFO - Removing slit 76 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,782 - jwst.assign_wcs.nirspec - INFO - Removing slit 78 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,848 - jwst.assign_wcs.nirspec - INFO - Removing slit 57 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,865 - jwst.assign_wcs.nirspec - INFO - Removing slit 63 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,882 - jwst.assign_wcs.nirspec - INFO - Removing slit 64 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,900 - jwst.assign_wcs.nirspec - INFO - Removing slit 67 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,917 - jwst.assign_wcs.nirspec - INFO - Removing slit 71 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,934 - jwst.assign_wcs.nirspec - INFO - Removing slit 72 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,951 - jwst.assign_wcs.nirspec - INFO - Removing slit 73 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,968 - jwst.assign_wcs.nirspec - INFO - Removing slit 74 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:46,986 - jwst.assign_wcs.nirspec - INFO - Removing slit 75 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:47,003 - jwst.assign_wcs.nirspec - INFO - Removing slit 77 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:47,020 - jwst.assign_wcs.nirspec - INFO - Removing slit 79 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:47,037 - jwst.assign_wcs.nirspec - INFO - Removing slit 80 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:47,056 - jwst.assign_wcs.nirspec - INFO - Removing slit 81 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:30:47,056 - jwst.assign_wcs.nirspec - INFO - Slits projected on detector NRS2: ['2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56']
2026-03-27 13:30:47,058 - jwst.assign_wcs.nirspec - INFO - Computing WCS for 55 open slitlets
2026-03-27 13:30:47,083 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:30:47,083 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:30:47,084 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:30:47,085 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:30:47,096 - jwst.assign_wcs.nirspec - INFO - SPORDER= -1, wrange=[2.87e-06, 5.27e-06]
2026-03-27 13:30:47,197 - jwst.assign_wcs.nirspec - INFO - Applied Barycentric velocity correction : 1.000049924895689
2026-03-27 13:30:47,227 - jwst.assign_wcs.nirspec - INFO - There are 18 open slits in quadrant 1
2026-03-27 13:30:47,344 - jwst.assign_wcs.nirspec - INFO - There are 26 open slits in quadrant 2
2026-03-27 13:30:47,693 - jwst.assign_wcs.nirspec - INFO - There are 8 open slits in quadrant 3
2026-03-27 13:30:47,745 - jwst.assign_wcs.nirspec - INFO - There are 3 open slits in quadrant 4
2026-03-27 13:30:47,765 - jwst.assign_wcs.nirspec - INFO - There are 0 open slits in quadrant 5
2026-03-27 13:30:47,932 - jwst.assign_wcs.nirspec - INFO - Created a NIRSPEC nrs_msaspec pipeline with references {'distortion': None, 'filteroffset': None, 'specwcs': None, 'regions': None, 'wavelengthrange': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf', 'camera': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf', 'collimator': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf', 'disperser': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf', 'fore': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf', 'fpa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf', 'msa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf', 'ote': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf', 'ifupost': None, 'ifufore': None, 'ifuslicer': None, 'msametafile': './mast_products/jw01345061001_01_msa.fits'}
2026-03-27 13:30:50,925 - jwst.assign_wcs.assign_wcs - INFO - COMPLETED assign_wcs
2026-03-27 13:30:50,933 - stpipe.step - INFO - Step assign_wcs done
2026-03-27 13:30:51,151 - stpipe.step - INFO - Step badpix_selfcal running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>, [], []).
2026-03-27 13:30:51,152 - stpipe.step - INFO - Step skipped.
2026-03-27 13:30:51,349 - stpipe.step - INFO - Step msa_flagging running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>,).
2026-03-27 13:30:52,509 - jwst.msaflagopen.msaflagopen_step - INFO - Using reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json
2026-03-27 13:30:52,579 - jwst.msaflagopen.msaflag_open - INFO - 24 failed open shutters
2026-03-27 13:30:57,207 - stpipe.step - INFO - Step msa_flagging done
2026-03-27 13:30:57,543 - stpipe.step - INFO - Step nsclean running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>,).
2026-03-27 13:30:57,544 - jwst.nsclean.nsclean_step - WARNING - The 'nsclean' step is a deprecated alias to 'clean_flicker_noise' and will be removed in future builds.
2026-03-27 13:30:57,551 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Input exposure type is NRS_MSASPEC, detector=NRS2
2026-03-27 13:30:58,544 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Flagging failed-open MSA shutters for scene masking
2026-03-27 13:30:58,546 - stpipe.step - INFO - MSAFlagOpenStep instance created.
2026-03-27 13:31:04,970 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Creating mask
2026-03-27 13:31:04,971 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Finding slit/slitlet pixels
2026-03-27 13:31:08,477 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Masking the fixed slit region for MOS data.
2026-03-27 13:31:08,780 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Cleaning image jw01345061001_07101_00003_nrs2_rate.fits
2026-03-27 13:31:10,670 - jwst.nsclean.nsclean_step - INFO - Saving mask file ./stage2_nsclean_default/jw01345061001_07101_00003_nrs2_mask.fits
2026-03-27 13:31:12,049 - stpipe.step - INFO - Saved model in ./stage2_nsclean_default/jw01345061001_07101_00003_nrs2_nsclean.fits
2026-03-27 13:31:12,050 - stpipe.step - INFO - Step nsclean done
2026-03-27 13:31:12,534 - stpipe.step - INFO - Step imprint_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_nsclean.fits>, []).
2026-03-27 13:31:12,535 - stpipe.step - INFO - Step skipped.
2026-03-27 13:31:12,801 - stpipe.step - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_nsclean.fits>, []).
2026-03-27 13:31:12,802 - stpipe.step - INFO - Step skipped.
2026-03-27 13:31:13,060 - stpipe.step - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:31:13,067 - jwst.extract_2d.extract_2d - INFO - EXP_TYPE is NRS_MSASPEC
2026-03-27 13:31:13,068 - jwst.extract_2d.nirspec - INFO - Slits selected:
2026-03-27 13:31:13,068 - jwst.extract_2d.nirspec - INFO - Name: 11, source_id: 386
2026-03-27 13:31:13,135 - jwst.extract_2d.nirspec - INFO - Name of subarray extracted: 11
2026-03-27 13:31:13,135 - jwst.extract_2d.nirspec - INFO - Subarray x-extents are: 141 1507
2026-03-27 13:31:13,136 - jwst.extract_2d.nirspec - INFO - Subarray y-extents are: 616 648
2026-03-27 13:31:13,417 - jwst.extract_2d.nirspec - INFO - set slit_attributes completed
2026-03-27 13:31:13,426 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.832940199 52.885103324 214.832013460 52.885093088 214.832014161 52.885038573 214.832940897 52.885048802
2026-03-27 13:31:13,427 - jwst.extract_2d.nirspec - INFO - Updated S_REGION to POLYGON ICRS 214.832940199 52.885103324 214.832013460 52.885093088 214.832014161 52.885038573 214.832940897 52.885048802
2026-03-27 13:31:13,499 - stpipe.step - INFO - Step extract_2d done
2026-03-27 13:31:13,770 - stpipe.step - INFO - Step srctype running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:31:13,921 - jwst.srctype.srctype - INFO - Input EXP_TYPE is NRS_MSASPEC
2026-03-27 13:31:13,922 - jwst.srctype.srctype - INFO - source_id=386, stellarity=1.0000, type=POINT
2026-03-27 13:31:13,924 - stpipe.step - INFO - Step srctype done
2026-03-27 13:31:14,385 - stpipe.step - INFO - Step master_background_mos running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:31:14,391 - jwst.master_background.master_background_mos_step - WARNING - No background slits available for creating master background. Skipping
2026-03-27 13:31:14,551 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:31:14,552 - stpipe.step - INFO - Step master_background_mos done
2026-03-27 13:31:14,850 - stpipe.step - INFO - Step wavecorr running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:31:15,060 - jwst.wavecorr.wavecorr_step - INFO - Using WAVECORR reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf
2026-03-27 13:31:15,061 - jwst.wavecorr.wavecorr - INFO - Detected a POINT source type in slit 11
2026-03-27 13:31:15,148 - jwst.wavecorr.wavecorr - INFO - Using wavelength zero-point correction for aperture MOS
2026-03-27 13:31:15,193 - stpipe.step - INFO - Step wavecorr done
2026-03-27 13:31:15,491 - stpipe.step - INFO - Step flat_field running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:31:15,518 - jwst.flatfield.flat_field_step - INFO - No reference found for type FLAT
2026-03-27 13:31:15,684 - jwst.flatfield.flat_field_step - INFO - Using FFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits
2026-03-27 13:31:16,238 - jwst.flatfield.flat_field_step - INFO - Using SFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0232.fits
2026-03-27 13:31:16,402 - jwst.flatfield.flat_field_step - INFO - Using DFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0002.fits
2026-03-27 13:31:16,544 - jwst.flatfield.flat_field - INFO - Working on slit 11
2026-03-27 13:31:16,967 - stpipe.step - INFO - Step flat_field done
2026-03-27 13:31:17,266 - stpipe.step - INFO - Step pathloss running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:31:17,277 - jwst.pathloss.pathloss_step - INFO - Using PATHLOSS reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits
2026-03-27 13:31:17,343 - jwst.pathloss.pathloss - INFO - Input exposure type is NRS_MSASPEC
2026-03-27 13:31:17,493 - jwst.pathloss.pathloss - INFO - Working on slit 0
2026-03-27 13:31:17,494 - jwst.pathloss.pathloss - INFO - Shutter state = 11x, using MOS1x3 entry in ref file
2026-03-27 13:31:17,494 - jwst.pathloss.pathloss - INFO - Shutter above fiducial is closed, using upper region of pathloss array
2026-03-27 13:31:17,567 - stpipe.step - INFO - Step pathloss done
2026-03-27 13:31:17,847 - stpipe.step - INFO - Step barshadow running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:31:17,860 - jwst.barshadow.barshadow_step - INFO - Using BARSHADOW reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits
2026-03-27 13:31:18,042 - jwst.barshadow.bar_shadow - INFO - Working on slitlet 11
2026-03-27 13:31:18,042 - jwst.barshadow.bar_shadow - INFO - Bar shadow correction skipped for slitlet 11 (source not uniform)
2026-03-27 13:31:18,050 - stpipe.step - INFO - Step barshadow done
2026-03-27 13:31:18,335 - stpipe.step - INFO - Step photom running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:31:18,352 - jwst.photom.photom_step - INFO - Using photom reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits
2026-03-27 13:31:18,353 - jwst.photom.photom_step - INFO - Using area reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits
2026-03-27 13:31:18,515 - jwst.photom.photom - INFO - Using instrument: NIRSPEC
2026-03-27 13:31:18,516 - jwst.photom.photom - INFO - detector: NRS2
2026-03-27 13:31:18,517 - jwst.photom.photom - INFO - exp_type: NRS_MSASPEC
2026-03-27 13:31:18,517 - jwst.photom.photom - INFO - filter: F290LP
2026-03-27 13:31:18,518 - jwst.photom.photom - INFO - grating: G395M
2026-03-27 13:31:18,566 - jwst.photom.photom - INFO - Working on slit 11
2026-03-27 13:31:18,567 - jwst.photom.photom - INFO - PHOTMJSR value: 1
2026-03-27 13:31:18,597 - stpipe.step - INFO - Step photom done
2026-03-27 13:31:19,046 - stpipe.step - INFO - Step pixel_replace running with args (<MultiSlitModel from ./stage2_nsclean_default/jw01345061001_07101_00003_nrs2_cal.fits>,).
2026-03-27 13:31:19,048 - stpipe.step - INFO - Step skipped.
2026-03-27 13:31:19,271 - stpipe.step - INFO - Step resample_spec running with args (<MultiSlitModel from ./stage2_nsclean_default/jw01345061001_07101_00003_nrs2_cal.fits>,).
2026-03-27 13:31:19,584 - jwst.exp_to_source.exp_to_source - INFO - Reorganizing data from exposure ./stage2_nsclean_default/jw01345061001_07101_00003_nrs2_cal.fits
2026-03-27 13:31:19,986 - jwst.resample.resample_spec - INFO - Specified output pixel scale ratio: 1.0.
2026-03-27 13:31:19,996 - jwst.resample.resample_spec - INFO - Computed output pixel scale: 0.10447 arcsec.
2026-03-27 13:31:19,997 - stcal.resample.resample - INFO - Output pixel scale: 0.10447274011512764 arcsec.
2026-03-27 13:31:19,998 - stcal.resample.resample - INFO - Driz parameter kernel: square
2026-03-27 13:31:19,999 - stcal.resample.resample - INFO - Driz parameter pixfrac: 1.0
2026-03-27 13:31:20,000 - stcal.resample.resample - INFO - Driz parameter fillval: NaN
2026-03-27 13:31:20,001 - stcal.resample.resample - INFO - Driz parameter weight_type: exptime
2026-03-27 13:31:20,002 - jwst.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:31:20,056 - stcal.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:31:20,061 - stcal.resample.resample - INFO - Drizzling (32, 1366) --> (21, 1366)
2026-03-27 13:31:20,065 - stcal.resample.resample - INFO - Drizzling (32, 1366) --> (21, 1366)
2026-03-27 13:31:20,069 - stcal.resample.resample - INFO - Drizzling (32, 1366) --> (21, 1366)
2026-03-27 13:31:20,212 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.831972292 52.885065372 214.832933995 52.885065372 214.832933995 52.885075990 214.831972292 52.885075990
2026-03-27 13:31:20,367 - stpipe.step - INFO - Saved model in ./stage2_nsclean_default/jw01345061001_07101_00003_nrs2_s2d.fits
2026-03-27 13:31:20,368 - stpipe.step - INFO - Step resample_spec done
2026-03-27 13:31:20,460 - jwst.pipeline.calwebb_spec2 - INFO - Extracting 1 MSA slitlets
2026-03-27 13:31:20,699 - stpipe.step - INFO - Step extract_1d running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_s2d.fits>,).
2026-03-27 13:31:20,861 - jwst.extract_1d.extract_1d_step - INFO - Using EXTRACT1D reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json
2026-03-27 13:31:20,868 - jwst.extract_1d.extract_1d_step - INFO - Using APCORR file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits
2026-03-27 13:31:20,912 - jwst.extract_1d.extract - INFO - Working on slit 11
2026-03-27 13:31:20,913 - jwst.lib.pipe_utils - WARNING - Mismatched data shapes; skipping invalid data updates for extension 'dq'
2026-03-27 13:31:20,914 - jwst.extract_1d.extract - INFO - Turning on source position correction for exp_type = NRS_MSASPEC
2026-03-27 13:31:20,918 - jwst.extract_1d.source_location - INFO - Using source_xpos and source_ypos to center extraction.
2026-03-27 13:31:20,922 - jwst.extract_1d.extract - INFO - Computed source location is 4.49, at pixel 682, wavelength 4.07
2026-03-27 13:31:20,923 - jwst.extract_1d.extract - INFO - Nominal aperture start/stop: 7.50 -> 12.50 (inclusive)
2026-03-27 13:31:20,924 - jwst.extract_1d.extract - INFO - Nominal location is 10.00, so offset is -5.51 pixels
2026-03-27 13:31:20,926 - jwst.extract_1d.extract - INFO - Mean aperture start/stop from trace: 1.99 -> 6.99 (inclusive)
2026-03-27 13:31:20,929 - jwst.extract_1d.extract - INFO - Creating aperture correction.
2026-03-27 13:31:21,995 - stpipe.step - INFO - Step extract_1d done
2026-03-27 13:31:22,065 - stpipe.step - INFO - Saved model in ./stage2_nsclean_default/jw01345061001_07101_00003_nrs2_x1d.fits
2026-03-27 13:31:22,066 - jwst.pipeline.calwebb_spec2 - INFO - Finished processing product mast_products/jw01345061001_07101_00003_nrs2
2026-03-27 13:31:22,067 - jwst.pipeline.calwebb_spec2 - INFO - Ending calwebb_spec2
2026-03-27 13:31:22,068 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:31:22,326 - stpipe.step - INFO - Saved model in ./stage2_nsclean_default/jw01345061001_07101_00003_nrs2_cal.fits
2026-03-27 13:31:22,327 - stpipe.step - INFO - Step Spec2Pipeline done
2026-03-27 13:31:22,327 - jwst.stpipe.core - INFO - Results used jwst version: 1.20.2
Saved jw01345061001_07101_00003_nrs2_mask.fits
Saved jw01345061001_07101_00003_nrs2_nsclean.fits
Saved jw01345061001_07101_00003_nrs2_cal.fits
Saved jw01345061001_07101_00003_nrs2_x1d.fits
Run time: 1.2466666666666666 min
In some situations, the NSClean step may fail to find a fit to the background noise. This failure may occur if the mask does not contain enough dark data (marked True). In particular, every column in the mask except for the first and last 4 columns must contain some pixels marked True. The background fitting procedure considers each column, one at a time, so it will crash if there is no data in a column to fit. If failure occurs, check that your mask in the image below has at least some True values in every column.
5.1 Verify the Mask (Default Pipeline Mask) #
Check the mask against the rate data to make sure it keeps only dark areas of the detector.
Note that there are still some remaining illuminated areas, primarily due to transient artifacts like cosmic rays and snowballs.
# Plot the rate data with masked areas blocked.
# List of on-the-fly built masks from the pipeline.
nsclean_default_masks = [
stage2_nsclean_default_dir + "jw01345061001_07101_00003_nrs1_mask.fits",
stage2_nsclean_default_dir + "jw01345061001_07101_00003_nrs2_mask.fits",
]
# Plot each associated set of rateint data and mask file.
for rate_file, mask_file in zip(rate_names, nsclean_default_masks):
plot_dark_data(mast_products_dir + rate_file, mask_file, layout="columns", scale=9)
5.2 Comparing Original vs. Cleaned Data (Default Pipeline Mask) #
We can now compare the cleaned data (with the default pipeline mask) to the original rate file and verify that the 1/f noise has been reduced.
In many cases, the cleaning process introduces new artifacts to the rate file. These should be carefully examined and weighed against the benefits of noise reduction. If transient artifacts, like snowballs, are interfering with the cleaning process, it may be beneficial to manually edit the mask to remove these areas from consideration in the background fit. To do so, try varying the outlier detection threshold or editing specific pixels in the mask array directly (explored in the next few sections). Otherwise, refer to the NSClean documentation for additional suggestions on manual editing.
Note that in the images below, there are scattered values with large relative differences from the original rate file (shown in the relative difference image below). These are artifacts of the cleaning process.
There are also broader low-level residual background effects (shown in the relative difference image on the right, below, with scattered outliers, identified with sigma clipping, hidden by masking). These include the background patterns we are trying to remove: the 1/f noise variations in the dispersion direction and the picture frame effect at the top and bottom of the frame (for full-frame data). However, there may also be low-level artifacts introduced by over-fitting the dark data in the cleaning process.
Check both residual images carefully to understand the impact of the cleaning process on your data.
# Plot the original and cleaned data, as well as a residual map.
cleaned_default_masks = [
stage2_nsclean_default_dir + "jw01345061001_07101_00003_nrs1_nsclean.fits",
stage2_nsclean_default_dir + "jw01345061001_07101_00003_nrs2_nsclean.fits",
]
# Plot each associated set of rateint data and cleaned file.
for rate_file, cleaned_file in zip(rate_names, cleaned_default_masks):
plot_cleaned_data(
mast_products_dir + rate_file, cleaned_file, layout="columns", scale=9
)
# Plot heavily masked region around x=1000, y=600 NRS2
# Masking can introduce some high frequency noise in the cleaning process that
# appears as vertical striping over the spectral traces
rate_file = mast_products_dir + rate_names[1] # NRS2
original_rate_data = fits.open(rate_file)[1].data[550:651, 800:1401]
cleaned_rate_data = fits.open(cleaned_default_masks[1])[1].data[550:651, 800:1401]
# For plotting vizualization
original_rate_data[np.isnan(original_rate_data)] = 0
cleaned_rate_data[np.isnan(cleaned_rate_data)] = 0
vmin = np.nanpercentile(cleaned_rate_data, 5)
vmax = np.nanpercentile(cleaned_rate_data, 100-9)
# Original vs. cleaned data (with default mask)
fig, axs = plt.subplots(1, 2, figsize=(15, 4))
fig.colorbar(
axs[0].imshow(
original_rate_data,
cmap="viridis",
aspect=4,
origin="lower",
clim=(vmin, vmax),
),
ax=axs[0],
pad=0.05,
shrink=0.7,
label="DN/s",
)
fig.colorbar(
axs[1].imshow(
cleaned_rate_data,
cmap="viridis",
aspect=4,
origin="lower",
clim=(vmin, vmax),
),
ax=axs[1],
pad=0.05,
shrink=0.7,
label="DN/s",
)
# Set titles, tick values, xlabel, and ylabel for subplots
for ax, title in zip(axs, ["Original Rate Data (NRS2)", "Cleaned Rate Data (NRS2)"]):
ax.set(title=title, xlabel="Pixel Column", ylabel="Pixel Row")
ax.set_xticklabels([700, 800, 900, 1000, 1100, 1200, 1300, 1400])
ax.set_yticklabels([475, 500, 525, 575, 600, 625, 650])
/tmp/ipykernel_3106/1065472836.py:48: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
ax.set_xticklabels([700, 800, 900, 1000, 1100, 1200, 1300, 1400])
/tmp/ipykernel_3106/1065472836.py:49: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
ax.set_yticklabels([475, 500, 525, 575, 600, 625, 650])
/tmp/ipykernel_3106/1065472836.py:48: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
ax.set_xticklabels([700, 800, 900, 1000, 1100, 1200, 1300, 1400])
/tmp/ipykernel_3106/1065472836.py:49: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
ax.set_yticklabels([475, 500, 525, 575, 600, 625, 650])
Compare the extracted spectrum from the cleaned data to the spectrum extracted from the original rate file.
# 1D extracted spectra.
x1d_nsclean_skipped = [
stage2_nsclean_skipped_dir + "jw01345061001_07101_00003_nrs1_x1d.fits",
stage2_nsclean_skipped_dir + "jw01345061001_07101_00003_nrs2_x1d.fits",
]
x1d_nsclean_default = [
stage2_nsclean_default_dir + "jw01345061001_07101_00003_nrs1_x1d.fits",
stage2_nsclean_default_dir + "jw01345061001_07101_00003_nrs2_x1d.fits",
]
# Wavelength region of interest.
for original, cleaned in zip(x1d_nsclean_skipped, x1d_nsclean_default):
plot_spectra([original, cleaned], scale_percent=9)
Notes:
In slit 80 on NRS1 and in slit 11 on NRS2, the overall continuum level has been slightly altered by the cleaning process.
In slit 11 on NRS2, some of the negative flux in the original spectrum has been corrected. However, excessive masking in the default mask has introduced high-frequency noise, particularly affecting slit 11 between 4.5 - 5.0 um. This results in a noticeable dip in the spectrum extracted from the cleaned data compared to the original raw data (above).
6. Clean up 1/f Noise with NSClean (Alternate Mask) #
For this data set, note that some regions of the detector are heavily masked, due to overlapping slit regions. For example, see the cleaned rate data for NRS2 above, around x=1000, y=600.
In this region, the cleaning process introduces some high frequency noise that appears as vertical striping over the spectral traces. Slit 11 is extracted from this region, and shows a noticeable dip in the spectrum extracted from the cleaned data, compared to the original rate data (above).
Also note that for MOS data, there may be several illuminated regions of the detector that are not masked by the slitlet bounding boxes. For the M gratings, zeroth-order spectra may appear on the detector, and are not easily located. For the long-pass filters, there is still some light past the red cutoff of the slitlet bounding box.
In this case, it may be beneficial to build the mask with an alternate algorithm. Here, we do not use slitlet bounding boxes and instead iteratively mask any data more than 1 sigma above the background. This leaves more dark data between the spectral traces and improves the background fit in the problematic area.
Note, however, that excessive cleaning may impact the continuum level for the spectra, if too much or too little illuminated data is included in the mask. Again, the generated mask and output spectra should be carefully examined to weigh the benefits of cleaning against the impact on the spectra.
To tune the illumination detection in this mask, try modifying the n_sigma parameter below. A higher value will identify less illumination. A lower value will identify more.
# Set up directory for running NSClean with alternate parameters.
stage2_nsclean_alternate_dir = "./stage2_nsclean_alternate/"
if not os.path.exists(stage2_nsclean_alternate_dir):
os.makedirs(
stage2_nsclean_alternate_dir
) # Create the directory if it doesn't exist.
# 1/f noise cleaned data (alternate NSClean pipeline mask).
# Estimated run time: 7 minutes.
start = tt.time()
for indx, i in enumerate(rate_names):
print(f"Processing {i}...")
if "nrs1" in i:
slit_name = "80"
else:
slit_name = "11"
Spec2Pipeline.call(
mast_products_dir + i,
save_results=True,
steps={
"nsclean": {
"skip": False,
"save_mask": True,
"save_results": True,
"n_sigma": 1,
"mask_spectral_regions": False,
},
"extract_2d": {"slit_names": slit_name},
},
output_dir=stage2_nsclean_alternate_dir,
)
print(f"Saved {i[:-9]}" + "mask.fits")
print(f"Saved {i[:-9]}" + "nsclean.fits")
print(f"Saved {i[:-9]}" + "cal.fits")
print(f"Saved {i[:-9]}" + "x1d.fits")
end = tt.time()
print("Run time: ", round(end - start, 1) / 60.0, " min")
2026-03-27 13:31:35,031 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
Processing jw01345061001_07101_00003_nrs1_rate.fits...
2026-03-27 13:31:35,413 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
2026-03-27 13:31:35,438 - stpipe.step - INFO - Spec2Pipeline instance created.
2026-03-27 13:31:35,439 - stpipe.step - INFO - AssignWcsStep instance created.
2026-03-27 13:31:35,440 - stpipe.step - INFO - BadpixSelfcalStep instance created.
2026-03-27 13:31:35,441 - stpipe.step - INFO - MSAFlagOpenStep instance created.
2026-03-27 13:31:35,442 - stpipe.step - INFO - NSCleanStep instance created.
2026-03-27 13:31:35,443 - stpipe.step - INFO - BackgroundStep instance created.
2026-03-27 13:31:35,444 - stpipe.step - INFO - ImprintStep instance created.
2026-03-27 13:31:35,445 - stpipe.step - INFO - Extract2dStep instance created.
2026-03-27 13:31:35,450 - stpipe.step - INFO - MasterBackgroundMosStep instance created.
2026-03-27 13:31:35,451 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:31:35,452 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:31:35,453 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:31:35,454 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:31:35,455 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:31:35,457 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:31:35,458 - stpipe.step - INFO - Extract1dStep instance created.
2026-03-27 13:31:35,459 - stpipe.step - INFO - WavecorrStep instance created.
2026-03-27 13:31:35,460 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:31:35,461 - stpipe.step - INFO - SourceTypeStep instance created.
2026-03-27 13:31:35,463 - stpipe.step - INFO - StraylightStep instance created.
2026-03-27 13:31:35,463 - stpipe.step - INFO - FringeStep instance created.
2026-03-27 13:31:35,465 - stpipe.step - INFO - ResidualFringeStep instance created.
2026-03-27 13:31:35,466 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:31:35,467 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:31:35,468 - stpipe.step - INFO - WfssContamStep instance created.
2026-03-27 13:31:35,469 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:31:35,469 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:31:35,470 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:31:35,472 - stpipe.step - INFO - CubeBuildStep instance created.
2026-03-27 13:31:35,474 - stpipe.step - INFO - Extract1dStep instance created.
2026-03-27 13:31:35,614 - stpipe.step - INFO - Step Spec2Pipeline running with args ('./mast_products/jw01345061001_07101_00003_nrs1_rate.fits',).
2026-03-27 13:31:35,648 - stpipe.step - INFO - Step Spec2Pipeline parameters are:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: ./stage2_nsclean_alternate/
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_bsub: False
fail_on_exception: True
save_wfss_esec: False
steps:
assign_wcs:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sip_approx: True
sip_max_pix_error: 0.01
sip_degree: None
sip_max_inv_pix_error: 0.01
sip_inv_degree: None
sip_npoints: 12
slit_y_low: -0.55
slit_y_high: 0.55
nrs_ifu_slice_wcs: False
badpix_selfcal:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
flagfrac_lower: 0.001
flagfrac_upper: 0.001
kernel_size: 15
force_single: False
save_flagged_bkg: False
msa_flagging:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
nsclean:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
fit_method: fft
fit_by_channel: False
background_method: None
background_box_size: None
mask_spectral_regions: False
n_sigma: 1
fit_histogram: False
single_mask: False
user_mask: None
save_mask: True
save_background: False
save_noise: False
bkg_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
bkg_list: None
save_combined_background: False
sigma: 3.0
maxiters: None
soss_source_percentile: 35.0
soss_bkg_percentile: None
wfss_mmag_extract: None
wfss_maxiter: 5
wfss_rms_stop: 0.0
wfss_outlier_percent: 1.0
imprint_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
extract_2d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
slit_names:
- '80'
source_ids: None
extract_orders: None
grism_objects: None
tsgrism_extract_height: None
wfss_extract_half_height: 5
wfss_mmag_extract: None
wfss_nbright: 1000
master_background_mos:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sigma_clip: 3.0
median_kernel: 1
force_subtract: False
save_background: False
user_background: None
inverse: False
steps:
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
wavecorr:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
srctype:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
source_type: None
straylight:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
clean_showers: False
shower_plane: 3
shower_x_stddev: 18.0
shower_y_stddev: 5.0
shower_low_reject: 0.1
shower_high_reject: 99.9
save_shower_model: False
fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
residual_fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: residual_fringe
search_output_file: False
input_dir: ''
save_intermediate_results: False
ignore_region_min: None
ignore_region_max: None
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
wfss_contam:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
save_simulated_image: False
save_contam_images: False
maximum_cores: none
orders: None
magnitude_limit: None
wl_oversample: 2
max_pixels_per_chunk: 50000
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
cube_build:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: s3d
search_output_file: False
input_dir: ''
pipeline: 3
channel: all
band: all
grating: all
filter: all
output_type: None
scalexy: 0.0
scalew: 0.0
weighting: drizzle
coord_system: skyalign
ra_center: None
dec_center: None
cube_pa: None
nspax_x: None
nspax_y: None
rois: 0.0
roiw: 0.0
weight_power: 2.0
wavemin: None
wavemax: None
single: False
skip_dqflagging: False
offset_file: None
debug_spaxel: -1 -1 -1
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
2026-03-27 13:31:35,682 - stpipe.pipeline - INFO - Prefetching reference files for dataset: 'jw01345061001_07101_00003_nrs1_rate.fits' reftypes = ['apcorr', 'area', 'barshadow', 'bkg', 'camera', 'collimator', 'cubepar', 'dflat', 'disperser', 'distortion', 'extract1d', 'fflat', 'filteroffset', 'flat', 'fore', 'fpa', 'fringe', 'ifufore', 'ifupost', 'ifuslicer', 'mrsxartcorr', 'msa', 'msaoper', 'ote', 'pastasoss', 'pathloss', 'photom', 'psf', 'regions', 'sflat', 'speckernel', 'specprofile', 'specwcs', 'wavecorr', 'wavelengthrange']
2026-03-27 13:31:35,687 - stpipe.pipeline - INFO - Prefetch for APCORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits'.
2026-03-27 13:31:35,687 - stpipe.pipeline - INFO - Prefetch for AREA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits'.
2026-03-27 13:31:35,688 - stpipe.pipeline - INFO - Prefetch for BARSHADOW reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits'.
2026-03-27 13:31:35,689 - stpipe.pipeline - INFO - Prefetch for BKG reference file is 'N/A'.
2026-03-27 13:31:35,689 - stpipe.pipeline - INFO - Prefetch for CAMERA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf'.
2026-03-27 13:31:35,690 - stpipe.pipeline - INFO - Prefetch for COLLIMATOR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf'.
2026-03-27 13:31:35,691 - stpipe.pipeline - INFO - Prefetch for CUBEPAR reference file is 'N/A'.
2026-03-27 13:31:35,691 - stpipe.pipeline - INFO - Prefetch for DFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0001.fits'.
2026-03-27 13:31:35,692 - stpipe.pipeline - INFO - Prefetch for DISPERSER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf'.
2026-03-27 13:31:35,693 - stpipe.pipeline - INFO - Prefetch for DISTORTION reference file is 'N/A'.
2026-03-27 13:31:35,693 - stpipe.pipeline - INFO - Prefetch for EXTRACT1D reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json'.
2026-03-27 13:31:35,694 - stpipe.pipeline - INFO - Prefetch for FFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits'.
2026-03-27 13:31:35,694 - stpipe.pipeline - INFO - Prefetch for FILTEROFFSET reference file is 'N/A'.
2026-03-27 13:31:35,696 - stpipe.pipeline - INFO - Prefetch for FLAT reference file is 'N/A'.
2026-03-27 13:31:35,696 - stpipe.pipeline - INFO - Prefetch for FORE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf'.
2026-03-27 13:31:35,697 - stpipe.pipeline - INFO - Prefetch for FPA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf'.
2026-03-27 13:31:35,697 - stpipe.pipeline - INFO - Prefetch for FRINGE reference file is 'N/A'.
2026-03-27 13:31:35,698 - stpipe.pipeline - INFO - Prefetch for IFUFORE reference file is 'N/A'.
2026-03-27 13:31:35,699 - stpipe.pipeline - INFO - Prefetch for IFUPOST reference file is 'N/A'.
2026-03-27 13:31:35,699 - stpipe.pipeline - INFO - Prefetch for IFUSLICER reference file is 'N/A'.
2026-03-27 13:31:35,700 - stpipe.pipeline - INFO - Prefetch for MRSXARTCORR reference file is 'N/A'.
2026-03-27 13:31:35,700 - stpipe.pipeline - INFO - Prefetch for MSA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf'.
2026-03-27 13:31:35,701 - stpipe.pipeline - INFO - Prefetch for MSAOPER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json'.
2026-03-27 13:31:35,702 - stpipe.pipeline - INFO - Prefetch for OTE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf'.
2026-03-27 13:31:35,702 - stpipe.pipeline - INFO - Prefetch for PASTASOSS reference file is 'N/A'.
2026-03-27 13:31:35,703 - stpipe.pipeline - INFO - Prefetch for PATHLOSS reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits'.
2026-03-27 13:31:35,703 - stpipe.pipeline - INFO - Prefetch for PHOTOM reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits'.
2026-03-27 13:31:35,704 - stpipe.pipeline - INFO - Prefetch for PSF reference file is 'N/A'.
2026-03-27 13:31:35,705 - stpipe.pipeline - INFO - Prefetch for REGIONS reference file is 'N/A'.
2026-03-27 13:31:35,705 - stpipe.pipeline - INFO - Prefetch for SFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0225.fits'.
2026-03-27 13:31:35,706 - stpipe.pipeline - INFO - Prefetch for SPECKERNEL reference file is 'N/A'.
2026-03-27 13:31:35,706 - stpipe.pipeline - INFO - Prefetch for SPECPROFILE reference file is 'N/A'.
2026-03-27 13:31:35,708 - stpipe.pipeline - INFO - Prefetch for SPECWCS reference file is 'N/A'.
2026-03-27 13:31:35,708 - stpipe.pipeline - INFO - Prefetch for WAVECORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf'.
2026-03-27 13:31:35,709 - stpipe.pipeline - INFO - Prefetch for WAVELENGTHRANGE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf'.
2026-03-27 13:31:35,709 - jwst.pipeline.calwebb_spec2 - INFO - Starting calwebb_spec2 ...
2026-03-27 13:31:35,710 - jwst.pipeline.calwebb_spec2 - INFO - Processing product mast_products/jw01345061001_07101_00003_nrs1
2026-03-27 13:31:35,711 - jwst.pipeline.calwebb_spec2 - INFO - Working on input ./mast_products/jw01345061001_07101_00003_nrs1_rate.fits ...
2026-03-27 13:31:35,890 - stpipe.step - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_rate.fits>,).
2026-03-27 13:31:35,989 - jwst.assign_wcs.nirspec - INFO - Retrieving open MSA slitlets for msa_metadata_id = 83 and dither_index = 3
2026-03-27 13:31:35,998 - jwst.assign_wcs.nirspec - INFO - Slitlet 3 is background only; assigned source_id=3
2026-03-27 13:31:35,999 - jwst.assign_wcs.nirspec - INFO - Slitlet 4 is background only; assigned source_id=4
2026-03-27 13:31:36,000 - jwst.assign_wcs.nirspec - INFO - Slitlet 5 is background only; assigned source_id=5
2026-03-27 13:31:36,008 - jwst.assign_wcs.nirspec - INFO - Slitlet 9 is background only; assigned source_id=9
2026-03-27 13:31:36,011 - jwst.assign_wcs.nirspec - INFO - Slitlet 10 contains virtual source, with source_id=-59
2026-03-27 13:31:36,014 - jwst.assign_wcs.nirspec - INFO - Slitlet 12 is background only; assigned source_id=12
2026-03-27 13:31:36,015 - jwst.assign_wcs.nirspec - INFO - Slitlet 13 is background only; assigned source_id=13
2026-03-27 13:31:36,016 - jwst.assign_wcs.nirspec - INFO - Slitlet 14 is background only; assigned source_id=14
2026-03-27 13:31:36,019 - jwst.assign_wcs.nirspec - INFO - Slitlet 15 contains virtual source, with source_id=-63
2026-03-27 13:31:36,024 - jwst.assign_wcs.nirspec - INFO - Slitlet 18 is background only; assigned source_id=18
2026-03-27 13:31:36,025 - jwst.assign_wcs.nirspec - INFO - Slitlet 19 is background only; assigned source_id=19
2026-03-27 13:31:36,033 - jwst.assign_wcs.nirspec - INFO - Slitlet 23 is background only; assigned source_id=23
2026-03-27 13:31:36,041 - jwst.assign_wcs.nirspec - INFO - Slitlet 27 is background only; assigned source_id=27
2026-03-27 13:31:36,041 - jwst.assign_wcs.nirspec - INFO - Slitlet 28 is background only; assigned source_id=28
2026-03-27 13:31:36,053 - jwst.assign_wcs.nirspec - INFO - Slitlet 34 is background only; assigned source_id=34
2026-03-27 13:31:36,083 - jwst.assign_wcs.nirspec - INFO - Slitlet 48 is background only; assigned source_id=48
2026-03-27 13:31:36,097 - jwst.assign_wcs.nirspec - INFO - Slitlet 55 is background only; assigned source_id=55
2026-03-27 13:31:36,102 - jwst.assign_wcs.nirspec - INFO - Slitlet 57 contains virtual source, with source_id=-72
2026-03-27 13:31:36,112 - jwst.assign_wcs.nirspec - INFO - Slitlet 62 is background only; assigned source_id=62
2026-03-27 13:31:36,117 - jwst.assign_wcs.nirspec - INFO - Slitlet 64 contains virtual source, with source_id=-74
2026-03-27 13:31:36,122 - jwst.assign_wcs.nirspec - INFO - Slitlet 67 is background only; assigned source_id=67
2026-03-27 13:31:36,123 - jwst.assign_wcs.nirspec - INFO - Slitlet 68 is background only; assigned source_id=68
2026-03-27 13:31:36,126 - jwst.assign_wcs.nirspec - INFO - Slitlet 69 contains virtual source, with source_id=-77
2026-03-27 13:31:36,127 - jwst.assign_wcs.nirspec - INFO - Slitlet 70 is background only; assigned source_id=70
2026-03-27 13:31:36,128 - jwst.assign_wcs.nirspec - INFO - Slitlet 71 is background only; assigned source_id=71
2026-03-27 13:31:36,134 - jwst.assign_wcs.nirspec - INFO - Slitlet 74 is background only; assigned source_id=74
2026-03-27 13:31:36,141 - jwst.assign_wcs.nirspec - INFO - Slitlet 78 is background only; assigned source_id=78
2026-03-27 13:31:36,173 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:31:36,174 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:31:36,174 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:31:36,175 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:31:36,376 - jwst.assign_wcs.nirspec - INFO - Removing slit 2 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,393 - jwst.assign_wcs.nirspec - INFO - Removing slit 5 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,410 - jwst.assign_wcs.nirspec - INFO - Removing slit 6 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,427 - jwst.assign_wcs.nirspec - INFO - Removing slit 8 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,444 - jwst.assign_wcs.nirspec - INFO - Removing slit 9 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,461 - jwst.assign_wcs.nirspec - INFO - Removing slit 13 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,478 - jwst.assign_wcs.nirspec - INFO - Removing slit 15 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,495 - jwst.assign_wcs.nirspec - INFO - Removing slit 18 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,511 - jwst.assign_wcs.nirspec - INFO - Removing slit 20 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,527 - jwst.assign_wcs.nirspec - INFO - Removing slit 23 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,543 - jwst.assign_wcs.nirspec - INFO - Removing slit 24 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,559 - jwst.assign_wcs.nirspec - INFO - Removing slit 28 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,667 - jwst.assign_wcs.nirspec - INFO - Removing slit 3 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,683 - jwst.assign_wcs.nirspec - INFO - Removing slit 4 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,699 - jwst.assign_wcs.nirspec - INFO - Removing slit 7 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,716 - jwst.assign_wcs.nirspec - INFO - Removing slit 10 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,736 - jwst.assign_wcs.nirspec - INFO - Removing slit 11 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,752 - jwst.assign_wcs.nirspec - INFO - Removing slit 12 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,769 - jwst.assign_wcs.nirspec - INFO - Removing slit 14 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,785 - jwst.assign_wcs.nirspec - INFO - Removing slit 16 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,801 - jwst.assign_wcs.nirspec - INFO - Removing slit 17 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,817 - jwst.assign_wcs.nirspec - INFO - Removing slit 19 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,833 - jwst.assign_wcs.nirspec - INFO - Removing slit 21 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,849 - jwst.assign_wcs.nirspec - INFO - Removing slit 22 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,866 - jwst.assign_wcs.nirspec - INFO - Removing slit 25 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,882 - jwst.assign_wcs.nirspec - INFO - Removing slit 26 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:36,898 - jwst.assign_wcs.nirspec - INFO - Removing slit 27 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:31:37,618 - jwst.assign_wcs.nirspec - INFO - Slits projected on detector NRS1: ['29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81']
2026-03-27 13:31:37,620 - jwst.assign_wcs.nirspec - INFO - Computing WCS for 53 open slitlets
2026-03-27 13:31:37,645 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:31:37,646 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:31:37,647 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:31:37,648 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:31:37,659 - jwst.assign_wcs.nirspec - INFO - SPORDER= -1, wrange=[2.87e-06, 5.27e-06]
2026-03-27 13:31:37,758 - jwst.assign_wcs.nirspec - INFO - Applied Barycentric velocity correction : 1.000049924895689
2026-03-27 13:31:37,787 - jwst.assign_wcs.nirspec - INFO - There are 6 open slits in quadrant 1
2026-03-27 13:31:37,827 - jwst.assign_wcs.nirspec - INFO - There are 11 open slits in quadrant 2
2026-03-27 13:31:37,899 - jwst.assign_wcs.nirspec - INFO - There are 20 open slits in quadrant 3
2026-03-27 13:31:38,029 - jwst.assign_wcs.nirspec - INFO - There are 16 open slits in quadrant 4
2026-03-27 13:31:38,320 - jwst.assign_wcs.nirspec - INFO - There are 0 open slits in quadrant 5
2026-03-27 13:31:38,474 - jwst.assign_wcs.nirspec - INFO - Created a NIRSPEC nrs_msaspec pipeline with references {'distortion': None, 'filteroffset': None, 'specwcs': None, 'regions': None, 'wavelengthrange': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf', 'camera': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf', 'collimator': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf', 'disperser': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf', 'fore': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf', 'fpa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf', 'msa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf', 'ote': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf', 'ifupost': None, 'ifufore': None, 'ifuslicer': None, 'msametafile': './mast_products/jw01345061001_01_msa.fits'}
2026-03-27 13:31:41,260 - jwst.assign_wcs.assign_wcs - INFO - COMPLETED assign_wcs
2026-03-27 13:31:41,266 - stpipe.step - INFO - Step assign_wcs done
2026-03-27 13:31:41,495 - stpipe.step - INFO - Step badpix_selfcal running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_rate.fits>, [], []).
2026-03-27 13:31:41,496 - stpipe.step - INFO - Step skipped.
2026-03-27 13:31:41,697 - stpipe.step - INFO - Step msa_flagging running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_rate.fits>,).
2026-03-27 13:31:42,609 - jwst.msaflagopen.msaflagopen_step - INFO - Using reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json
2026-03-27 13:31:42,678 - jwst.msaflagopen.msaflag_open - INFO - 24 failed open shutters
2026-03-27 13:31:47,647 - stpipe.step - INFO - Step msa_flagging done
2026-03-27 13:31:47,994 - stpipe.step - INFO - Step nsclean running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_rate.fits>,).
2026-03-27 13:31:47,995 - jwst.nsclean.nsclean_step - WARNING - The 'nsclean' step is a deprecated alias to 'clean_flicker_noise' and will be removed in future builds.
2026-03-27 13:31:48,001 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Input exposure type is NRS_MSASPEC, detector=NRS1
2026-03-27 13:31:49,029 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Creating mask
2026-03-27 13:31:49,522 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Cleaning image jw01345061001_07101_00003_nrs1_rate.fits
2026-03-27 13:31:52,204 - jwst.nsclean.nsclean_step - INFO - Saving mask file ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs1_mask.fits
2026-03-27 13:31:53,947 - stpipe.step - INFO - Saved model in ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs1_nsclean.fits
2026-03-27 13:31:53,948 - stpipe.step - INFO - Step nsclean done
2026-03-27 13:31:54,287 - stpipe.step - INFO - Step imprint_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_nsclean.fits>, []).
2026-03-27 13:31:54,288 - stpipe.step - INFO - Step skipped.
2026-03-27 13:31:54,552 - stpipe.step - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_nsclean.fits>, []).
2026-03-27 13:31:54,553 - stpipe.step - INFO - Step skipped.
2026-03-27 13:31:54,830 - stpipe.step - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:31:54,837 - jwst.extract_2d.extract_2d - INFO - EXP_TYPE is NRS_MSASPEC
2026-03-27 13:31:54,838 - jwst.extract_2d.nirspec - INFO - Slits selected:
2026-03-27 13:31:54,838 - jwst.extract_2d.nirspec - INFO - Name: 80, source_id: 1509
2026-03-27 13:31:54,904 - jwst.extract_2d.nirspec - INFO - Name of subarray extracted: 80
2026-03-27 13:31:54,905 - jwst.extract_2d.nirspec - INFO - Subarray x-extents are: 423 1777
2026-03-27 13:31:54,906 - jwst.extract_2d.nirspec - INFO - Subarray y-extents are: 262 295
2026-03-27 13:31:55,189 - jwst.extract_2d.nirspec - INFO - set slit_attributes completed
2026-03-27 13:31:55,198 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.817179331 52.830822659 214.816253456 52.830818677 214.816255004 52.830763514 214.817180881 52.830767490
2026-03-27 13:31:55,200 - jwst.extract_2d.nirspec - INFO - Updated S_REGION to POLYGON ICRS 214.817179331 52.830822659 214.816253456 52.830818677 214.816255004 52.830763514 214.817180881 52.830767490
2026-03-27 13:31:55,270 - stpipe.step - INFO - Step extract_2d done
2026-03-27 13:31:55,537 - stpipe.step - INFO - Step srctype running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:31:55,709 - jwst.srctype.srctype - INFO - Input EXP_TYPE is NRS_MSASPEC
2026-03-27 13:31:55,710 - jwst.srctype.srctype - INFO - source_id=1509, stellarity=1.0000, type=POINT
2026-03-27 13:31:55,711 - stpipe.step - INFO - Step srctype done
2026-03-27 13:31:56,159 - stpipe.step - INFO - Step master_background_mos running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:31:56,166 - jwst.master_background.master_background_mos_step - WARNING - No background slits available for creating master background. Skipping
2026-03-27 13:31:56,327 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:31:56,328 - stpipe.step - INFO - Step master_background_mos done
2026-03-27 13:31:56,611 - stpipe.step - INFO - Step wavecorr running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:31:56,790 - jwst.wavecorr.wavecorr_step - INFO - Using WAVECORR reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf
2026-03-27 13:31:56,791 - jwst.wavecorr.wavecorr - INFO - Detected a POINT source type in slit 80
2026-03-27 13:31:56,878 - jwst.wavecorr.wavecorr - INFO - Using wavelength zero-point correction for aperture MOS
2026-03-27 13:31:56,923 - stpipe.step - INFO - Step wavecorr done
2026-03-27 13:31:57,220 - stpipe.step - INFO - Step flat_field running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:31:57,247 - jwst.flatfield.flat_field_step - INFO - No reference found for type FLAT
2026-03-27 13:31:57,412 - jwst.flatfield.flat_field_step - INFO - Using FFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits
2026-03-27 13:31:57,949 - jwst.flatfield.flat_field_step - INFO - Using SFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0225.fits
2026-03-27 13:31:58,115 - jwst.flatfield.flat_field_step - INFO - Using DFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0001.fits
2026-03-27 13:31:58,261 - jwst.flatfield.flat_field - INFO - Working on slit 80
2026-03-27 13:31:58,681 - stpipe.step - INFO - Step flat_field done
2026-03-27 13:31:58,972 - stpipe.step - INFO - Step pathloss running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:31:58,984 - jwst.pathloss.pathloss_step - INFO - Using PATHLOSS reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits
2026-03-27 13:31:59,050 - jwst.pathloss.pathloss - INFO - Input exposure type is NRS_MSASPEC
2026-03-27 13:31:59,205 - jwst.pathloss.pathloss - INFO - Working on slit 0
2026-03-27 13:31:59,206 - jwst.pathloss.pathloss - INFO - Shutter state = 11x, using MOS1x3 entry in ref file
2026-03-27 13:31:59,207 - jwst.pathloss.pathloss - INFO - Shutter above fiducial is closed, using upper region of pathloss array
2026-03-27 13:31:59,280 - stpipe.step - INFO - Step pathloss done
2026-03-27 13:31:59,569 - stpipe.step - INFO - Step barshadow running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:31:59,582 - jwst.barshadow.barshadow_step - INFO - Using BARSHADOW reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits
2026-03-27 13:31:59,771 - jwst.barshadow.bar_shadow - INFO - Working on slitlet 80
2026-03-27 13:31:59,772 - jwst.barshadow.bar_shadow - INFO - Bar shadow correction skipped for slitlet 80 (source not uniform)
2026-03-27 13:31:59,780 - stpipe.step - INFO - Step barshadow done
2026-03-27 13:32:00,081 - stpipe.step - INFO - Step photom running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:32:00,098 - jwst.photom.photom_step - INFO - Using photom reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits
2026-03-27 13:32:00,099 - jwst.photom.photom_step - INFO - Using area reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits
2026-03-27 13:32:00,269 - jwst.photom.photom - INFO - Using instrument: NIRSPEC
2026-03-27 13:32:00,270 - jwst.photom.photom - INFO - detector: NRS1
2026-03-27 13:32:00,270 - jwst.photom.photom - INFO - exp_type: NRS_MSASPEC
2026-03-27 13:32:00,271 - jwst.photom.photom - INFO - filter: F290LP
2026-03-27 13:32:00,272 - jwst.photom.photom - INFO - grating: G395M
2026-03-27 13:32:00,320 - jwst.photom.photom - INFO - Working on slit 80
2026-03-27 13:32:00,321 - jwst.photom.photom - INFO - PHOTMJSR value: 1
2026-03-27 13:32:00,352 - stpipe.step - INFO - Step photom done
2026-03-27 13:32:00,825 - stpipe.step - INFO - Step pixel_replace running with args (<MultiSlitModel from ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs1_cal.fits>,).
2026-03-27 13:32:00,826 - stpipe.step - INFO - Step skipped.
2026-03-27 13:32:01,059 - stpipe.step - INFO - Step resample_spec running with args (<MultiSlitModel from ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs1_cal.fits>,).
2026-03-27 13:32:01,388 - jwst.exp_to_source.exp_to_source - INFO - Reorganizing data from exposure ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs1_cal.fits
2026-03-27 13:32:01,804 - jwst.resample.resample_spec - INFO - Specified output pixel scale ratio: 1.0.
2026-03-27 13:32:01,816 - jwst.resample.resample_spec - INFO - Computed output pixel scale: 0.1036 arcsec.
2026-03-27 13:32:01,818 - stcal.resample.resample - INFO - Output pixel scale: 0.10360056702002639 arcsec.
2026-03-27 13:32:01,819 - stcal.resample.resample - INFO - Driz parameter kernel: square
2026-03-27 13:32:01,819 - stcal.resample.resample - INFO - Driz parameter pixfrac: 1.0
2026-03-27 13:32:01,820 - stcal.resample.resample - INFO - Driz parameter fillval: NaN
2026-03-27 13:32:01,821 - stcal.resample.resample - INFO - Driz parameter weight_type: exptime
2026-03-27 13:32:01,823 - jwst.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:32:01,879 - stcal.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:32:01,883 - stcal.resample.resample - INFO - Drizzling (33, 1354) --> (21, 1354)
2026-03-27 13:32:01,888 - stcal.resample.resample - INFO - Drizzling (33, 1354) --> (21, 1354)
2026-03-27 13:32:01,892 - stcal.resample.resample - INFO - Drizzling (33, 1354) --> (21, 1354)
2026-03-27 13:32:02,038 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.816217049 52.830790936 214.817169667 52.830790936 214.817169667 52.830795030 214.816217049 52.830795030
2026-03-27 13:32:02,194 - stpipe.step - INFO - Saved model in ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs1_s2d.fits
2026-03-27 13:32:02,195 - stpipe.step - INFO - Step resample_spec done
2026-03-27 13:32:02,288 - jwst.pipeline.calwebb_spec2 - INFO - Extracting 1 MSA slitlets
2026-03-27 13:32:02,554 - stpipe.step - INFO - Step extract_1d running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_s2d.fits>,).
2026-03-27 13:32:02,720 - jwst.extract_1d.extract_1d_step - INFO - Using EXTRACT1D reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json
2026-03-27 13:32:02,726 - jwst.extract_1d.extract_1d_step - INFO - Using APCORR file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits
2026-03-27 13:32:02,771 - jwst.extract_1d.extract - INFO - Working on slit 80
2026-03-27 13:32:02,772 - jwst.lib.pipe_utils - WARNING - Mismatched data shapes; skipping invalid data updates for extension 'dq'
2026-03-27 13:32:02,773 - jwst.extract_1d.extract - INFO - Turning on source position correction for exp_type = NRS_MSASPEC
2026-03-27 13:32:02,776 - jwst.extract_1d.source_location - INFO - Using source_xpos and source_ypos to center extraction.
2026-03-27 13:32:02,781 - jwst.extract_1d.extract - INFO - Computed source location is 4.78, at pixel 676, wavelength 4.07
2026-03-27 13:32:02,782 - jwst.extract_1d.extract - INFO - Nominal aperture start/stop: 7.50 -> 12.50 (inclusive)
2026-03-27 13:32:02,783 - jwst.extract_1d.extract - INFO - Nominal location is 10.00, so offset is -5.22 pixels
2026-03-27 13:32:02,784 - jwst.extract_1d.extract - INFO - Mean aperture start/stop from trace: 2.28 -> 7.28 (inclusive)
2026-03-27 13:32:02,787 - jwst.extract_1d.extract - INFO - Creating aperture correction.
2026-03-27 13:32:03,845 - stpipe.step - INFO - Step extract_1d done
2026-03-27 13:32:03,915 - stpipe.step - INFO - Saved model in ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs1_x1d.fits
2026-03-27 13:32:03,917 - jwst.pipeline.calwebb_spec2 - INFO - Finished processing product mast_products/jw01345061001_07101_00003_nrs1
2026-03-27 13:32:03,918 - jwst.pipeline.calwebb_spec2 - INFO - Ending calwebb_spec2
2026-03-27 13:32:03,918 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:32:04,181 - stpipe.step - INFO - Saved model in ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs1_cal.fits
2026-03-27 13:32:04,182 - stpipe.step - INFO - Step Spec2Pipeline done
2026-03-27 13:32:04,182 - jwst.stpipe.core - INFO - Results used jwst version: 1.20.2
2026-03-27 13:32:04,214 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
2026-03-27 13:32:04,232 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
2026-03-27 13:32:04,256 - stpipe.step - INFO - Spec2Pipeline instance created.
2026-03-27 13:32:04,257 - stpipe.step - INFO - AssignWcsStep instance created.
2026-03-27 13:32:04,259 - stpipe.step - INFO - BadpixSelfcalStep instance created.
2026-03-27 13:32:04,260 - stpipe.step - INFO - MSAFlagOpenStep instance created.
2026-03-27 13:32:04,261 - stpipe.step - INFO - NSCleanStep instance created.
2026-03-27 13:32:04,262 - stpipe.step - INFO - BackgroundStep instance created.
2026-03-27 13:32:04,263 - stpipe.step - INFO - ImprintStep instance created.
2026-03-27 13:32:04,264 - stpipe.step - INFO - Extract2dStep instance created.
2026-03-27 13:32:04,269 - stpipe.step - INFO - MasterBackgroundMosStep instance created.
2026-03-27 13:32:04,269 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:32:04,270 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:32:04,271 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:32:04,272 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:32:04,273 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:32:04,274 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:32:04,276 - stpipe.step - INFO - Extract1dStep instance created.
2026-03-27 13:32:04,277 - stpipe.step - INFO - WavecorrStep instance created.
2026-03-27 13:32:04,278 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:32:04,279 - stpipe.step - INFO - SourceTypeStep instance created.
2026-03-27 13:32:04,280 - stpipe.step - INFO - StraylightStep instance created.
2026-03-27 13:32:04,281 - stpipe.step - INFO - FringeStep instance created.
2026-03-27 13:32:04,282 - stpipe.step - INFO - ResidualFringeStep instance created.
2026-03-27 13:32:04,283 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:32:04,285 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:32:04,286 - stpipe.step - INFO - WfssContamStep instance created.
2026-03-27 13:32:04,287 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:32:04,288 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:32:04,289 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:32:04,290 - stpipe.step - INFO - CubeBuildStep instance created.
2026-03-27 13:32:04,293 - stpipe.step - INFO - Extract1dStep instance created.
Saved jw01345061001_07101_00003_nrs1_mask.fits
Saved jw01345061001_07101_00003_nrs1_nsclean.fits
Saved jw01345061001_07101_00003_nrs1_cal.fits
Saved jw01345061001_07101_00003_nrs1_x1d.fits
Processing jw01345061001_07101_00003_nrs2_rate.fits...
2026-03-27 13:32:04,590 - stpipe.step - INFO - Step Spec2Pipeline running with args ('./mast_products/jw01345061001_07101_00003_nrs2_rate.fits',).
2026-03-27 13:32:04,624 - stpipe.step - INFO - Step Spec2Pipeline parameters are:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: ./stage2_nsclean_alternate/
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_bsub: False
fail_on_exception: True
save_wfss_esec: False
steps:
assign_wcs:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sip_approx: True
sip_max_pix_error: 0.01
sip_degree: None
sip_max_inv_pix_error: 0.01
sip_inv_degree: None
sip_npoints: 12
slit_y_low: -0.55
slit_y_high: 0.55
nrs_ifu_slice_wcs: False
badpix_selfcal:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
flagfrac_lower: 0.001
flagfrac_upper: 0.001
kernel_size: 15
force_single: False
save_flagged_bkg: False
msa_flagging:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
nsclean:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
fit_method: fft
fit_by_channel: False
background_method: None
background_box_size: None
mask_spectral_regions: False
n_sigma: 1
fit_histogram: False
single_mask: False
user_mask: None
save_mask: True
save_background: False
save_noise: False
bkg_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
bkg_list: None
save_combined_background: False
sigma: 3.0
maxiters: None
soss_source_percentile: 35.0
soss_bkg_percentile: None
wfss_mmag_extract: None
wfss_maxiter: 5
wfss_rms_stop: 0.0
wfss_outlier_percent: 1.0
imprint_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
extract_2d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
slit_names:
- '11'
source_ids: None
extract_orders: None
grism_objects: None
tsgrism_extract_height: None
wfss_extract_half_height: 5
wfss_mmag_extract: None
wfss_nbright: 1000
master_background_mos:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sigma_clip: 3.0
median_kernel: 1
force_subtract: False
save_background: False
user_background: None
inverse: False
steps:
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
wavecorr:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
srctype:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
source_type: None
straylight:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
clean_showers: False
shower_plane: 3
shower_x_stddev: 18.0
shower_y_stddev: 5.0
shower_low_reject: 0.1
shower_high_reject: 99.9
save_shower_model: False
fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
residual_fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: residual_fringe
search_output_file: False
input_dir: ''
save_intermediate_results: False
ignore_region_min: None
ignore_region_max: None
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
wfss_contam:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
save_simulated_image: False
save_contam_images: False
maximum_cores: none
orders: None
magnitude_limit: None
wl_oversample: 2
max_pixels_per_chunk: 50000
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
cube_build:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: s3d
search_output_file: False
input_dir: ''
pipeline: 3
channel: all
band: all
grating: all
filter: all
output_type: None
scalexy: 0.0
scalew: 0.0
weighting: drizzle
coord_system: skyalign
ra_center: None
dec_center: None
cube_pa: None
nspax_x: None
nspax_y: None
rois: 0.0
roiw: 0.0
weight_power: 2.0
wavemin: None
wavemax: None
single: False
skip_dqflagging: False
offset_file: None
debug_spaxel: -1 -1 -1
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
2026-03-27 13:32:04,657 - stpipe.pipeline - INFO - Prefetching reference files for dataset: 'jw01345061001_07101_00003_nrs2_rate.fits' reftypes = ['apcorr', 'area', 'barshadow', 'bkg', 'camera', 'collimator', 'cubepar', 'dflat', 'disperser', 'distortion', 'extract1d', 'fflat', 'filteroffset', 'flat', 'fore', 'fpa', 'fringe', 'ifufore', 'ifupost', 'ifuslicer', 'mrsxartcorr', 'msa', 'msaoper', 'ote', 'pastasoss', 'pathloss', 'photom', 'psf', 'regions', 'sflat', 'speckernel', 'specprofile', 'specwcs', 'wavecorr', 'wavelengthrange']
2026-03-27 13:32:04,662 - stpipe.pipeline - INFO - Prefetch for APCORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits'.
2026-03-27 13:32:04,663 - stpipe.pipeline - INFO - Prefetch for AREA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits'.
2026-03-27 13:32:04,664 - stpipe.pipeline - INFO - Prefetch for BARSHADOW reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits'.
2026-03-27 13:32:04,664 - stpipe.pipeline - INFO - Prefetch for BKG reference file is 'N/A'.
2026-03-27 13:32:04,665 - stpipe.pipeline - INFO - Prefetch for CAMERA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf'.
2026-03-27 13:32:04,665 - stpipe.pipeline - INFO - Prefetch for COLLIMATOR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf'.
2026-03-27 13:32:04,666 - stpipe.pipeline - INFO - Prefetch for CUBEPAR reference file is 'N/A'.
2026-03-27 13:32:04,667 - stpipe.pipeline - INFO - Prefetch for DFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0002.fits'.
2026-03-27 13:32:04,667 - stpipe.pipeline - INFO - Prefetch for DISPERSER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf'.
2026-03-27 13:32:04,668 - stpipe.pipeline - INFO - Prefetch for DISTORTION reference file is 'N/A'.
2026-03-27 13:32:04,668 - stpipe.pipeline - INFO - Prefetch for EXTRACT1D reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json'.
2026-03-27 13:32:04,670 - stpipe.pipeline - INFO - Prefetch for FFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits'.
2026-03-27 13:32:04,670 - stpipe.pipeline - INFO - Prefetch for FILTEROFFSET reference file is 'N/A'.
2026-03-27 13:32:04,671 - stpipe.pipeline - INFO - Prefetch for FLAT reference file is 'N/A'.
2026-03-27 13:32:04,671 - stpipe.pipeline - INFO - Prefetch for FORE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf'.
2026-03-27 13:32:04,672 - stpipe.pipeline - INFO - Prefetch for FPA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf'.
2026-03-27 13:32:04,673 - stpipe.pipeline - INFO - Prefetch for FRINGE reference file is 'N/A'.
2026-03-27 13:32:04,673 - stpipe.pipeline - INFO - Prefetch for IFUFORE reference file is 'N/A'.
2026-03-27 13:32:04,673 - stpipe.pipeline - INFO - Prefetch for IFUPOST reference file is 'N/A'.
2026-03-27 13:32:04,674 - stpipe.pipeline - INFO - Prefetch for IFUSLICER reference file is 'N/A'.
2026-03-27 13:32:04,674 - stpipe.pipeline - INFO - Prefetch for MRSXARTCORR reference file is 'N/A'.
2026-03-27 13:32:04,676 - stpipe.pipeline - INFO - Prefetch for MSA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf'.
2026-03-27 13:32:04,676 - stpipe.pipeline - INFO - Prefetch for MSAOPER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json'.
2026-03-27 13:32:04,677 - stpipe.pipeline - INFO - Prefetch for OTE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf'.
2026-03-27 13:32:04,677 - stpipe.pipeline - INFO - Prefetch for PASTASOSS reference file is 'N/A'.
2026-03-27 13:32:04,678 - stpipe.pipeline - INFO - Prefetch for PATHLOSS reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits'.
2026-03-27 13:32:04,678 - stpipe.pipeline - INFO - Prefetch for PHOTOM reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits'.
2026-03-27 13:32:04,679 - stpipe.pipeline - INFO - Prefetch for PSF reference file is 'N/A'.
2026-03-27 13:32:04,679 - stpipe.pipeline - INFO - Prefetch for REGIONS reference file is 'N/A'.
2026-03-27 13:32:04,681 - stpipe.pipeline - INFO - Prefetch for SFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0232.fits'.
2026-03-27 13:32:04,682 - stpipe.pipeline - INFO - Prefetch for SPECKERNEL reference file is 'N/A'.
2026-03-27 13:32:04,682 - stpipe.pipeline - INFO - Prefetch for SPECPROFILE reference file is 'N/A'.
2026-03-27 13:32:04,683 - stpipe.pipeline - INFO - Prefetch for SPECWCS reference file is 'N/A'.
2026-03-27 13:32:04,683 - stpipe.pipeline - INFO - Prefetch for WAVECORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf'.
2026-03-27 13:32:04,684 - stpipe.pipeline - INFO - Prefetch for WAVELENGTHRANGE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf'.
2026-03-27 13:32:04,685 - jwst.pipeline.calwebb_spec2 - INFO - Starting calwebb_spec2 ...
2026-03-27 13:32:04,685 - jwst.pipeline.calwebb_spec2 - INFO - Processing product mast_products/jw01345061001_07101_00003_nrs2
2026-03-27 13:32:04,686 - jwst.pipeline.calwebb_spec2 - INFO - Working on input ./mast_products/jw01345061001_07101_00003_nrs2_rate.fits ...
2026-03-27 13:32:04,874 - stpipe.step - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>,).
2026-03-27 13:32:04,972 - jwst.assign_wcs.nirspec - INFO - Retrieving open MSA slitlets for msa_metadata_id = 83 and dither_index = 3
2026-03-27 13:32:04,981 - jwst.assign_wcs.nirspec - INFO - Slitlet 3 is background only; assigned source_id=3
2026-03-27 13:32:04,982 - jwst.assign_wcs.nirspec - INFO - Slitlet 4 is background only; assigned source_id=4
2026-03-27 13:32:04,983 - jwst.assign_wcs.nirspec - INFO - Slitlet 5 is background only; assigned source_id=5
2026-03-27 13:32:04,990 - jwst.assign_wcs.nirspec - INFO - Slitlet 9 is background only; assigned source_id=9
2026-03-27 13:32:04,993 - jwst.assign_wcs.nirspec - INFO - Slitlet 10 contains virtual source, with source_id=-59
2026-03-27 13:32:04,996 - jwst.assign_wcs.nirspec - INFO - Slitlet 12 is background only; assigned source_id=12
2026-03-27 13:32:04,997 - jwst.assign_wcs.nirspec - INFO - Slitlet 13 is background only; assigned source_id=13
2026-03-27 13:32:04,998 - jwst.assign_wcs.nirspec - INFO - Slitlet 14 is background only; assigned source_id=14
2026-03-27 13:32:05,002 - jwst.assign_wcs.nirspec - INFO - Slitlet 15 contains virtual source, with source_id=-63
2026-03-27 13:32:05,007 - jwst.assign_wcs.nirspec - INFO - Slitlet 18 is background only; assigned source_id=18
2026-03-27 13:32:05,008 - jwst.assign_wcs.nirspec - INFO - Slitlet 19 is background only; assigned source_id=19
2026-03-27 13:32:05,016 - jwst.assign_wcs.nirspec - INFO - Slitlet 23 is background only; assigned source_id=23
2026-03-27 13:32:05,023 - jwst.assign_wcs.nirspec - INFO - Slitlet 27 is background only; assigned source_id=27
2026-03-27 13:32:05,024 - jwst.assign_wcs.nirspec - INFO - Slitlet 28 is background only; assigned source_id=28
2026-03-27 13:32:05,037 - jwst.assign_wcs.nirspec - INFO - Slitlet 34 is background only; assigned source_id=34
2026-03-27 13:32:05,066 - jwst.assign_wcs.nirspec - INFO - Slitlet 48 is background only; assigned source_id=48
2026-03-27 13:32:05,080 - jwst.assign_wcs.nirspec - INFO - Slitlet 55 is background only; assigned source_id=55
2026-03-27 13:32:05,085 - jwst.assign_wcs.nirspec - INFO - Slitlet 57 contains virtual source, with source_id=-72
2026-03-27 13:32:05,095 - jwst.assign_wcs.nirspec - INFO - Slitlet 62 is background only; assigned source_id=62
2026-03-27 13:32:05,101 - jwst.assign_wcs.nirspec - INFO - Slitlet 64 contains virtual source, with source_id=-74
2026-03-27 13:32:05,106 - jwst.assign_wcs.nirspec - INFO - Slitlet 67 is background only; assigned source_id=67
2026-03-27 13:32:05,107 - jwst.assign_wcs.nirspec - INFO - Slitlet 68 is background only; assigned source_id=68
2026-03-27 13:32:05,111 - jwst.assign_wcs.nirspec - INFO - Slitlet 69 contains virtual source, with source_id=-77
2026-03-27 13:32:05,111 - jwst.assign_wcs.nirspec - INFO - Slitlet 70 is background only; assigned source_id=70
2026-03-27 13:32:05,112 - jwst.assign_wcs.nirspec - INFO - Slitlet 71 is background only; assigned source_id=71
2026-03-27 13:32:05,117 - jwst.assign_wcs.nirspec - INFO - Slitlet 74 is background only; assigned source_id=74
2026-03-27 13:32:05,125 - jwst.assign_wcs.nirspec - INFO - Slitlet 78 is background only; assigned source_id=78
2026-03-27 13:32:05,159 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:32:05,160 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:32:05,161 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:32:05,162 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:32:06,198 - jwst.assign_wcs.nirspec - INFO - Removing slit 58 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,216 - jwst.assign_wcs.nirspec - INFO - Removing slit 59 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,233 - jwst.assign_wcs.nirspec - INFO - Removing slit 60 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,251 - jwst.assign_wcs.nirspec - INFO - Removing slit 61 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,268 - jwst.assign_wcs.nirspec - INFO - Removing slit 62 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,286 - jwst.assign_wcs.nirspec - INFO - Removing slit 65 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,304 - jwst.assign_wcs.nirspec - INFO - Removing slit 66 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,321 - jwst.assign_wcs.nirspec - INFO - Removing slit 68 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,338 - jwst.assign_wcs.nirspec - INFO - Removing slit 69 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,356 - jwst.assign_wcs.nirspec - INFO - Removing slit 70 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,373 - jwst.assign_wcs.nirspec - INFO - Removing slit 76 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,392 - jwst.assign_wcs.nirspec - INFO - Removing slit 78 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,458 - jwst.assign_wcs.nirspec - INFO - Removing slit 57 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,476 - jwst.assign_wcs.nirspec - INFO - Removing slit 63 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,493 - jwst.assign_wcs.nirspec - INFO - Removing slit 64 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,511 - jwst.assign_wcs.nirspec - INFO - Removing slit 67 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,530 - jwst.assign_wcs.nirspec - INFO - Removing slit 71 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,547 - jwst.assign_wcs.nirspec - INFO - Removing slit 72 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,565 - jwst.assign_wcs.nirspec - INFO - Removing slit 73 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,582 - jwst.assign_wcs.nirspec - INFO - Removing slit 74 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,600 - jwst.assign_wcs.nirspec - INFO - Removing slit 75 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,617 - jwst.assign_wcs.nirspec - INFO - Removing slit 77 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,634 - jwst.assign_wcs.nirspec - INFO - Removing slit 79 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,651 - jwst.assign_wcs.nirspec - INFO - Removing slit 80 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,670 - jwst.assign_wcs.nirspec - INFO - Removing slit 81 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:06,671 - jwst.assign_wcs.nirspec - INFO - Slits projected on detector NRS2: ['2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56']
2026-03-27 13:32:06,673 - jwst.assign_wcs.nirspec - INFO - Computing WCS for 55 open slitlets
2026-03-27 13:32:06,697 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:32:06,698 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:32:06,699 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:32:06,700 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:32:06,711 - jwst.assign_wcs.nirspec - INFO - SPORDER= -1, wrange=[2.87e-06, 5.27e-06]
2026-03-27 13:32:06,813 - jwst.assign_wcs.nirspec - INFO - Applied Barycentric velocity correction : 1.000049924895689
2026-03-27 13:32:06,843 - jwst.assign_wcs.nirspec - INFO - There are 18 open slits in quadrant 1
2026-03-27 13:32:06,961 - jwst.assign_wcs.nirspec - INFO - There are 26 open slits in quadrant 2
2026-03-27 13:32:07,334 - jwst.assign_wcs.nirspec - INFO - There are 8 open slits in quadrant 3
2026-03-27 13:32:07,387 - jwst.assign_wcs.nirspec - INFO - There are 3 open slits in quadrant 4
2026-03-27 13:32:07,407 - jwst.assign_wcs.nirspec - INFO - There are 0 open slits in quadrant 5
2026-03-27 13:32:07,562 - jwst.assign_wcs.nirspec - INFO - Created a NIRSPEC nrs_msaspec pipeline with references {'distortion': None, 'filteroffset': None, 'specwcs': None, 'regions': None, 'wavelengthrange': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf', 'camera': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf', 'collimator': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf', 'disperser': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf', 'fore': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf', 'fpa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf', 'msa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf', 'ote': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf', 'ifupost': None, 'ifufore': None, 'ifuslicer': None, 'msametafile': './mast_products/jw01345061001_01_msa.fits'}
2026-03-27 13:32:10,591 - jwst.assign_wcs.assign_wcs - INFO - COMPLETED assign_wcs
2026-03-27 13:32:10,599 - stpipe.step - INFO - Step assign_wcs done
2026-03-27 13:32:10,828 - stpipe.step - INFO - Step badpix_selfcal running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>, [], []).
2026-03-27 13:32:10,829 - stpipe.step - INFO - Step skipped.
2026-03-27 13:32:11,029 - stpipe.step - INFO - Step msa_flagging running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>,).
2026-03-27 13:32:11,967 - jwst.msaflagopen.msaflagopen_step - INFO - Using reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json
2026-03-27 13:32:12,344 - jwst.msaflagopen.msaflag_open - INFO - 24 failed open shutters
2026-03-27 13:32:17,108 - stpipe.step - INFO - Step msa_flagging done
2026-03-27 13:32:17,452 - stpipe.step - INFO - Step nsclean running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>,).
2026-03-27 13:32:17,453 - jwst.nsclean.nsclean_step - WARNING - The 'nsclean' step is a deprecated alias to 'clean_flicker_noise' and will be removed in future builds.
2026-03-27 13:32:17,459 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Input exposure type is NRS_MSASPEC, detector=NRS2
2026-03-27 13:32:18,516 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Creating mask
2026-03-27 13:32:19,029 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Cleaning image jw01345061001_07101_00003_nrs2_rate.fits
2026-03-27 13:32:21,819 - jwst.nsclean.nsclean_step - INFO - Saving mask file ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs2_mask.fits
2026-03-27 13:32:23,578 - stpipe.step - INFO - Saved model in ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs2_nsclean.fits
2026-03-27 13:32:23,579 - stpipe.step - INFO - Step nsclean done
2026-03-27 13:32:23,947 - stpipe.step - INFO - Step imprint_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_nsclean.fits>, []).
2026-03-27 13:32:23,948 - stpipe.step - INFO - Step skipped.
2026-03-27 13:32:24,223 - stpipe.step - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_nsclean.fits>, []).
2026-03-27 13:32:24,225 - stpipe.step - INFO - Step skipped.
2026-03-27 13:32:24,499 - stpipe.step - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:32:24,505 - jwst.extract_2d.extract_2d - INFO - EXP_TYPE is NRS_MSASPEC
2026-03-27 13:32:24,506 - jwst.extract_2d.nirspec - INFO - Slits selected:
2026-03-27 13:32:24,507 - jwst.extract_2d.nirspec - INFO - Name: 11, source_id: 386
2026-03-27 13:32:24,575 - jwst.extract_2d.nirspec - INFO - Name of subarray extracted: 11
2026-03-27 13:32:24,575 - jwst.extract_2d.nirspec - INFO - Subarray x-extents are: 141 1507
2026-03-27 13:32:24,576 - jwst.extract_2d.nirspec - INFO - Subarray y-extents are: 616 648
2026-03-27 13:32:24,865 - jwst.extract_2d.nirspec - INFO - set slit_attributes completed
2026-03-27 13:32:24,874 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.832940199 52.885103324 214.832013460 52.885093088 214.832014161 52.885038573 214.832940897 52.885048802
2026-03-27 13:32:24,875 - jwst.extract_2d.nirspec - INFO - Updated S_REGION to POLYGON ICRS 214.832940199 52.885103324 214.832013460 52.885093088 214.832014161 52.885038573 214.832940897 52.885048802
2026-03-27 13:32:24,949 - stpipe.step - INFO - Step extract_2d done
2026-03-27 13:32:25,233 - stpipe.step - INFO - Step srctype running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:32:25,412 - jwst.srctype.srctype - INFO - Input EXP_TYPE is NRS_MSASPEC
2026-03-27 13:32:25,414 - jwst.srctype.srctype - INFO - source_id=386, stellarity=1.0000, type=POINT
2026-03-27 13:32:25,415 - stpipe.step - INFO - Step srctype done
2026-03-27 13:32:25,872 - stpipe.step - INFO - Step master_background_mos running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:32:25,879 - jwst.master_background.master_background_mos_step - WARNING - No background slits available for creating master background. Skipping
2026-03-27 13:32:26,051 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:32:26,052 - stpipe.step - INFO - Step master_background_mos done
2026-03-27 13:32:26,347 - stpipe.step - INFO - Step wavecorr running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:32:26,532 - jwst.wavecorr.wavecorr_step - INFO - Using WAVECORR reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf
2026-03-27 13:32:26,533 - jwst.wavecorr.wavecorr - INFO - Detected a POINT source type in slit 11
2026-03-27 13:32:26,620 - jwst.wavecorr.wavecorr - INFO - Using wavelength zero-point correction for aperture MOS
2026-03-27 13:32:26,666 - stpipe.step - INFO - Step wavecorr done
2026-03-27 13:32:26,949 - stpipe.step - INFO - Step flat_field running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:32:26,976 - jwst.flatfield.flat_field_step - INFO - No reference found for type FLAT
2026-03-27 13:32:27,142 - jwst.flatfield.flat_field_step - INFO - Using FFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits
2026-03-27 13:32:27,675 - jwst.flatfield.flat_field_step - INFO - Using SFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0232.fits
2026-03-27 13:32:27,837 - jwst.flatfield.flat_field_step - INFO - Using DFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0002.fits
2026-03-27 13:32:27,990 - jwst.flatfield.flat_field - INFO - Working on slit 11
2026-03-27 13:32:28,414 - stpipe.step - INFO - Step flat_field done
2026-03-27 13:32:28,728 - stpipe.step - INFO - Step pathloss running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:32:28,740 - jwst.pathloss.pathloss_step - INFO - Using PATHLOSS reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits
2026-03-27 13:32:28,805 - jwst.pathloss.pathloss - INFO - Input exposure type is NRS_MSASPEC
2026-03-27 13:32:28,962 - jwst.pathloss.pathloss - INFO - Working on slit 0
2026-03-27 13:32:28,963 - jwst.pathloss.pathloss - INFO - Shutter state = 11x, using MOS1x3 entry in ref file
2026-03-27 13:32:28,964 - jwst.pathloss.pathloss - INFO - Shutter above fiducial is closed, using upper region of pathloss array
2026-03-27 13:32:29,035 - stpipe.step - INFO - Step pathloss done
2026-03-27 13:32:29,345 - stpipe.step - INFO - Step barshadow running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:32:29,357 - jwst.barshadow.barshadow_step - INFO - Using BARSHADOW reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits
2026-03-27 13:32:29,558 - jwst.barshadow.bar_shadow - INFO - Working on slitlet 11
2026-03-27 13:32:29,558 - jwst.barshadow.bar_shadow - INFO - Bar shadow correction skipped for slitlet 11 (source not uniform)
2026-03-27 13:32:29,567 - stpipe.step - INFO - Step barshadow done
2026-03-27 13:32:29,869 - stpipe.step - INFO - Step photom running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:32:29,887 - jwst.photom.photom_step - INFO - Using photom reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits
2026-03-27 13:32:29,887 - jwst.photom.photom_step - INFO - Using area reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits
2026-03-27 13:32:30,065 - jwst.photom.photom - INFO - Using instrument: NIRSPEC
2026-03-27 13:32:30,066 - jwst.photom.photom - INFO - detector: NRS2
2026-03-27 13:32:30,067 - jwst.photom.photom - INFO - exp_type: NRS_MSASPEC
2026-03-27 13:32:30,068 - jwst.photom.photom - INFO - filter: F290LP
2026-03-27 13:32:30,068 - jwst.photom.photom - INFO - grating: G395M
2026-03-27 13:32:30,117 - jwst.photom.photom - INFO - Working on slit 11
2026-03-27 13:32:30,117 - jwst.photom.photom - INFO - PHOTMJSR value: 1
2026-03-27 13:32:30,148 - stpipe.step - INFO - Step photom done
2026-03-27 13:32:30,651 - stpipe.step - INFO - Step pixel_replace running with args (<MultiSlitModel from ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs2_cal.fits>,).
2026-03-27 13:32:30,652 - stpipe.step - INFO - Step skipped.
2026-03-27 13:32:30,883 - stpipe.step - INFO - Step resample_spec running with args (<MultiSlitModel from ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs2_cal.fits>,).
2026-03-27 13:32:31,195 - jwst.exp_to_source.exp_to_source - INFO - Reorganizing data from exposure ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs2_cal.fits
2026-03-27 13:32:31,611 - jwst.resample.resample_spec - INFO - Specified output pixel scale ratio: 1.0.
2026-03-27 13:32:31,620 - jwst.resample.resample_spec - INFO - Computed output pixel scale: 0.10447 arcsec.
2026-03-27 13:32:31,622 - stcal.resample.resample - INFO - Output pixel scale: 0.1044727401149182 arcsec.
2026-03-27 13:32:31,623 - stcal.resample.resample - INFO - Driz parameter kernel: square
2026-03-27 13:32:31,623 - stcal.resample.resample - INFO - Driz parameter pixfrac: 1.0
2026-03-27 13:32:31,624 - stcal.resample.resample - INFO - Driz parameter fillval: NaN
2026-03-27 13:32:31,624 - stcal.resample.resample - INFO - Driz parameter weight_type: exptime
2026-03-27 13:32:31,626 - jwst.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:32:31,683 - stcal.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:32:31,687 - stcal.resample.resample - INFO - Drizzling (32, 1366) --> (21, 1366)
2026-03-27 13:32:31,691 - stcal.resample.resample - INFO - Drizzling (32, 1366) --> (21, 1366)
2026-03-27 13:32:31,696 - stcal.resample.resample - INFO - Drizzling (32, 1366) --> (21, 1366)
2026-03-27 13:32:31,838 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.831972292 52.885065372 214.832933995 52.885065372 214.832933995 52.885075990 214.831972292 52.885075990
2026-03-27 13:32:31,993 - stpipe.step - INFO - Saved model in ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs2_s2d.fits
2026-03-27 13:32:31,994 - stpipe.step - INFO - Step resample_spec done
2026-03-27 13:32:32,088 - jwst.pipeline.calwebb_spec2 - INFO - Extracting 1 MSA slitlets
2026-03-27 13:32:32,340 - stpipe.step - INFO - Step extract_1d running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_s2d.fits>,).
2026-03-27 13:32:32,504 - jwst.extract_1d.extract_1d_step - INFO - Using EXTRACT1D reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json
2026-03-27 13:32:32,511 - jwst.extract_1d.extract_1d_step - INFO - Using APCORR file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits
2026-03-27 13:32:32,555 - jwst.extract_1d.extract - INFO - Working on slit 11
2026-03-27 13:32:32,556 - jwst.lib.pipe_utils - WARNING - Mismatched data shapes; skipping invalid data updates for extension 'dq'
2026-03-27 13:32:32,557 - jwst.extract_1d.extract - INFO - Turning on source position correction for exp_type = NRS_MSASPEC
2026-03-27 13:32:32,561 - jwst.extract_1d.source_location - INFO - Using source_xpos and source_ypos to center extraction.
2026-03-27 13:32:32,565 - jwst.extract_1d.extract - INFO - Computed source location is 4.49, at pixel 682, wavelength 4.07
2026-03-27 13:32:32,566 - jwst.extract_1d.extract - INFO - Nominal aperture start/stop: 7.50 -> 12.50 (inclusive)
2026-03-27 13:32:32,568 - jwst.extract_1d.extract - INFO - Nominal location is 10.00, so offset is -5.51 pixels
2026-03-27 13:32:32,569 - jwst.extract_1d.extract - INFO - Mean aperture start/stop from trace: 1.99 -> 6.99 (inclusive)
2026-03-27 13:32:32,572 - jwst.extract_1d.extract - INFO - Creating aperture correction.
2026-03-27 13:32:33,623 - stpipe.step - INFO - Step extract_1d done
2026-03-27 13:32:33,693 - stpipe.step - INFO - Saved model in ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs2_x1d.fits
2026-03-27 13:32:33,694 - jwst.pipeline.calwebb_spec2 - INFO - Finished processing product mast_products/jw01345061001_07101_00003_nrs2
2026-03-27 13:32:33,695 - jwst.pipeline.calwebb_spec2 - INFO - Ending calwebb_spec2
2026-03-27 13:32:33,696 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:32:33,956 - stpipe.step - INFO - Saved model in ./stage2_nsclean_alternate/jw01345061001_07101_00003_nrs2_cal.fits
2026-03-27 13:32:33,957 - stpipe.step - INFO - Step Spec2Pipeline done
2026-03-27 13:32:33,958 - jwst.stpipe.core - INFO - Results used jwst version: 1.20.2
Saved jw01345061001_07101_00003_nrs2_mask.fits
Saved jw01345061001_07101_00003_nrs2_nsclean.fits
Saved jw01345061001_07101_00003_nrs2_cal.fits
Saved jw01345061001_07101_00003_nrs2_x1d.fits
Run time: 0.9833333333333333 min
6.1 Verify the Mask (Alternate Mask) #
Check the mask against the rate data to make sure it keeps only dark areas of the detector.
# Plot the rate data with masked areas blocked.
# List of on-the-fly built masks from the pipeline.
nsclean_alternate_masks = [
stage2_nsclean_alternate_dir + "jw01345061001_07101_00003_nrs1_mask.fits",
stage2_nsclean_alternate_dir + "jw01345061001_07101_00003_nrs2_mask.fits",
]
# Plot each associated set of rateint data and mask file.
for rate_file, mask_file in zip(rate_names, nsclean_alternate_masks):
plot_dark_data(mast_products_dir + rate_file, mask_file, layout="columns", scale=9)
6.2 Comparing Original vs. Cleaned Data (Alternate Mask) #
# Plot the original and cleaned data, as well as a residual map.
cleaned_alternate_masks = [
stage2_nsclean_alternate_dir + "jw01345061001_07101_00003_nrs1_nsclean.fits",
stage2_nsclean_alternate_dir + "jw01345061001_07101_00003_nrs2_nsclean.fits",
]
# Plot each associated set of rateint data and cleaned file.
for rate_file, cleaned_file in zip(rate_names, cleaned_alternate_masks):
plot_cleaned_data(
mast_products_dir + rate_file, cleaned_file, layout="columns", scale=9
)
Compare the extracted spectrum from the cleaned data to the spectrum extracted from the original rate file.
x1d_nsclean_alternate = [
stage2_nsclean_alternate_dir + "jw01345061001_07101_00003_nrs1_x1d.fits",
stage2_nsclean_alternate_dir + "jw01345061001_07101_00003_nrs2_x1d.fits",
]
for original, cleaned in zip(x1d_nsclean_skipped, x1d_nsclean_alternate):
plot_spectra([original, cleaned], scale_percent=9)
Notes:
In slit 80 on NRS1 and in slit 11 on NRS2, the overall continuum level has been slightly altered by the cleaning process (similar to the default masking).
In slit 11 on NRS2, some of the negative flux in the original spectrum has been corrected. The high-frequency noise introduced by the default masking, which affected slit 11 between 4.5 - 5.0 um (resulting in a negative dip in the spectrum), is improved with the alternate masking.
7. Clean up 1/f Noise with NSClean (Hand-Modified Mask) #
In certain scenarios, manual generation of a mask may be required. Here, we present **one** approach to manually modify the mask (editing an overly masked region in NRS2 around x=1000, y=600 to include more background; excluding some large snowballs in NRS1), starting with the default mask output from the pipeline. It is worth noting that the mask modified using this method may not necessarily outperform the two previous options.
# Set up directory for running NSClean with user-supplied mask.
stage2_nsclean_modified_dir = "./stage2_nsclean_modified/"
if not os.path.exists(stage2_nsclean_modified_dir):
# Create the directory if it doesn't exist.
os.makedirs(stage2_nsclean_modified_dir)
# Hand-modify certain mask regions.
# Specifically modifying the region in NRS2 around x=1000, y=600.
# Define the list to store paths of modified masks.
nsclean_modified_masks = []
# Iterate through the list of original masks.
for mask in nsclean_default_masks:
# New mask file name.
output_file = os.path.basename(mask)[:-5] + "_modified.fits"
# Open the FITS file.
with fits.open(mask) as hdul:
# Extract the mask data from the science extension.
mask_data = hdul["SCI"].data.copy() # Make a copy.
if "nrs2" in mask:
# Step 1: Set the default masked regions back to True.
mask_data[550:651, :1300] = True
# Step 2: Re-define masked regions by hand.
mask_data[550:575, :1300] = False # Crowded region NRS2.
mask_data[590:615, 150:1720] = False
mask_data[622:647, 100:1620] = False
else:
mask_data[50:130, 780:850] = False # Snowballs
mask_data[110:140, 920:945] = False
mask_data[820:940, 2000:2040] = False
mask_data[1650:1700, 1900:1960] = False
mask_data[1800:1900, 330:410] = False
# Update the data within the science extension.
hdul["SCI"].data = mask_data
# Save the modified FITS file
output_path = os.path.join(stage2_nsclean_modified_dir, output_file)
hdul_modified = hdul.copy() # Make a copy.
hdul_modified.writeto(output_path, overwrite=True)
nsclean_modified_masks.append(output_path)
print(f"Saved modified mask as: {output_path}")
Saved modified mask as: ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_mask_modified.fits
Saved modified mask as: ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_mask_modified.fits
7.1 Verify the Mask (Hand-Modified Mask) #
Check the mask against the rate data to make sure it keeps only dark areas of the detector.
# Plot the rate data with masked areas blocked.
# List of modified masks for the pipeline.
nsclean_modified_masks = [
stage2_nsclean_modified_dir + "jw01345061001_07101_00003_nrs1_mask_modified.fits",
stage2_nsclean_modified_dir + "jw01345061001_07101_00003_nrs2_mask_modified.fits",
]
# Plot each associated set of rateint data and mask file.
for rate_file, mask_file in zip(rate_names, nsclean_modified_masks):
plot_dark_data(mast_products_dir + rate_file, mask_file, layout="columns", scale=9)
# 1/f noise cleaned data (user-supplied mask).
# Estimated run time: 5 minutes.
start = tt.time()
for indx, i in enumerate(rate_names):
print(f"Processing {i}...")
if "nrs1" in i:
slit_name = "80"
else:
slit_name = "11"
Spec2Pipeline.call(
mast_products_dir + i,
save_results=True,
steps={
"nsclean": {
"skip": False,
"save_mask": True,
"save_results": True,
"user_mask": nsclean_modified_masks[indx],
},
"extract_2d": {"slit_names": slit_name},
},
output_dir=stage2_nsclean_modified_dir,
)
print(f"Saved {i[:-9]}" + "mask.fits")
print(f"Saved {i[:-9]}" + "nsclean.fits")
print(f"Saved {i[:-9]}" + "cal.fits")
print(f"Saved {i[:-9]}" + "x1d.fits")
end = tt.time()
print("Run time: ", round(end - start, 1) / 60.0, " min")
2026-03-27 13:32:51,344 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
2026-03-27 13:32:51,362 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
2026-03-27 13:32:51,386 - stpipe.step - INFO - Spec2Pipeline instance created.
2026-03-27 13:32:51,387 - stpipe.step - INFO - AssignWcsStep instance created.
2026-03-27 13:32:51,388 - stpipe.step - INFO - BadpixSelfcalStep instance created.
2026-03-27 13:32:51,389 - stpipe.step - INFO - MSAFlagOpenStep instance created.
2026-03-27 13:32:51,391 - stpipe.step - INFO - NSCleanStep instance created.
2026-03-27 13:32:51,392 - stpipe.step - INFO - BackgroundStep instance created.
2026-03-27 13:32:51,392 - stpipe.step - INFO - ImprintStep instance created.
2026-03-27 13:32:51,394 - stpipe.step - INFO - Extract2dStep instance created.
2026-03-27 13:32:51,399 - stpipe.step - INFO - MasterBackgroundMosStep instance created.
2026-03-27 13:32:51,400 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:32:51,401 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:32:51,401 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:32:51,402 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:32:51,403 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:32:51,405 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:32:51,407 - stpipe.step - INFO - Extract1dStep instance created.
2026-03-27 13:32:51,408 - stpipe.step - INFO - WavecorrStep instance created.
2026-03-27 13:32:51,409 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:32:51,410 - stpipe.step - INFO - SourceTypeStep instance created.
2026-03-27 13:32:51,411 - stpipe.step - INFO - StraylightStep instance created.
2026-03-27 13:32:51,411 - stpipe.step - INFO - FringeStep instance created.
2026-03-27 13:32:51,412 - stpipe.step - INFO - ResidualFringeStep instance created.
2026-03-27 13:32:51,413 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:32:51,414 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:32:51,415 - stpipe.step - INFO - WfssContamStep instance created.
2026-03-27 13:32:51,416 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:32:51,417 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:32:51,418 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:32:51,419 - stpipe.step - INFO - CubeBuildStep instance created.
2026-03-27 13:32:51,421 - stpipe.step - INFO - Extract1dStep instance created.
Processing jw01345061001_07101_00003_nrs1_rate.fits...
2026-03-27 13:32:51,584 - stpipe.step - INFO - Step Spec2Pipeline running with args ('./mast_products/jw01345061001_07101_00003_nrs1_rate.fits',).
2026-03-27 13:32:51,619 - stpipe.step - INFO - Step Spec2Pipeline parameters are:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: ./stage2_nsclean_modified/
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_bsub: False
fail_on_exception: True
save_wfss_esec: False
steps:
assign_wcs:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sip_approx: True
sip_max_pix_error: 0.01
sip_degree: None
sip_max_inv_pix_error: 0.01
sip_inv_degree: None
sip_npoints: 12
slit_y_low: -0.55
slit_y_high: 0.55
nrs_ifu_slice_wcs: False
badpix_selfcal:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
flagfrac_lower: 0.001
flagfrac_upper: 0.001
kernel_size: 15
force_single: False
save_flagged_bkg: False
msa_flagging:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
nsclean:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
fit_method: fft
fit_by_channel: False
background_method: None
background_box_size: None
mask_spectral_regions: True
n_sigma: 5.0
fit_histogram: False
single_mask: False
user_mask: ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_mask_modified.fits
save_mask: True
save_background: False
save_noise: False
bkg_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
bkg_list: None
save_combined_background: False
sigma: 3.0
maxiters: None
soss_source_percentile: 35.0
soss_bkg_percentile: None
wfss_mmag_extract: None
wfss_maxiter: 5
wfss_rms_stop: 0.0
wfss_outlier_percent: 1.0
imprint_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
extract_2d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
slit_names:
- '80'
source_ids: None
extract_orders: None
grism_objects: None
tsgrism_extract_height: None
wfss_extract_half_height: 5
wfss_mmag_extract: None
wfss_nbright: 1000
master_background_mos:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sigma_clip: 3.0
median_kernel: 1
force_subtract: False
save_background: False
user_background: None
inverse: False
steps:
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
wavecorr:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
srctype:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
source_type: None
straylight:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
clean_showers: False
shower_plane: 3
shower_x_stddev: 18.0
shower_y_stddev: 5.0
shower_low_reject: 0.1
shower_high_reject: 99.9
save_shower_model: False
fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
residual_fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: residual_fringe
search_output_file: False
input_dir: ''
save_intermediate_results: False
ignore_region_min: None
ignore_region_max: None
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
wfss_contam:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
save_simulated_image: False
save_contam_images: False
maximum_cores: none
orders: None
magnitude_limit: None
wl_oversample: 2
max_pixels_per_chunk: 50000
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
cube_build:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: s3d
search_output_file: False
input_dir: ''
pipeline: 3
channel: all
band: all
grating: all
filter: all
output_type: None
scalexy: 0.0
scalew: 0.0
weighting: drizzle
coord_system: skyalign
ra_center: None
dec_center: None
cube_pa: None
nspax_x: None
nspax_y: None
rois: 0.0
roiw: 0.0
weight_power: 2.0
wavemin: None
wavemax: None
single: False
skip_dqflagging: False
offset_file: None
debug_spaxel: -1 -1 -1
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
2026-03-27 13:32:51,652 - stpipe.pipeline - INFO - Prefetching reference files for dataset: 'jw01345061001_07101_00003_nrs1_rate.fits' reftypes = ['apcorr', 'area', 'barshadow', 'bkg', 'camera', 'collimator', 'cubepar', 'dflat', 'disperser', 'distortion', 'extract1d', 'fflat', 'filteroffset', 'flat', 'fore', 'fpa', 'fringe', 'ifufore', 'ifupost', 'ifuslicer', 'mrsxartcorr', 'msa', 'msaoper', 'ote', 'pastasoss', 'pathloss', 'photom', 'psf', 'regions', 'sflat', 'speckernel', 'specprofile', 'specwcs', 'wavecorr', 'wavelengthrange']
2026-03-27 13:32:51,657 - stpipe.pipeline - INFO - Prefetch for APCORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits'.
2026-03-27 13:32:51,658 - stpipe.pipeline - INFO - Prefetch for AREA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits'.
2026-03-27 13:32:51,659 - stpipe.pipeline - INFO - Prefetch for BARSHADOW reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits'.
2026-03-27 13:32:51,659 - stpipe.pipeline - INFO - Prefetch for BKG reference file is 'N/A'.
2026-03-27 13:32:51,660 - stpipe.pipeline - INFO - Prefetch for CAMERA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf'.
2026-03-27 13:32:51,660 - stpipe.pipeline - INFO - Prefetch for COLLIMATOR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf'.
2026-03-27 13:32:51,661 - stpipe.pipeline - INFO - Prefetch for CUBEPAR reference file is 'N/A'.
2026-03-27 13:32:51,661 - stpipe.pipeline - INFO - Prefetch for DFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0001.fits'.
2026-03-27 13:32:51,662 - stpipe.pipeline - INFO - Prefetch for DISPERSER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf'.
2026-03-27 13:32:51,663 - stpipe.pipeline - INFO - Prefetch for DISTORTION reference file is 'N/A'.
2026-03-27 13:32:51,663 - stpipe.pipeline - INFO - Prefetch for EXTRACT1D reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json'.
2026-03-27 13:32:51,664 - stpipe.pipeline - INFO - Prefetch for FFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits'.
2026-03-27 13:32:51,665 - stpipe.pipeline - INFO - Prefetch for FILTEROFFSET reference file is 'N/A'.
2026-03-27 13:32:51,666 - stpipe.pipeline - INFO - Prefetch for FLAT reference file is 'N/A'.
2026-03-27 13:32:51,666 - stpipe.pipeline - INFO - Prefetch for FORE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf'.
2026-03-27 13:32:51,667 - stpipe.pipeline - INFO - Prefetch for FPA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf'.
2026-03-27 13:32:51,667 - stpipe.pipeline - INFO - Prefetch for FRINGE reference file is 'N/A'.
2026-03-27 13:32:51,668 - stpipe.pipeline - INFO - Prefetch for IFUFORE reference file is 'N/A'.
2026-03-27 13:32:51,669 - stpipe.pipeline - INFO - Prefetch for IFUPOST reference file is 'N/A'.
2026-03-27 13:32:51,670 - stpipe.pipeline - INFO - Prefetch for IFUSLICER reference file is 'N/A'.
2026-03-27 13:32:51,670 - stpipe.pipeline - INFO - Prefetch for MRSXARTCORR reference file is 'N/A'.
2026-03-27 13:32:51,671 - stpipe.pipeline - INFO - Prefetch for MSA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf'.
2026-03-27 13:32:51,672 - stpipe.pipeline - INFO - Prefetch for MSAOPER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json'.
2026-03-27 13:32:51,672 - stpipe.pipeline - INFO - Prefetch for OTE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf'.
2026-03-27 13:32:51,673 - stpipe.pipeline - INFO - Prefetch for PASTASOSS reference file is 'N/A'.
2026-03-27 13:32:51,673 - stpipe.pipeline - INFO - Prefetch for PATHLOSS reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits'.
2026-03-27 13:32:51,674 - stpipe.pipeline - INFO - Prefetch for PHOTOM reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits'.
2026-03-27 13:32:51,675 - stpipe.pipeline - INFO - Prefetch for PSF reference file is 'N/A'.
2026-03-27 13:32:51,676 - stpipe.pipeline - INFO - Prefetch for REGIONS reference file is 'N/A'.
2026-03-27 13:32:51,676 - stpipe.pipeline - INFO - Prefetch for SFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0225.fits'.
2026-03-27 13:32:51,677 - stpipe.pipeline - INFO - Prefetch for SPECKERNEL reference file is 'N/A'.
2026-03-27 13:32:51,678 - stpipe.pipeline - INFO - Prefetch for SPECPROFILE reference file is 'N/A'.
2026-03-27 13:32:51,678 - stpipe.pipeline - INFO - Prefetch for SPECWCS reference file is 'N/A'.
2026-03-27 13:32:51,679 - stpipe.pipeline - INFO - Prefetch for WAVECORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf'.
2026-03-27 13:32:51,679 - stpipe.pipeline - INFO - Prefetch for WAVELENGTHRANGE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf'.
2026-03-27 13:32:51,680 - jwst.pipeline.calwebb_spec2 - INFO - Starting calwebb_spec2 ...
2026-03-27 13:32:51,681 - jwst.pipeline.calwebb_spec2 - INFO - Processing product mast_products/jw01345061001_07101_00003_nrs1
2026-03-27 13:32:51,681 - jwst.pipeline.calwebb_spec2 - INFO - Working on input ./mast_products/jw01345061001_07101_00003_nrs1_rate.fits ...
2026-03-27 13:32:51,864 - stpipe.step - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_rate.fits>,).
2026-03-27 13:32:51,968 - jwst.assign_wcs.nirspec - INFO - Retrieving open MSA slitlets for msa_metadata_id = 83 and dither_index = 3
2026-03-27 13:32:51,977 - jwst.assign_wcs.nirspec - INFO - Slitlet 3 is background only; assigned source_id=3
2026-03-27 13:32:51,978 - jwst.assign_wcs.nirspec - INFO - Slitlet 4 is background only; assigned source_id=4
2026-03-27 13:32:51,979 - jwst.assign_wcs.nirspec - INFO - Slitlet 5 is background only; assigned source_id=5
2026-03-27 13:32:51,987 - jwst.assign_wcs.nirspec - INFO - Slitlet 9 is background only; assigned source_id=9
2026-03-27 13:32:51,989 - jwst.assign_wcs.nirspec - INFO - Slitlet 10 contains virtual source, with source_id=-59
2026-03-27 13:32:51,993 - jwst.assign_wcs.nirspec - INFO - Slitlet 12 is background only; assigned source_id=12
2026-03-27 13:32:51,994 - jwst.assign_wcs.nirspec - INFO - Slitlet 13 is background only; assigned source_id=13
2026-03-27 13:32:51,995 - jwst.assign_wcs.nirspec - INFO - Slitlet 14 is background only; assigned source_id=14
2026-03-27 13:32:51,998 - jwst.assign_wcs.nirspec - INFO - Slitlet 15 contains virtual source, with source_id=-63
2026-03-27 13:32:52,003 - jwst.assign_wcs.nirspec - INFO - Slitlet 18 is background only; assigned source_id=18
2026-03-27 13:32:52,004 - jwst.assign_wcs.nirspec - INFO - Slitlet 19 is background only; assigned source_id=19
2026-03-27 13:32:52,012 - jwst.assign_wcs.nirspec - INFO - Slitlet 23 is background only; assigned source_id=23
2026-03-27 13:32:52,019 - jwst.assign_wcs.nirspec - INFO - Slitlet 27 is background only; assigned source_id=27
2026-03-27 13:32:52,020 - jwst.assign_wcs.nirspec - INFO - Slitlet 28 is background only; assigned source_id=28
2026-03-27 13:32:52,032 - jwst.assign_wcs.nirspec - INFO - Slitlet 34 is background only; assigned source_id=34
2026-03-27 13:32:52,061 - jwst.assign_wcs.nirspec - INFO - Slitlet 48 is background only; assigned source_id=48
2026-03-27 13:32:52,075 - jwst.assign_wcs.nirspec - INFO - Slitlet 55 is background only; assigned source_id=55
2026-03-27 13:32:52,080 - jwst.assign_wcs.nirspec - INFO - Slitlet 57 contains virtual source, with source_id=-72
2026-03-27 13:32:52,091 - jwst.assign_wcs.nirspec - INFO - Slitlet 62 is background only; assigned source_id=62
2026-03-27 13:32:52,096 - jwst.assign_wcs.nirspec - INFO - Slitlet 64 contains virtual source, with source_id=-74
2026-03-27 13:32:52,101 - jwst.assign_wcs.nirspec - INFO - Slitlet 67 is background only; assigned source_id=67
2026-03-27 13:32:52,102 - jwst.assign_wcs.nirspec - INFO - Slitlet 68 is background only; assigned source_id=68
2026-03-27 13:32:52,106 - jwst.assign_wcs.nirspec - INFO - Slitlet 69 contains virtual source, with source_id=-77
2026-03-27 13:32:52,107 - jwst.assign_wcs.nirspec - INFO - Slitlet 70 is background only; assigned source_id=70
2026-03-27 13:32:52,108 - jwst.assign_wcs.nirspec - INFO - Slitlet 71 is background only; assigned source_id=71
2026-03-27 13:32:52,113 - jwst.assign_wcs.nirspec - INFO - Slitlet 74 is background only; assigned source_id=74
2026-03-27 13:32:52,121 - jwst.assign_wcs.nirspec - INFO - Slitlet 78 is background only; assigned source_id=78
2026-03-27 13:32:52,153 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:32:52,154 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:32:52,155 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:32:52,156 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:32:52,355 - jwst.assign_wcs.nirspec - INFO - Removing slit 2 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,372 - jwst.assign_wcs.nirspec - INFO - Removing slit 5 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,389 - jwst.assign_wcs.nirspec - INFO - Removing slit 6 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,406 - jwst.assign_wcs.nirspec - INFO - Removing slit 8 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,423 - jwst.assign_wcs.nirspec - INFO - Removing slit 9 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,439 - jwst.assign_wcs.nirspec - INFO - Removing slit 13 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,455 - jwst.assign_wcs.nirspec - INFO - Removing slit 15 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,472 - jwst.assign_wcs.nirspec - INFO - Removing slit 18 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,488 - jwst.assign_wcs.nirspec - INFO - Removing slit 20 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,504 - jwst.assign_wcs.nirspec - INFO - Removing slit 23 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,520 - jwst.assign_wcs.nirspec - INFO - Removing slit 24 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,536 - jwst.assign_wcs.nirspec - INFO - Removing slit 28 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,643 - jwst.assign_wcs.nirspec - INFO - Removing slit 3 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,659 - jwst.assign_wcs.nirspec - INFO - Removing slit 4 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,676 - jwst.assign_wcs.nirspec - INFO - Removing slit 7 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,692 - jwst.assign_wcs.nirspec - INFO - Removing slit 10 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,708 - jwst.assign_wcs.nirspec - INFO - Removing slit 11 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,724 - jwst.assign_wcs.nirspec - INFO - Removing slit 12 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,740 - jwst.assign_wcs.nirspec - INFO - Removing slit 14 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,756 - jwst.assign_wcs.nirspec - INFO - Removing slit 16 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,772 - jwst.assign_wcs.nirspec - INFO - Removing slit 17 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,788 - jwst.assign_wcs.nirspec - INFO - Removing slit 19 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,804 - jwst.assign_wcs.nirspec - INFO - Removing slit 21 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,820 - jwst.assign_wcs.nirspec - INFO - Removing slit 22 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,836 - jwst.assign_wcs.nirspec - INFO - Removing slit 25 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,852 - jwst.assign_wcs.nirspec - INFO - Removing slit 26 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:52,868 - jwst.assign_wcs.nirspec - INFO - Removing slit 27 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:32:53,587 - jwst.assign_wcs.nirspec - INFO - Slits projected on detector NRS1: ['29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81']
2026-03-27 13:32:53,588 - jwst.assign_wcs.nirspec - INFO - Computing WCS for 53 open slitlets
2026-03-27 13:32:53,614 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:32:53,614 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:32:53,615 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:32:53,616 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:32:53,628 - jwst.assign_wcs.nirspec - INFO - SPORDER= -1, wrange=[2.87e-06, 5.27e-06]
2026-03-27 13:32:53,728 - jwst.assign_wcs.nirspec - INFO - Applied Barycentric velocity correction : 1.000049924895689
2026-03-27 13:32:53,758 - jwst.assign_wcs.nirspec - INFO - There are 6 open slits in quadrant 1
2026-03-27 13:32:53,798 - jwst.assign_wcs.nirspec - INFO - There are 11 open slits in quadrant 2
2026-03-27 13:32:53,884 - jwst.assign_wcs.nirspec - INFO - There are 20 open slits in quadrant 3
2026-03-27 13:32:54,015 - jwst.assign_wcs.nirspec - INFO - There are 16 open slits in quadrant 4
2026-03-27 13:32:54,313 - jwst.assign_wcs.nirspec - INFO - There are 0 open slits in quadrant 5
2026-03-27 13:32:54,468 - jwst.assign_wcs.nirspec - INFO - Created a NIRSPEC nrs_msaspec pipeline with references {'distortion': None, 'filteroffset': None, 'specwcs': None, 'regions': None, 'wavelengthrange': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf', 'camera': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf', 'collimator': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf', 'disperser': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf', 'fore': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf', 'fpa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf', 'msa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf', 'ote': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf', 'ifupost': None, 'ifufore': None, 'ifuslicer': None, 'msametafile': './mast_products/jw01345061001_01_msa.fits'}
2026-03-27 13:32:57,284 - jwst.assign_wcs.assign_wcs - INFO - COMPLETED assign_wcs
2026-03-27 13:32:57,290 - stpipe.step - INFO - Step assign_wcs done
2026-03-27 13:32:57,520 - stpipe.step - INFO - Step badpix_selfcal running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_rate.fits>, [], []).
2026-03-27 13:32:57,521 - stpipe.step - INFO - Step skipped.
2026-03-27 13:32:57,722 - stpipe.step - INFO - Step msa_flagging running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_rate.fits>,).
2026-03-27 13:32:58,621 - jwst.msaflagopen.msaflagopen_step - INFO - Using reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json
2026-03-27 13:32:58,691 - jwst.msaflagopen.msaflag_open - INFO - 24 failed open shutters
2026-03-27 13:33:03,677 - stpipe.step - INFO - Step msa_flagging done
2026-03-27 13:33:04,022 - stpipe.step - INFO - Step nsclean running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_rate.fits>,).
2026-03-27 13:33:04,023 - jwst.nsclean.nsclean_step - WARNING - The 'nsclean' step is a deprecated alias to 'clean_flicker_noise' and will be removed in future builds.
2026-03-27 13:33:04,030 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Input exposure type is NRS_MSASPEC, detector=NRS1
2026-03-27 13:33:05,110 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Cleaning image jw01345061001_07101_00003_nrs1_rate.fits
2026-03-27 13:33:07,367 - jwst.nsclean.nsclean_step - INFO - Saving mask file ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_mask.fits
2026-03-27 13:33:09,045 - stpipe.step - INFO - Saved model in ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_nsclean.fits
2026-03-27 13:33:09,046 - stpipe.step - INFO - Step nsclean done
2026-03-27 13:33:09,384 - stpipe.step - INFO - Step imprint_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_nsclean.fits>, []).
2026-03-27 13:33:09,386 - stpipe.step - INFO - Step skipped.
2026-03-27 13:33:09,654 - stpipe.step - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_nsclean.fits>, []).
2026-03-27 13:33:09,655 - stpipe.step - INFO - Step skipped.
2026-03-27 13:33:09,918 - stpipe.step - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:33:09,925 - jwst.extract_2d.extract_2d - INFO - EXP_TYPE is NRS_MSASPEC
2026-03-27 13:33:09,925 - jwst.extract_2d.nirspec - INFO - Slits selected:
2026-03-27 13:33:09,926 - jwst.extract_2d.nirspec - INFO - Name: 80, source_id: 1509
2026-03-27 13:33:09,991 - jwst.extract_2d.nirspec - INFO - Name of subarray extracted: 80
2026-03-27 13:33:09,992 - jwst.extract_2d.nirspec - INFO - Subarray x-extents are: 423 1777
2026-03-27 13:33:09,993 - jwst.extract_2d.nirspec - INFO - Subarray y-extents are: 262 295
2026-03-27 13:33:10,276 - jwst.extract_2d.nirspec - INFO - set slit_attributes completed
2026-03-27 13:33:10,285 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.817179331 52.830822659 214.816253456 52.830818677 214.816255004 52.830763514 214.817180881 52.830767490
2026-03-27 13:33:10,287 - jwst.extract_2d.nirspec - INFO - Updated S_REGION to POLYGON ICRS 214.817179331 52.830822659 214.816253456 52.830818677 214.816255004 52.830763514 214.817180881 52.830767490
2026-03-27 13:33:10,357 - stpipe.step - INFO - Step extract_2d done
2026-03-27 13:33:10,625 - stpipe.step - INFO - Step srctype running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:33:10,782 - jwst.srctype.srctype - INFO - Input EXP_TYPE is NRS_MSASPEC
2026-03-27 13:33:10,783 - jwst.srctype.srctype - INFO - source_id=1509, stellarity=1.0000, type=POINT
2026-03-27 13:33:10,784 - stpipe.step - INFO - Step srctype done
2026-03-27 13:33:11,234 - stpipe.step - INFO - Step master_background_mos running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:33:11,240 - jwst.master_background.master_background_mos_step - WARNING - No background slits available for creating master background. Skipping
2026-03-27 13:33:11,408 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:33:11,409 - stpipe.step - INFO - Step master_background_mos done
2026-03-27 13:33:11,697 - stpipe.step - INFO - Step wavecorr running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:33:11,876 - jwst.wavecorr.wavecorr_step - INFO - Using WAVECORR reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf
2026-03-27 13:33:11,877 - jwst.wavecorr.wavecorr - INFO - Detected a POINT source type in slit 80
2026-03-27 13:33:11,965 - jwst.wavecorr.wavecorr - INFO - Using wavelength zero-point correction for aperture MOS
2026-03-27 13:33:12,012 - stpipe.step - INFO - Step wavecorr done
2026-03-27 13:33:12,305 - stpipe.step - INFO - Step flat_field running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:33:12,333 - jwst.flatfield.flat_field_step - INFO - No reference found for type FLAT
2026-03-27 13:33:12,498 - jwst.flatfield.flat_field_step - INFO - Using FFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits
2026-03-27 13:33:13,038 - jwst.flatfield.flat_field_step - INFO - Using SFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0225.fits
2026-03-27 13:33:13,200 - jwst.flatfield.flat_field_step - INFO - Using DFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0001.fits
2026-03-27 13:33:13,348 - jwst.flatfield.flat_field - INFO - Working on slit 80
2026-03-27 13:33:13,767 - stpipe.step - INFO - Step flat_field done
2026-03-27 13:33:14,072 - stpipe.step - INFO - Step pathloss running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:33:14,084 - jwst.pathloss.pathloss_step - INFO - Using PATHLOSS reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits
2026-03-27 13:33:14,149 - jwst.pathloss.pathloss - INFO - Input exposure type is NRS_MSASPEC
2026-03-27 13:33:14,303 - jwst.pathloss.pathloss - INFO - Working on slit 0
2026-03-27 13:33:14,304 - jwst.pathloss.pathloss - INFO - Shutter state = 11x, using MOS1x3 entry in ref file
2026-03-27 13:33:14,305 - jwst.pathloss.pathloss - INFO - Shutter above fiducial is closed, using upper region of pathloss array
2026-03-27 13:33:14,377 - stpipe.step - INFO - Step pathloss done
2026-03-27 13:33:14,676 - stpipe.step - INFO - Step barshadow running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:33:14,688 - jwst.barshadow.barshadow_step - INFO - Using BARSHADOW reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits
2026-03-27 13:33:14,877 - jwst.barshadow.bar_shadow - INFO - Working on slitlet 80
2026-03-27 13:33:14,878 - jwst.barshadow.bar_shadow - INFO - Bar shadow correction skipped for slitlet 80 (source not uniform)
2026-03-27 13:33:14,886 - stpipe.step - INFO - Step barshadow done
2026-03-27 13:33:15,193 - stpipe.step - INFO - Step photom running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_nsclean.fits>,).
2026-03-27 13:33:15,212 - jwst.photom.photom_step - INFO - Using photom reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits
2026-03-27 13:33:15,213 - jwst.photom.photom_step - INFO - Using area reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits
2026-03-27 13:33:15,385 - jwst.photom.photom - INFO - Using instrument: NIRSPEC
2026-03-27 13:33:15,386 - jwst.photom.photom - INFO - detector: NRS1
2026-03-27 13:33:15,387 - jwst.photom.photom - INFO - exp_type: NRS_MSASPEC
2026-03-27 13:33:15,388 - jwst.photom.photom - INFO - filter: F290LP
2026-03-27 13:33:15,388 - jwst.photom.photom - INFO - grating: G395M
2026-03-27 13:33:15,437 - jwst.photom.photom - INFO - Working on slit 80
2026-03-27 13:33:15,438 - jwst.photom.photom - INFO - PHOTMJSR value: 1
2026-03-27 13:33:15,468 - stpipe.step - INFO - Step photom done
2026-03-27 13:33:15,938 - stpipe.step - INFO - Step pixel_replace running with args (<MultiSlitModel from ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_cal.fits>,).
2026-03-27 13:33:15,939 - stpipe.step - INFO - Step skipped.
2026-03-27 13:33:16,160 - stpipe.step - INFO - Step resample_spec running with args (<MultiSlitModel from ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_cal.fits>,).
2026-03-27 13:33:16,466 - jwst.exp_to_source.exp_to_source - INFO - Reorganizing data from exposure ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_cal.fits
2026-03-27 13:33:16,881 - jwst.resample.resample_spec - INFO - Specified output pixel scale ratio: 1.0.
2026-03-27 13:33:16,893 - jwst.resample.resample_spec - INFO - Computed output pixel scale: 0.1036 arcsec.
2026-03-27 13:33:16,894 - stcal.resample.resample - INFO - Output pixel scale: 0.10360056695821028 arcsec.
2026-03-27 13:33:16,895 - stcal.resample.resample - INFO - Driz parameter kernel: square
2026-03-27 13:33:16,896 - stcal.resample.resample - INFO - Driz parameter pixfrac: 1.0
2026-03-27 13:33:16,897 - stcal.resample.resample - INFO - Driz parameter fillval: NaN
2026-03-27 13:33:16,898 - stcal.resample.resample - INFO - Driz parameter weight_type: exptime
2026-03-27 13:33:16,899 - jwst.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:33:16,955 - stcal.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:33:16,960 - stcal.resample.resample - INFO - Drizzling (33, 1354) --> (21, 1354)
2026-03-27 13:33:16,964 - stcal.resample.resample - INFO - Drizzling (33, 1354) --> (21, 1354)
2026-03-27 13:33:16,968 - stcal.resample.resample - INFO - Drizzling (33, 1354) --> (21, 1354)
2026-03-27 13:33:17,112 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.816217049 52.830790936 214.817169667 52.830790936 214.817169667 52.830795030 214.816217049 52.830795030
2026-03-27 13:33:17,267 - stpipe.step - INFO - Saved model in ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_s2d.fits
2026-03-27 13:33:17,268 - stpipe.step - INFO - Step resample_spec done
2026-03-27 13:33:17,358 - jwst.pipeline.calwebb_spec2 - INFO - Extracting 1 MSA slitlets
2026-03-27 13:33:17,605 - stpipe.step - INFO - Step extract_1d running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs1_s2d.fits>,).
2026-03-27 13:33:17,768 - jwst.extract_1d.extract_1d_step - INFO - Using EXTRACT1D reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json
2026-03-27 13:33:17,775 - jwst.extract_1d.extract_1d_step - INFO - Using APCORR file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits
2026-03-27 13:33:17,819 - jwst.extract_1d.extract - INFO - Working on slit 80
2026-03-27 13:33:17,820 - jwst.lib.pipe_utils - WARNING - Mismatched data shapes; skipping invalid data updates for extension 'dq'
2026-03-27 13:33:17,821 - jwst.extract_1d.extract - INFO - Turning on source position correction for exp_type = NRS_MSASPEC
2026-03-27 13:33:17,824 - jwst.extract_1d.source_location - INFO - Using source_xpos and source_ypos to center extraction.
2026-03-27 13:33:17,828 - jwst.extract_1d.extract - INFO - Computed source location is 4.78, at pixel 676, wavelength 4.07
2026-03-27 13:33:17,830 - jwst.extract_1d.extract - INFO - Nominal aperture start/stop: 7.50 -> 12.50 (inclusive)
2026-03-27 13:33:17,831 - jwst.extract_1d.extract - INFO - Nominal location is 10.00, so offset is -5.22 pixels
2026-03-27 13:33:17,832 - jwst.extract_1d.extract - INFO - Mean aperture start/stop from trace: 2.28 -> 7.28 (inclusive)
2026-03-27 13:33:17,835 - jwst.extract_1d.extract - INFO - Creating aperture correction.
2026-03-27 13:33:18,869 - stpipe.step - INFO - Step extract_1d done
2026-03-27 13:33:18,938 - stpipe.step - INFO - Saved model in ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_x1d.fits
2026-03-27 13:33:18,940 - jwst.pipeline.calwebb_spec2 - INFO - Finished processing product mast_products/jw01345061001_07101_00003_nrs1
2026-03-27 13:33:18,941 - jwst.pipeline.calwebb_spec2 - INFO - Ending calwebb_spec2
2026-03-27 13:33:18,941 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:33:19,196 - stpipe.step - INFO - Saved model in ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs1_cal.fits
2026-03-27 13:33:19,196 - stpipe.step - INFO - Step Spec2Pipeline done
2026-03-27 13:33:19,197 - jwst.stpipe.core - INFO - Results used jwst version: 1.20.2
2026-03-27 13:33:19,228 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
2026-03-27 13:33:19,246 - stpipe.step - INFO - PARS-RESAMPLESPECSTEP parameters found: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pars-resamplespecstep_0001.asdf
2026-03-27 13:33:19,269 - stpipe.step - INFO - Spec2Pipeline instance created.
2026-03-27 13:33:19,270 - stpipe.step - INFO - AssignWcsStep instance created.
2026-03-27 13:33:19,271 - stpipe.step - INFO - BadpixSelfcalStep instance created.
2026-03-27 13:33:19,272 - stpipe.step - INFO - MSAFlagOpenStep instance created.
2026-03-27 13:33:19,273 - stpipe.step - INFO - NSCleanStep instance created.
2026-03-27 13:33:19,274 - stpipe.step - INFO - BackgroundStep instance created.
2026-03-27 13:33:19,276 - stpipe.step - INFO - ImprintStep instance created.
2026-03-27 13:33:19,277 - stpipe.step - INFO - Extract2dStep instance created.
2026-03-27 13:33:19,281 - stpipe.step - INFO - MasterBackgroundMosStep instance created.
2026-03-27 13:33:19,282 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:33:19,283 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:33:19,284 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:33:19,285 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:33:19,286 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:33:19,287 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:33:19,289 - stpipe.step - INFO - Extract1dStep instance created.
2026-03-27 13:33:19,290 - stpipe.step - INFO - WavecorrStep instance created.
2026-03-27 13:33:19,291 - stpipe.step - INFO - FlatFieldStep instance created.
2026-03-27 13:33:19,291 - stpipe.step - INFO - SourceTypeStep instance created.
2026-03-27 13:33:19,292 - stpipe.step - INFO - StraylightStep instance created.
2026-03-27 13:33:19,294 - stpipe.step - INFO - FringeStep instance created.
2026-03-27 13:33:19,295 - stpipe.step - INFO - ResidualFringeStep instance created.
2026-03-27 13:33:19,296 - stpipe.step - INFO - PathLossStep instance created.
2026-03-27 13:33:19,297 - stpipe.step - INFO - BarShadowStep instance created.
2026-03-27 13:33:19,298 - stpipe.step - INFO - WfssContamStep instance created.
2026-03-27 13:33:19,298 - stpipe.step - INFO - PhotomStep instance created.
2026-03-27 13:33:19,299 - stpipe.step - INFO - PixelReplaceStep instance created.
2026-03-27 13:33:19,300 - stpipe.step - INFO - ResampleSpecStep instance created.
2026-03-27 13:33:19,302 - stpipe.step - INFO - CubeBuildStep instance created.
2026-03-27 13:33:19,303 - stpipe.step - INFO - Extract1dStep instance created.
Saved jw01345061001_07101_00003_nrs1_mask.fits
Saved jw01345061001_07101_00003_nrs1_nsclean.fits
Saved jw01345061001_07101_00003_nrs1_cal.fits
Saved jw01345061001_07101_00003_nrs1_x1d.fits
Processing jw01345061001_07101_00003_nrs2_rate.fits...
2026-03-27 13:33:19,575 - stpipe.step - INFO - Step Spec2Pipeline running with args ('./mast_products/jw01345061001_07101_00003_nrs2_rate.fits',).
2026-03-27 13:33:19,609 - stpipe.step - INFO - Step Spec2Pipeline parameters are:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: ./stage2_nsclean_modified/
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_bsub: False
fail_on_exception: True
save_wfss_esec: False
steps:
assign_wcs:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sip_approx: True
sip_max_pix_error: 0.01
sip_degree: None
sip_max_inv_pix_error: 0.01
sip_inv_degree: None
sip_npoints: 12
slit_y_low: -0.55
slit_y_high: 0.55
nrs_ifu_slice_wcs: False
badpix_selfcal:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
flagfrac_lower: 0.001
flagfrac_upper: 0.001
kernel_size: 15
force_single: False
save_flagged_bkg: False
msa_flagging:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
nsclean:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: True
skip: False
suffix: None
search_output_file: True
input_dir: ''
fit_method: fft
fit_by_channel: False
background_method: None
background_box_size: None
mask_spectral_regions: True
n_sigma: 5.0
fit_histogram: False
single_mask: False
user_mask: ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_mask_modified.fits
save_mask: True
save_background: False
save_noise: False
bkg_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
bkg_list: None
save_combined_background: False
sigma: 3.0
maxiters: None
soss_source_percentile: 35.0
soss_bkg_percentile: None
wfss_mmag_extract: None
wfss_maxiter: 5
wfss_rms_stop: 0.0
wfss_outlier_percent: 1.0
imprint_subtract:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
extract_2d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
slit_names:
- '11'
source_ids: None
extract_orders: None
grism_objects: None
tsgrism_extract_height: None
wfss_extract_half_height: 5
wfss_mmag_extract: None
wfss_nbright: 1000
master_background_mos:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
sigma_clip: 3.0
median_kernel: 1
force_subtract: False
save_background: False
user_background: None
inverse: False
steps:
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
wavecorr:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
flat_field:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
save_interpolated_flat: False
user_supplied_flat: None
inverse: False
srctype:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
source_type: None
straylight:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
clean_showers: False
shower_plane: 3
shower_x_stddev: 18.0
shower_y_stddev: 5.0
shower_low_reject: 0.1
shower_high_reject: 99.9
save_shower_model: False
fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
residual_fringe:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: residual_fringe
search_output_file: False
input_dir: ''
save_intermediate_results: False
ignore_region_min: None
ignore_region_max: None
pathloss:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
user_slit_loc: None
barshadow:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
wfss_contam:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
save_simulated_image: False
save_contam_images: False
maximum_cores: none
orders: None
magnitude_limit: None
wl_oversample: 2
max_pixels_per_chunk: 50000
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
inverse: False
source_type: None
apply_time_correction: True
pixel_replace:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
algorithm: fit_profile
n_adjacent_cols: 3
resample_spec:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
pixfrac: 1.0
kernel: square
fillval: NaN
weight_type: exptime
output_shape: None
pixel_scale_ratio: 1.0
pixel_scale: None
output_wcs: ''
single: False
blendheaders: True
in_memory: True
cube_build:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: s3d
search_output_file: False
input_dir: ''
pipeline: 3
channel: all
band: all
grating: all
filter: all
output_type: None
scalexy: 0.0
scalew: 0.0
weighting: drizzle
coord_system: skyalign
ra_center: None
dec_center: None
cube_pa: None
nspax_x: None
nspax_y: None
rois: 0.0
roiw: 0.0
weight_power: 2.0
wavemin: None
wavemax: None
single: False
skip_dqflagging: False
offset_file: None
debug_spaxel: -1 -1 -1
extract_1d:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .fits
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
subtract_background: None
apply_apcorr: True
extraction_type: box
use_source_posn: None
position_offset: 0.0
model_nod_pair: True
optimize_psf_location: True
smoothing_length: None
bkg_fit: None
bkg_order: None
log_increment: 50
save_profile: False
save_scene_model: False
save_residual_image: False
center_xy: None
ifu_autocen: False
bkg_sigma_clip: 3.0
ifu_rfcorr: True
ifu_set_srctype: None
ifu_rscale: None
ifu_covar_scale: 1.0
soss_atoca: True
soss_threshold: 0.01
soss_n_os: 2
soss_wave_grid_in: None
soss_wave_grid_out: None
soss_estimate: None
soss_rtol: 0.0001
soss_max_grid_size: 20000
soss_tikfac: None
soss_width: 40.0
soss_bad_pix: masking
soss_modelname: None
soss_order_3: True
2026-03-27 13:33:19,641 - stpipe.pipeline - INFO - Prefetching reference files for dataset: 'jw01345061001_07101_00003_nrs2_rate.fits' reftypes = ['apcorr', 'area', 'barshadow', 'bkg', 'camera', 'collimator', 'cubepar', 'dflat', 'disperser', 'distortion', 'extract1d', 'fflat', 'filteroffset', 'flat', 'fore', 'fpa', 'fringe', 'ifufore', 'ifupost', 'ifuslicer', 'mrsxartcorr', 'msa', 'msaoper', 'ote', 'pastasoss', 'pathloss', 'photom', 'psf', 'regions', 'sflat', 'speckernel', 'specprofile', 'specwcs', 'wavecorr', 'wavelengthrange']
2026-03-27 13:33:19,647 - stpipe.pipeline - INFO - Prefetch for APCORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits'.
2026-03-27 13:33:19,647 - stpipe.pipeline - INFO - Prefetch for AREA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits'.
2026-03-27 13:33:19,648 - stpipe.pipeline - INFO - Prefetch for BARSHADOW reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits'.
2026-03-27 13:33:19,649 - stpipe.pipeline - INFO - Prefetch for BKG reference file is 'N/A'.
2026-03-27 13:33:19,649 - stpipe.pipeline - INFO - Prefetch for CAMERA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf'.
2026-03-27 13:33:19,650 - stpipe.pipeline - INFO - Prefetch for COLLIMATOR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf'.
2026-03-27 13:33:19,651 - stpipe.pipeline - INFO - Prefetch for CUBEPAR reference file is 'N/A'.
2026-03-27 13:33:19,651 - stpipe.pipeline - INFO - Prefetch for DFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0002.fits'.
2026-03-27 13:33:19,652 - stpipe.pipeline - INFO - Prefetch for DISPERSER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf'.
2026-03-27 13:33:19,653 - stpipe.pipeline - INFO - Prefetch for DISTORTION reference file is 'N/A'.
2026-03-27 13:33:19,653 - stpipe.pipeline - INFO - Prefetch for EXTRACT1D reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json'.
2026-03-27 13:33:19,654 - stpipe.pipeline - INFO - Prefetch for FFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits'.
2026-03-27 13:33:19,655 - stpipe.pipeline - INFO - Prefetch for FILTEROFFSET reference file is 'N/A'.
2026-03-27 13:33:19,655 - stpipe.pipeline - INFO - Prefetch for FLAT reference file is 'N/A'.
2026-03-27 13:33:19,655 - stpipe.pipeline - INFO - Prefetch for FORE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf'.
2026-03-27 13:33:19,656 - stpipe.pipeline - INFO - Prefetch for FPA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf'.
2026-03-27 13:33:19,657 - stpipe.pipeline - INFO - Prefetch for FRINGE reference file is 'N/A'.
2026-03-27 13:33:19,657 - stpipe.pipeline - INFO - Prefetch for IFUFORE reference file is 'N/A'.
2026-03-27 13:33:19,658 - stpipe.pipeline - INFO - Prefetch for IFUPOST reference file is 'N/A'.
2026-03-27 13:33:19,659 - stpipe.pipeline - INFO - Prefetch for IFUSLICER reference file is 'N/A'.
2026-03-27 13:33:19,659 - stpipe.pipeline - INFO - Prefetch for MRSXARTCORR reference file is 'N/A'.
2026-03-27 13:33:19,660 - stpipe.pipeline - INFO - Prefetch for MSA reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf'.
2026-03-27 13:33:19,660 - stpipe.pipeline - INFO - Prefetch for MSAOPER reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json'.
2026-03-27 13:33:19,661 - stpipe.pipeline - INFO - Prefetch for OTE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf'.
2026-03-27 13:33:19,661 - stpipe.pipeline - INFO - Prefetch for PASTASOSS reference file is 'N/A'.
2026-03-27 13:33:19,663 - stpipe.pipeline - INFO - Prefetch for PATHLOSS reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits'.
2026-03-27 13:33:19,663 - stpipe.pipeline - INFO - Prefetch for PHOTOM reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits'.
2026-03-27 13:33:19,664 - stpipe.pipeline - INFO - Prefetch for PSF reference file is 'N/A'.
2026-03-27 13:33:19,664 - stpipe.pipeline - INFO - Prefetch for REGIONS reference file is 'N/A'.
2026-03-27 13:33:19,665 - stpipe.pipeline - INFO - Prefetch for SFLAT reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0232.fits'.
2026-03-27 13:33:19,666 - stpipe.pipeline - INFO - Prefetch for SPECKERNEL reference file is 'N/A'.
2026-03-27 13:33:19,666 - stpipe.pipeline - INFO - Prefetch for SPECPROFILE reference file is 'N/A'.
2026-03-27 13:33:19,667 - stpipe.pipeline - INFO - Prefetch for SPECWCS reference file is 'N/A'.
2026-03-27 13:33:19,668 - stpipe.pipeline - INFO - Prefetch for WAVECORR reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf'.
2026-03-27 13:33:19,668 - stpipe.pipeline - INFO - Prefetch for WAVELENGTHRANGE reference file is '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf'.
2026-03-27 13:33:19,669 - jwst.pipeline.calwebb_spec2 - INFO - Starting calwebb_spec2 ...
2026-03-27 13:33:19,669 - jwst.pipeline.calwebb_spec2 - INFO - Processing product mast_products/jw01345061001_07101_00003_nrs2
2026-03-27 13:33:19,670 - jwst.pipeline.calwebb_spec2 - INFO - Working on input ./mast_products/jw01345061001_07101_00003_nrs2_rate.fits ...
2026-03-27 13:33:19,853 - stpipe.step - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>,).
2026-03-27 13:33:19,952 - jwst.assign_wcs.nirspec - INFO - Retrieving open MSA slitlets for msa_metadata_id = 83 and dither_index = 3
2026-03-27 13:33:19,961 - jwst.assign_wcs.nirspec - INFO - Slitlet 3 is background only; assigned source_id=3
2026-03-27 13:33:19,962 - jwst.assign_wcs.nirspec - INFO - Slitlet 4 is background only; assigned source_id=4
2026-03-27 13:33:19,963 - jwst.assign_wcs.nirspec - INFO - Slitlet 5 is background only; assigned source_id=5
2026-03-27 13:33:19,971 - jwst.assign_wcs.nirspec - INFO - Slitlet 9 is background only; assigned source_id=9
2026-03-27 13:33:19,974 - jwst.assign_wcs.nirspec - INFO - Slitlet 10 contains virtual source, with source_id=-59
2026-03-27 13:33:19,977 - jwst.assign_wcs.nirspec - INFO - Slitlet 12 is background only; assigned source_id=12
2026-03-27 13:33:19,978 - jwst.assign_wcs.nirspec - INFO - Slitlet 13 is background only; assigned source_id=13
2026-03-27 13:33:19,979 - jwst.assign_wcs.nirspec - INFO - Slitlet 14 is background only; assigned source_id=14
2026-03-27 13:33:19,981 - jwst.assign_wcs.nirspec - INFO - Slitlet 15 contains virtual source, with source_id=-63
2026-03-27 13:33:19,987 - jwst.assign_wcs.nirspec - INFO - Slitlet 18 is background only; assigned source_id=18
2026-03-27 13:33:19,987 - jwst.assign_wcs.nirspec - INFO - Slitlet 19 is background only; assigned source_id=19
2026-03-27 13:33:19,995 - jwst.assign_wcs.nirspec - INFO - Slitlet 23 is background only; assigned source_id=23
2026-03-27 13:33:20,003 - jwst.assign_wcs.nirspec - INFO - Slitlet 27 is background only; assigned source_id=27
2026-03-27 13:33:20,004 - jwst.assign_wcs.nirspec - INFO - Slitlet 28 is background only; assigned source_id=28
2026-03-27 13:33:20,016 - jwst.assign_wcs.nirspec - INFO - Slitlet 34 is background only; assigned source_id=34
2026-03-27 13:33:20,044 - jwst.assign_wcs.nirspec - INFO - Slitlet 48 is background only; assigned source_id=48
2026-03-27 13:33:20,058 - jwst.assign_wcs.nirspec - INFO - Slitlet 55 is background only; assigned source_id=55
2026-03-27 13:33:20,063 - jwst.assign_wcs.nirspec - INFO - Slitlet 57 contains virtual source, with source_id=-72
2026-03-27 13:33:20,073 - jwst.assign_wcs.nirspec - INFO - Slitlet 62 is background only; assigned source_id=62
2026-03-27 13:33:20,078 - jwst.assign_wcs.nirspec - INFO - Slitlet 64 contains virtual source, with source_id=-74
2026-03-27 13:33:20,083 - jwst.assign_wcs.nirspec - INFO - Slitlet 67 is background only; assigned source_id=67
2026-03-27 13:33:20,084 - jwst.assign_wcs.nirspec - INFO - Slitlet 68 is background only; assigned source_id=68
2026-03-27 13:33:20,087 - jwst.assign_wcs.nirspec - INFO - Slitlet 69 contains virtual source, with source_id=-77
2026-03-27 13:33:20,088 - jwst.assign_wcs.nirspec - INFO - Slitlet 70 is background only; assigned source_id=70
2026-03-27 13:33:20,089 - jwst.assign_wcs.nirspec - INFO - Slitlet 71 is background only; assigned source_id=71
2026-03-27 13:33:20,094 - jwst.assign_wcs.nirspec - INFO - Slitlet 74 is background only; assigned source_id=74
2026-03-27 13:33:20,102 - jwst.assign_wcs.nirspec - INFO - Slitlet 78 is background only; assigned source_id=78
2026-03-27 13:33:20,135 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:33:20,135 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:33:20,136 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:33:20,137 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:33:21,159 - jwst.assign_wcs.nirspec - INFO - Removing slit 58 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,176 - jwst.assign_wcs.nirspec - INFO - Removing slit 59 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,193 - jwst.assign_wcs.nirspec - INFO - Removing slit 60 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,210 - jwst.assign_wcs.nirspec - INFO - Removing slit 61 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,227 - jwst.assign_wcs.nirspec - INFO - Removing slit 62 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,244 - jwst.assign_wcs.nirspec - INFO - Removing slit 65 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,261 - jwst.assign_wcs.nirspec - INFO - Removing slit 66 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,278 - jwst.assign_wcs.nirspec - INFO - Removing slit 68 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,294 - jwst.assign_wcs.nirspec - INFO - Removing slit 69 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,311 - jwst.assign_wcs.nirspec - INFO - Removing slit 70 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,328 - jwst.assign_wcs.nirspec - INFO - Removing slit 76 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,346 - jwst.assign_wcs.nirspec - INFO - Removing slit 78 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,410 - jwst.assign_wcs.nirspec - INFO - Removing slit 57 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,427 - jwst.assign_wcs.nirspec - INFO - Removing slit 63 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,444 - jwst.assign_wcs.nirspec - INFO - Removing slit 64 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,461 - jwst.assign_wcs.nirspec - INFO - Removing slit 67 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,478 - jwst.assign_wcs.nirspec - INFO - Removing slit 71 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,495 - jwst.assign_wcs.nirspec - INFO - Removing slit 72 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,511 - jwst.assign_wcs.nirspec - INFO - Removing slit 73 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,528 - jwst.assign_wcs.nirspec - INFO - Removing slit 74 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,546 - jwst.assign_wcs.nirspec - INFO - Removing slit 75 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,562 - jwst.assign_wcs.nirspec - INFO - Removing slit 77 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,579 - jwst.assign_wcs.nirspec - INFO - Removing slit 79 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,596 - jwst.assign_wcs.nirspec - INFO - Removing slit 80 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,614 - jwst.assign_wcs.nirspec - INFO - Removing slit 81 from the list of open slits because the WCS bounding_box is completely outside the detector.
2026-03-27 13:33:21,615 - jwst.assign_wcs.nirspec - INFO - Slits projected on detector NRS2: ['2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56']
2026-03-27 13:33:21,616 - jwst.assign_wcs.nirspec - INFO - Computing WCS for 55 open slitlets
2026-03-27 13:33:21,641 - jwst.assign_wcs.nirspec - INFO - gwa_ytilt is 0.177384809 deg
2026-03-27 13:33:21,641 - jwst.assign_wcs.nirspec - INFO - gwa_xtilt is 0.278486848 deg
2026-03-27 13:33:21,642 - jwst.assign_wcs.nirspec - INFO - theta_y correction: 0.0057073669713260085 deg
2026-03-27 13:33:21,643 - jwst.assign_wcs.nirspec - INFO - theta_x correction: 7.258633810078802e-05 deg
2026-03-27 13:33:21,654 - jwst.assign_wcs.nirspec - INFO - SPORDER= -1, wrange=[2.87e-06, 5.27e-06]
2026-03-27 13:33:21,755 - jwst.assign_wcs.nirspec - INFO - Applied Barycentric velocity correction : 1.000049924895689
2026-03-27 13:33:21,784 - jwst.assign_wcs.nirspec - INFO - There are 18 open slits in quadrant 1
2026-03-27 13:33:21,906 - jwst.assign_wcs.nirspec - INFO - There are 26 open slits in quadrant 2
2026-03-27 13:33:22,277 - jwst.assign_wcs.nirspec - INFO - There are 8 open slits in quadrant 3
2026-03-27 13:33:22,329 - jwst.assign_wcs.nirspec - INFO - There are 3 open slits in quadrant 4
2026-03-27 13:33:22,349 - jwst.assign_wcs.nirspec - INFO - There are 0 open slits in quadrant 5
2026-03-27 13:33:22,504 - jwst.assign_wcs.nirspec - INFO - Created a NIRSPEC nrs_msaspec pipeline with references {'distortion': None, 'filteroffset': None, 'specwcs': None, 'regions': None, 'wavelengthrange': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavelengthrange_0006.asdf', 'camera': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_camera_0008.asdf', 'collimator': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_collimator_0008.asdf', 'disperser': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_disperser_0068.asdf', 'fore': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fore_0051.asdf', 'fpa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fpa_0009.asdf', 'msa': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msa_0009.asdf', 'ote': '/home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_ote_0011.asdf', 'ifupost': None, 'ifufore': None, 'ifuslicer': None, 'msametafile': './mast_products/jw01345061001_01_msa.fits'}
2026-03-27 13:33:25,476 - jwst.assign_wcs.assign_wcs - INFO - COMPLETED assign_wcs
2026-03-27 13:33:25,484 - stpipe.step - INFO - Step assign_wcs done
2026-03-27 13:33:25,722 - stpipe.step - INFO - Step badpix_selfcal running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>, [], []).
2026-03-27 13:33:25,723 - stpipe.step - INFO - Step skipped.
2026-03-27 13:33:25,921 - stpipe.step - INFO - Step msa_flagging running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>,).
2026-03-27 13:33:26,845 - jwst.msaflagopen.msaflagopen_step - INFO - Using reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_msaoper_0006.json
2026-03-27 13:33:27,203 - jwst.msaflagopen.msaflag_open - INFO - 24 failed open shutters
2026-03-27 13:33:31,912 - stpipe.step - INFO - Step msa_flagging done
2026-03-27 13:33:32,266 - stpipe.step - INFO - Step nsclean running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_rate.fits>,).
2026-03-27 13:33:32,268 - jwst.nsclean.nsclean_step - WARNING - The 'nsclean' step is a deprecated alias to 'clean_flicker_noise' and will be removed in future builds.
2026-03-27 13:33:32,273 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Input exposure type is NRS_MSASPEC, detector=NRS2
2026-03-27 13:33:33,399 - jwst.clean_flicker_noise.clean_flicker_noise - INFO - Cleaning image jw01345061001_07101_00003_nrs2_rate.fits
2026-03-27 13:33:35,488 - jwst.nsclean.nsclean_step - INFO - Saving mask file ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_mask.fits
2026-03-27 13:33:37,242 - stpipe.step - INFO - Saved model in ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_nsclean.fits
2026-03-27 13:33:37,243 - stpipe.step - INFO - Step nsclean done
2026-03-27 13:33:37,595 - stpipe.step - INFO - Step imprint_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_nsclean.fits>, []).
2026-03-27 13:33:37,597 - stpipe.step - INFO - Step skipped.
2026-03-27 13:33:37,876 - stpipe.step - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_nsclean.fits>, []).
2026-03-27 13:33:37,877 - stpipe.step - INFO - Step skipped.
2026-03-27 13:33:38,159 - stpipe.step - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:33:38,165 - jwst.extract_2d.extract_2d - INFO - EXP_TYPE is NRS_MSASPEC
2026-03-27 13:33:38,166 - jwst.extract_2d.nirspec - INFO - Slits selected:
2026-03-27 13:33:38,167 - jwst.extract_2d.nirspec - INFO - Name: 11, source_id: 386
2026-03-27 13:33:38,233 - jwst.extract_2d.nirspec - INFO - Name of subarray extracted: 11
2026-03-27 13:33:38,234 - jwst.extract_2d.nirspec - INFO - Subarray x-extents are: 141 1507
2026-03-27 13:33:38,234 - jwst.extract_2d.nirspec - INFO - Subarray y-extents are: 616 648
2026-03-27 13:33:38,520 - jwst.extract_2d.nirspec - INFO - set slit_attributes completed
2026-03-27 13:33:38,529 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.832940199 52.885103324 214.832013460 52.885093088 214.832014161 52.885038573 214.832940897 52.885048802
2026-03-27 13:33:38,531 - jwst.extract_2d.nirspec - INFO - Updated S_REGION to POLYGON ICRS 214.832940199 52.885103324 214.832013460 52.885093088 214.832014161 52.885038573 214.832940897 52.885048802
2026-03-27 13:33:38,605 - stpipe.step - INFO - Step extract_2d done
2026-03-27 13:33:38,901 - stpipe.step - INFO - Step srctype running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:33:39,064 - jwst.srctype.srctype - INFO - Input EXP_TYPE is NRS_MSASPEC
2026-03-27 13:33:39,065 - jwst.srctype.srctype - INFO - source_id=386, stellarity=1.0000, type=POINT
2026-03-27 13:33:39,067 - stpipe.step - INFO - Step srctype done
2026-03-27 13:33:39,534 - stpipe.step - INFO - Step master_background_mos running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:33:39,540 - jwst.master_background.master_background_mos_step - WARNING - No background slits available for creating master background. Skipping
2026-03-27 13:33:39,708 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:33:39,709 - stpipe.step - INFO - Step master_background_mos done
2026-03-27 13:33:40,002 - stpipe.step - INFO - Step wavecorr running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:33:40,187 - jwst.wavecorr.wavecorr_step - INFO - Using WAVECORR reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_wavecorr_0004.asdf
2026-03-27 13:33:40,188 - jwst.wavecorr.wavecorr - INFO - Detected a POINT source type in slit 11
2026-03-27 13:33:40,279 - jwst.wavecorr.wavecorr - INFO - Using wavelength zero-point correction for aperture MOS
2026-03-27 13:33:40,325 - stpipe.step - INFO - Step wavecorr done
2026-03-27 13:33:40,638 - stpipe.step - INFO - Step flat_field running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:33:40,664 - jwst.flatfield.flat_field_step - INFO - No reference found for type FLAT
2026-03-27 13:33:40,828 - jwst.flatfield.flat_field_step - INFO - Using FFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_fflat_0167.fits
2026-03-27 13:33:41,399 - jwst.flatfield.flat_field_step - INFO - Using SFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_sflat_0232.fits
2026-03-27 13:33:41,576 - jwst.flatfield.flat_field_step - INFO - Using DFLAT reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_dflat_0002.fits
2026-03-27 13:33:41,728 - jwst.flatfield.flat_field - INFO - Working on slit 11
2026-03-27 13:33:42,161 - stpipe.step - INFO - Step flat_field done
2026-03-27 13:33:42,485 - stpipe.step - INFO - Step pathloss running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:33:42,496 - jwst.pathloss.pathloss_step - INFO - Using PATHLOSS reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_pathloss_0010.fits
2026-03-27 13:33:42,562 - jwst.pathloss.pathloss - INFO - Input exposure type is NRS_MSASPEC
2026-03-27 13:33:42,723 - jwst.pathloss.pathloss - INFO - Working on slit 0
2026-03-27 13:33:42,724 - jwst.pathloss.pathloss - INFO - Shutter state = 11x, using MOS1x3 entry in ref file
2026-03-27 13:33:42,725 - jwst.pathloss.pathloss - INFO - Shutter above fiducial is closed, using upper region of pathloss array
2026-03-27 13:33:42,798 - stpipe.step - INFO - Step pathloss done
2026-03-27 13:33:43,118 - stpipe.step - INFO - Step barshadow running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:33:43,130 - jwst.barshadow.barshadow_step - INFO - Using BARSHADOW reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_barshadow_0008.fits
2026-03-27 13:33:43,322 - jwst.barshadow.bar_shadow - INFO - Working on slitlet 11
2026-03-27 13:33:43,322 - jwst.barshadow.bar_shadow - INFO - Bar shadow correction skipped for slitlet 11 (source not uniform)
2026-03-27 13:33:43,330 - stpipe.step - INFO - Step barshadow done
2026-03-27 13:33:43,654 - stpipe.step - INFO - Step photom running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_nsclean.fits>,).
2026-03-27 13:33:43,670 - jwst.photom.photom_step - INFO - Using photom reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_photom_0015.fits
2026-03-27 13:33:43,671 - jwst.photom.photom_step - INFO - Using area reference file: /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_area_0051.fits
2026-03-27 13:33:43,848 - jwst.photom.photom - INFO - Using instrument: NIRSPEC
2026-03-27 13:33:43,849 - jwst.photom.photom - INFO - detector: NRS2
2026-03-27 13:33:43,850 - jwst.photom.photom - INFO - exp_type: NRS_MSASPEC
2026-03-27 13:33:43,851 - jwst.photom.photom - INFO - filter: F290LP
2026-03-27 13:33:43,851 - jwst.photom.photom - INFO - grating: G395M
2026-03-27 13:33:43,900 - jwst.photom.photom - INFO - Working on slit 11
2026-03-27 13:33:43,901 - jwst.photom.photom - INFO - PHOTMJSR value: 1
2026-03-27 13:33:43,931 - stpipe.step - INFO - Step photom done
2026-03-27 13:33:44,429 - stpipe.step - INFO - Step pixel_replace running with args (<MultiSlitModel from ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_cal.fits>,).
2026-03-27 13:33:44,430 - stpipe.step - INFO - Step skipped.
2026-03-27 13:33:44,675 - stpipe.step - INFO - Step resample_spec running with args (<MultiSlitModel from ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_cal.fits>,).
2026-03-27 13:33:44,994 - jwst.exp_to_source.exp_to_source - INFO - Reorganizing data from exposure ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_cal.fits
2026-03-27 13:33:45,424 - jwst.resample.resample_spec - INFO - Specified output pixel scale ratio: 1.0.
2026-03-27 13:33:45,434 - jwst.resample.resample_spec - INFO - Computed output pixel scale: 0.10447 arcsec.
2026-03-27 13:33:45,435 - stcal.resample.resample - INFO - Output pixel scale: 0.10447274011512764 arcsec.
2026-03-27 13:33:45,436 - stcal.resample.resample - INFO - Driz parameter kernel: square
2026-03-27 13:33:45,436 - stcal.resample.resample - INFO - Driz parameter pixfrac: 1.0
2026-03-27 13:33:45,437 - stcal.resample.resample - INFO - Driz parameter fillval: NaN
2026-03-27 13:33:45,438 - stcal.resample.resample - INFO - Driz parameter weight_type: exptime
2026-03-27 13:33:45,439 - jwst.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:33:45,498 - stcal.resample.resample - INFO - Resampling science and variance data
2026-03-27 13:33:45,502 - stcal.resample.resample - INFO - Drizzling (32, 1366) --> (21, 1366)
2026-03-27 13:33:45,507 - stcal.resample.resample - INFO - Drizzling (32, 1366) --> (21, 1366)
2026-03-27 13:33:45,511 - stcal.resample.resample - INFO - Drizzling (32, 1366) --> (21, 1366)
2026-03-27 13:33:45,656 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 214.831972292 52.885065372 214.832933995 52.885065372 214.832933995 52.885075990 214.831972292 52.885075990
2026-03-27 13:33:45,812 - stpipe.step - INFO - Saved model in ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_s2d.fits
2026-03-27 13:33:45,813 - stpipe.step - INFO - Step resample_spec done
2026-03-27 13:33:45,905 - jwst.pipeline.calwebb_spec2 - INFO - Extracting 1 MSA slitlets
2026-03-27 13:33:46,173 - stpipe.step - INFO - Step extract_1d running with args (<MultiSlitModel from jw01345061001_07101_00003_nrs2_s2d.fits>,).
2026-03-27 13:33:46,337 - jwst.extract_1d.extract_1d_step - INFO - Using EXTRACT1D reference file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_extract1d_0009.json
2026-03-27 13:33:46,344 - jwst.extract_1d.extract_1d_step - INFO - Using APCORR file /home/runner/crds_cache/references/jwst/nirspec/jwst_nirspec_apcorr_0004.fits
2026-03-27 13:33:46,389 - jwst.extract_1d.extract - INFO - Working on slit 11
2026-03-27 13:33:46,390 - jwst.lib.pipe_utils - WARNING - Mismatched data shapes; skipping invalid data updates for extension 'dq'
2026-03-27 13:33:46,391 - jwst.extract_1d.extract - INFO - Turning on source position correction for exp_type = NRS_MSASPEC
2026-03-27 13:33:46,394 - jwst.extract_1d.source_location - INFO - Using source_xpos and source_ypos to center extraction.
2026-03-27 13:33:46,399 - jwst.extract_1d.extract - INFO - Computed source location is 4.49, at pixel 682, wavelength 4.07
2026-03-27 13:33:46,400 - jwst.extract_1d.extract - INFO - Nominal aperture start/stop: 7.50 -> 12.50 (inclusive)
2026-03-27 13:33:46,401 - jwst.extract_1d.extract - INFO - Nominal location is 10.00, so offset is -5.51 pixels
2026-03-27 13:33:46,402 - jwst.extract_1d.extract - INFO - Mean aperture start/stop from trace: 1.99 -> 6.99 (inclusive)
2026-03-27 13:33:46,405 - jwst.extract_1d.extract - INFO - Creating aperture correction.
2026-03-27 13:33:47,452 - stpipe.step - INFO - Step extract_1d done
2026-03-27 13:33:47,522 - stpipe.step - INFO - Saved model in ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_x1d.fits
2026-03-27 13:33:47,523 - jwst.pipeline.calwebb_spec2 - INFO - Finished processing product mast_products/jw01345061001_07101_00003_nrs2
2026-03-27 13:33:47,525 - jwst.pipeline.calwebb_spec2 - INFO - Ending calwebb_spec2
2026-03-27 13:33:47,525 - jwst.stpipe.core - INFO - Results used CRDS context: jwst_1464.pmap
2026-03-27 13:33:47,794 - stpipe.step - INFO - Saved model in ./stage2_nsclean_modified/jw01345061001_07101_00003_nrs2_cal.fits
2026-03-27 13:33:47,794 - stpipe.step - INFO - Step Spec2Pipeline done
2026-03-27 13:33:47,795 - jwst.stpipe.core - INFO - Results used jwst version: 1.20.2
Saved jw01345061001_07101_00003_nrs2_mask.fits
Saved jw01345061001_07101_00003_nrs2_nsclean.fits
Saved jw01345061001_07101_00003_nrs2_cal.fits
Saved jw01345061001_07101_00003_nrs2_x1d.fits
Run time: 0.9416666666666667 min
7.2 Comparing Original vs. Cleaned Data (Hand-Modified Mask) #
# Plot the original and cleaned data, as well as a residual map.
cleaned_modified_masks = [
stage2_nsclean_modified_dir + "jw01345061001_07101_00003_nrs1_nsclean.fits",
stage2_nsclean_modified_dir + "jw01345061001_07101_00003_nrs2_nsclean.fits",
]
# Plot each associated set of rateint data and cleaned file.
for rate_file, cleaned_file in zip(rate_names, cleaned_modified_masks):
plot_cleaned_data(
mast_products_dir + rate_file, cleaned_file, layout="columns", scale=9
)
Compare the extracted spectrum from the cleaned data to the spectrum extracted from the original rate file.
x1d_nsclean_modified = [
stage2_nsclean_modified_dir + "jw01345061001_07101_00003_nrs1_x1d.fits",
stage2_nsclean_modified_dir + "jw01345061001_07101_00003_nrs2_x1d.fits",
]
# Wavelength Region of interest.
for original, cleaned in zip(x1d_nsclean_skipped, x1d_nsclean_modified):
plot_spectra([original, cleaned], scale_percent=9)
Notes:
In slit 80 on NRS1, the overall continuum level has been slightly altered by the cleaning process (similar to the default masking and alternate masking).
In slit 11 on NRS2, the flux between 4-4.55 um has decreased due to the cleaning process with the hand-modified mask. Some of the negative flux in the original spectrum (at shorter and longer wavelengths) has been corrected.
8. Conclusion #
The final plots below show the countrate images and the resulting 1D extracted spectra side-by-side to compare the different cleaning methods: the original (no NSClean applied), the cleaned countrate image (with the default pipeline mask), the cleaned countrate image (with an alternate pipeline mask), and finally, the cleaned countrate image (with the hand-modified mask).
Please note that the results presented in this notebook may vary for different datasets (e.g., targets of different brightness, spatial extent, etc.). Users are encouraged to explore NSClean using different masking methods to determine the optimal results.
The output from the cleaning algorithm is now ready for further processing. The (_cal.fits) files produced by the above Spec2Pipeline run may be used as input to the Spec3Pipeline, for generating final combined spectra.
# Not cleaned vs. cleaned (default mask) vs. cleaned (alternate mask) rate data
original_rate_data = [
fits.open(mast_products_dir + rate_name)[1].data for rate_name in rate_names
]
cleaned_rate_default_data = [
fits.open(cleaned_default_mask)[1].data
for cleaned_default_mask in cleaned_default_masks
]
cleaned_rate_alternate_data = [
fits.open(cleaned_alternate_mask)[1].data
for cleaned_alternate_mask in cleaned_alternate_masks
]
cleaned_rate_modified_data = [
fits.open(cleaned_modified_mask)[1].data
for cleaned_modified_mask in cleaned_modified_masks
]
# For plotting visualization
for data_list in [
original_rate_data,
cleaned_rate_default_data,
cleaned_rate_alternate_data,
cleaned_rate_modified_data,
]:
for data in data_list:
data[np.isnan(data)] = 0
# Original vs. cleaned data (with default mask)
fig, axs = plt.subplots(2, 4, figsize=(25, 12))
# Set y-axis titles and plot the data
titles = [
"Original Rate Data",
"Cleaned Rate Data (Default Mask)",
"Cleaned Rate Data (Alternate Mask)",
"Cleaned Rate Data (Hand-Modified Mask)",
]
for i, (data_list, title) in enumerate(
zip(
[
original_rate_data,
cleaned_rate_default_data,
cleaned_rate_alternate_data,
cleaned_rate_modified_data,
],
titles,
)
):
for j, data in enumerate(data_list):
ax = axs[j, i]
ax.set_title(f'{title} \n {"NRS1" if j == 0 else "NRS2"}', fontsize=12)
im = ax.imshow(data, origin="lower", clim=(-1e-2, 1e-2))
fig.colorbar(im, ax=ax, pad=0.05, shrink=0.7, label="DN/s")
ax.set_xlabel("Pixel Column", fontsize=10)
ax.set_ylabel("Pixel Row", fontsize=10)
plt.tight_layout()
plt.show()
# Final Comparison
plot_spectra(
[
x1d_nsclean_skipped[0],
x1d_nsclean_default[0],
x1d_nsclean_alternate[0],
x1d_nsclean_modified[0],
],
scale_percent=4,
)
plot_spectra(
[
x1d_nsclean_skipped[1],
x1d_nsclean_default[1],
x1d_nsclean_alternate[1],
x1d_nsclean_modified[1],
],
scale_percent=4,
)
Final Notes:
The high-frequency noise in NRS2 introduced by the default masking, which was affecting the 1D extracted spectrum for slit 11 around 4.55um, no longer appears when using the alternate mask (slight improvement with the hand-modified mask), significantly improving the spectrum for slit 11.
Negative flux in slit 11 (at shorter and longer wavelengths) has been corrected with either of the masks. However, the hand-modified mask appears to decrease the continuum level for the spectrum of slit 11 between 4-4.55um. In this case, the alternate masking (clip-based) algorithm is preferable to blocking the entire science region for each MSA shutter.
About the Notebook #
Authors: Melanie Clarke, Kayli Glidic; NIRSpec Instrument Team
Updated On: Feburary 29, 2024.