Calibrating WFI Exposures with RomanCal#
Kernel Information and Read-Only Status#
To run this notebook, please select “Roman Research Nexus {VERSION}” kernel at the top right of your window. For example “Roman Research Nexus 2026.2”.
This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. file > save notebook as > my-nbs/nb.ipynb). Note that a directory must exist before you attempt to add a notebook to it.
Introduction#
The purpose of this notebook is to calibrate Level 1 (L1; uncalibrated ramp cube) data with the Roman WFI science calibration pipeline RomanCal (Python package name romancal) to produce Level 2 (L2; calibrated rate image) exposure level data. To learn more, please visit the RDox pages on the Exposure Level Pipeline (ELP). We also discuss calibration reference files including how to access and examine them and how to run the pipeline with custom reference files.
Details about the Roman data levels, including file naming conventions and file array names and data types, can be found in the RDox article Data Levels and Products.
A L1 file contains uncalibrated ramps in units of Data Numbers (DN). L1 files are three-dimensional data cubes, one dimension for time and two dimensions for image coordinates, that are shaped as arrays with (N resultants, 4096 image rows, 4096 image columns). For a given pixel, a resultant contains either one read or the arithmetic mean of multiple reads.
L2 WFI files are calibrated rate images in instrumental units of DN / second. They are two-dimensional arrays shaped as (4088 image rows, 4088 image columns). Note the smaller image size of L2 files, which is due to the removal of the 4-pixel border of reference pixels around the image during pipeline processing.
Local Run Settings#
If you want to run the notebook in your local machine, refer to the information in local installation instructions before proceeding with the notebook. The instructions provide inportant information about setting up your environment and installing dependnecies.
Imports#
Libraries used:
astropy for coordinates manipulation and image normalization
copy for making copies of Python objects
crds for access to calibration reference files
matplotlib and mpl_toolkits for plotting images
numpy for array manipulation
romancal for running the Roman WFI science data pipeline
roman_datamodels for opening Roman WFI ASDF files
asdf for opening Roman WFI ASDF files
os for operating system functions
s3fs for streaming files from an AWS S3 bucket
import os
from astropy.coordinates import SkyCoord
from astropy.visualization import simple_norm
import copy
import matplotlib.pyplot as plt
from matplotlib import colors, colormaps as cm
from mpl_toolkits.axes_grid1 import make_axes_locatable
import numpy as np
import roman_datamodels as rdm
import s3fs
The Calibration Reference Data System (CRDS)#
The Roman ELP, which corrects L1 images for detector-level effects to produce L2 images, uses calibration reference and parameter files from the CRDS. These reference files, developed and validated by STScI’s Science Operations Center, are continually updated as new WFI data become available. CRDS assigns the most appropriate reference file for each calibration step using metadata keywords and file-specific matching criteria. To use the best-available reference files for an observation, no action is needed as RomanCal will query for the best reference files for each calibration step in the pipeline.
In this tutorial, we will focus on the crds Python application programming interface (API). The CRDS webserver can also be accessed to browse calibration reference files in a tabular interface. Note that there are multiple CRDS servers, though most users will interact with the Operations (OPS) instance. Please be sure to navigate to the correct webserver for the instance in which you are interested.
For more details, see the RDox page on CRDS for Roman WFI and the CRDS documentation.
import crds
# Import romancal packages
import romancal
from romancal.pipeline import ExposurePipeline
Tutorial Data#
In this tutorial, we use L1 WFI data files simulated with Roman I-Sim. As an example, we take the output product from the Roman I-Sim tutorial notebook. If you have not run that simulation, the files are available in the Nexus S3 bucket. For more information on accessing these data, see the Data Discovery and Access tutorial.
Running the ELP on L1 Data#
To run the ELP on L1 data, you have two options:
Basic: Use
romancal.ExposurePipeline()to run all steps.Advanced: Run one or more individual steps.
Basic Example: Full Pipeline#
The input file for this example is a WFI L1 ASDF file. First, we check whether the file is already saved on disk (if the Roman I-Sim tutorial was run). If not, we stream the L1 file into memory (as a datamodel) from the Nexus S3 bucket:
l1_file = 'r0003201001001001004_0001_wfi01_f106_uncal.asdf'
if os.path.exists(l1_file):
dm_l1 = rdm.open(l1_file)
else:
s3_uri = asdf_dir_uri = 's3://stpubdata/roman/nexus/soc_simulations/tutorial_data/roman-2026.2/'
fs = s3fs.S3FileSystem(anon=True)
dm_l1 = rdm.open(fs.open(s3_uri + l1_file, 'rb'))
We begin by examining the data type using the type() function:
type(dm_l1)
roman_datamodels.datamodels._datamodels.ScienceRawModel
Reading the ASDF file with roman_datamodels returns a ScienceRawModel datamodel, which is the L1 file datamodel. At this point, we can use the .info() method on the data to look at the file contents:
dm_l1.info(max_rows=15)
root (AsdfObject)
├─asdf_library (Software)
│ ├─author (str): The ASDF Developers
│ ├─homepage (str): http://github.com/asdf-format/asdf
│ ├─name (str): asdf
│ └─version (str): 5.3.1
├─history (AsdfDictNode)
│ └─extensions (AsdfListNode) ...
├─roman (WfiScienceRaw) # Level 1 (L1) Uncalibrated Roman Wide Field
Instrument (WFI) Ramp Cube
│ ├─meta (AsdfDictNode) ...
│ ├─data (NDArrayType) # Science Data (DN) ...
│ └─amp33 (NDArrayType) # Amplifier 33 Reference Pixel Data (DN) ...
└─romanisim (AsdfDictNode) ...
Some nodes not shown.
We can see that this L1 file was created with Roman I-Sim as it contains the “romanisim” block.
Next, we present a basic example of running the complete pipeline.
The optional save_results parameter determines whether the resulting L2 datamodel is saved as a file on your Nexus storage. Setting this parameter to True enables file saving. In this example, we retain the calibrated L2 datamodel in memory as the variable result without saving it locally.
result = ExposurePipeline.call(dm_l1, save_results=False)
2026-07-22 21:47:48,322 - stpipe.step - INFO - ExposurePipeline instance created.
2026-07-22 21:47:48,323 - stpipe.step - INFO - DQInitStep instance created.
2026-07-22 21:47:48,324 - stpipe.step - INFO - SaturationStep instance created.
2026-07-22 21:47:48,325 - stpipe.step - INFO - RefPixStep instance created.
2026-07-22 21:47:48,326 - stpipe.step - INFO - DarkDecayStep instance created.
2026-07-22 21:47:48,327 - stpipe.step - INFO - WFI18TransientStep instance created.
2026-07-22 21:47:48,329 - stpipe.step - INFO - LinearityStep instance created.
2026-07-22 21:47:48,330 - stpipe.step - INFO - DarkCurrentStep instance created.
2026-07-22 21:47:48,331 - stpipe.step - INFO - RampFitStep instance created.
2026-07-22 21:47:48,332 - stpipe.step - INFO - AssignWcsStep instance created.
2026-07-22 21:47:48,333 - stpipe.step - INFO - FlatFieldStep instance created.
2026-07-22 21:47:48,334 - stpipe.step - INFO - PhotomStep instance created.
2026-07-22 21:47:48,335 - stpipe.step - INFO - SourceCatalogStep instance created.
2026-07-22 21:47:48,336 - stpipe.step - INFO - TweakRegStep instance created.
2026-07-22 21:47:48,490 - stpipe.step - INFO - Step ExposurePipeline running with args (<roman_datamodels.datamodels._datamodels.ScienceRawModel object at 0x7f4cce14f150>,).
2026-07-22 21:47:48,504 - stpipe.step - INFO - Step ExposurePipeline parameters are:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: cal
search_output_file: True
input_dir: ''
update_version: False
on_disk: False
steps:
dq_init:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
expand_gw_flagging: 0
saturation:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
n_pix_grow_sat: 0
backup: 0
refpix:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
remove_offset: True
remove_trends: True
cosine_interpolate: True
fft_interpolate: True
dark_decay:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
wfi18_transient:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
mask_rows: False
linearity:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
dark_current:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
rampfit:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: rampfit
search_output_file: True
input_dir: ''
update_version: False
algorithm: likely
rejection_threshold: 4.5
use_ramp_jump_detection: True
threshold_intercept: None
threshold_constant: None
include_var_rnoise: False
maximum_cores: '1'
expand_large_events: False
min_sat_area: 1.0
min_jump_area: 6.0
expand_factor: 1.9
sat_required_snowball: True
min_sat_radius_extend: 0.5
sat_expand: 2
edge_size: 0
assign_wcs:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
flatfield:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
include_var_flat: False
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
source_catalog:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: cat
search_output_file: True
input_dir: ''
update_version: False
bkg_boxsize: 1000
kernel_fwhm: 2.0
snr_threshold: 3.0
npixels: 25
deblend: False
fit_psf: True
forced_segmentation: ''
tweakreg:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: True
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
catalog_format: ascii.ecsv
catalog_path: ''
enforce_user_order: False
expand_refcat: False
minobj: 10
searchrad: 2.0
use2dhist: True
separation: 1.0
tolerance: 0.7
fitgeometry: general
nclip: 3
sigma: 3.0
abs_refcat: GAIADR3_S3
save_abs_catalog: False
abs_minobj: 10
abs_searchrad: 6.0
abs_use2dhist: True
abs_separation: 1.0
abs_tolerance: 0.7
abs_fitgeometry: general
abs_nclip: 3
abs_sigma: 3.0
update_source_catalog_coordinates: False
vo_timeout: 1200.0
2026-07-22 21:47:48,506 - stpipe.pipeline - INFO - Prefetching reference files for dataset: 'r0003201001001001004_0001_wfi01_f106_uncal.asdf' reftypes = ['apcorr', 'dark', 'darkdecaysignal', 'distortion', 'flat', 'gain', 'integralnonlinearity', 'inverselinearity', 'linearity', 'mask', 'photom', 'readnoise', 'refpix', 'saturation']
2026-07-22 21:47:48,510 - stpipe.pipeline - INFO - Prefetch for APCORR reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_apcorr_0020.asdf'.
2026-07-22 21:47:48,510 - stpipe.pipeline - INFO - Prefetch for DARK reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0627.asdf'.
2026-07-22 21:47:48,511 - stpipe.pipeline - INFO - Prefetch for DARKDECAYSIGNAL reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_darkdecaysignal_0001.asdf'.
2026-07-22 21:47:48,511 - stpipe.pipeline - INFO - Prefetch for DISTORTION reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_distortion_0014.asdf'.
2026-07-22 21:47:48,512 - stpipe.pipeline - INFO - Prefetch for FLAT reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_flat_0175.asdf'.
2026-07-22 21:47:48,512 - stpipe.pipeline - INFO - Prefetch for GAIN reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_gain_0022.asdf'.
2026-07-22 21:47:48,513 - stpipe.pipeline - INFO - Prefetch for INTEGRALNONLINEARITY reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_integralnonlinearity_0003.asdf'.
2026-07-22 21:47:48,513 - stpipe.pipeline - INFO - Prefetch for INVERSELINEARITY reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_inverselinearity_0042.asdf'.
2026-07-22 21:47:48,514 - stpipe.pipeline - INFO - Prefetch for LINEARITY reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_linearity_0039.asdf'.
2026-07-22 21:47:48,514 - stpipe.pipeline - INFO - Prefetch for MASK reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_mask_0030.asdf'.
2026-07-22 21:47:48,515 - stpipe.pipeline - INFO - Prefetch for PHOTOM reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_photom_0040.asdf'.
2026-07-22 21:47:48,515 - stpipe.pipeline - INFO - Prefetch for READNOISE reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_readnoise_0024.asdf'.
2026-07-22 21:47:48,516 - stpipe.pipeline - INFO - Prefetch for REFPIX reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_refpix_0013.asdf'.
2026-07-22 21:47:48,516 - stpipe.pipeline - INFO - Prefetch for SATURATION reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_saturation_0031.asdf'.
2026-07-22 21:47:48,517 - romancal.pipeline.exposure_pipeline - INFO - Starting Roman exposure calibration pipeline ...
2026-07-22 21:47:48,677 - stpipe.step - INFO - Step dq_init running with args (<roman_datamodels.datamodels._datamodels.ScienceRawModel object at 0x7f4cce14f150>,).
2026-07-22 21:47:53,715 - romancal.dq_init.dq_initialization - INFO - Invalid guide window location: -999999, -999983, -999999, -999983
2026-07-22 21:47:53,750 - stpipe.step - INFO - Step dq_init done
2026-07-22 21:47:53,914 - stpipe.step - INFO - Step saturation running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4cce3db740>,).
2026-07-22 21:47:53,917 - romancal.saturation.saturation_step - INFO - Using SATURATION reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_saturation_0031.asdf
2026-07-22 21:47:55,116 - stcal.saturation.saturation - INFO - Detected 77254 saturated pixels
2026-07-22 21:47:55,156 - stcal.saturation.saturation - INFO - Detected 65549 A/D floor pixels
2026-07-22 21:47:55,171 - stpipe.step - INFO - Step saturation done
2026-07-22 21:47:55,370 - stpipe.step - INFO - Step refpix running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4cce3db740>,).
2026-07-22 21:47:55,867 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/romancal/refpix/_data.py:398: RuntimeWarning: invalid value encountered in divide
kern = (cov / mask_conv).reshape(rows, columns)
2026-07-22 21:47:57,650 - stpipe.step - INFO - Step refpix done
2026-07-22 21:47:57,822 - stpipe.step - INFO - Step dark_decay running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4cce3db740>,).
2026-07-22 21:47:57,824 - romancal.dark_decay.dark_decay_step - INFO - Using DARKDECAYSIGNAL reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_darkdecaysignal_0001.asdf
2026-07-22 21:47:57,835 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_darkdecaysignal_0001.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:48:01,583 - stpipe.step - INFO - Step dark_decay done
2026-07-22 21:48:01,746 - stpipe.step - INFO - Step wfi18_transient running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4cce3db740>,).
2026-07-22 21:48:01,748 - stpipe.step - INFO - Step wfi18_transient done
2026-07-22 21:48:01,914 - stpipe.step - INFO - Step linearity running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4cce3db740>,).
2026-07-22 21:48:01,919 - romancal.linearity.linearity_step - INFO - Using LINEARITY reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_linearity_0039.asdf
2026-07-22 21:48:01,920 - romancal.linearity.linearity_step - INFO - Using INVERSELINEARITY reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_inverselinearity_0042.asdf
2026-07-22 21:48:01,921 - romancal.linearity.linearity_step - INFO - Using INTEGRALNONLINEARITY reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_integralnonlinearity_0003.asdf
2026-07-22 21:48:01,947 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_integralnonlinearity_0003.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:48:01,972 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_linearity_0039.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.0.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:48:01,987 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_inverselinearity_0042.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.0.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:48:03,839 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/stcal/linearity/linearity.py:494: RuntimeWarning: overflow encountered in cast
data[i] = np.where(resultant_saturated, data[i], corrected_resultant)
2026-07-22 21:48:22,051 - romancal.linearity.linearity_step - WARNING - Flagged 282 spurious values outside remotely plausible range.
2026-07-22 21:48:22,057 - stpipe.step - INFO - Step linearity done
2026-07-22 21:48:22,208 - stpipe.step - INFO - Step rampfit running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4cce3db740>,).
2026-07-22 21:48:22,212 - romancal.ramp_fitting.ramp_fit_step - INFO - Using READNOISE reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_readnoise_0024.asdf
2026-07-22 21:48:22,227 - romancal.ramp_fitting.ramp_fit_step - INFO - Using GAIN reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_gain_0022.asdf
2026-07-22 21:48:22,241 - romancal.ramp_fitting.ramp_fit_step - INFO - Number of resultants: 5
2026-07-22 21:49:10,698 - romancal.ramp_fitting.ramp_fit_step - INFO - Number of resultants: 5
2026-07-22 21:49:10,921 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/romancal/ramp_fitting/ramp_fit_step.py:460: RuntimeWarning: overflow encountered in cast
im.dumo = (slopes_alt[4:-4, 4:-4] - im.data).astype("float16")
2026-07-22 21:49:11,692 - stpipe.step - INFO - Step rampfit done
2026-07-22 21:49:11,841 - stpipe.step - INFO - Step dark_current running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ccdcb2070>,).
2026-07-22 21:49:11,845 - romancal.dark_current.dark_current_step - INFO - Using DARK reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0627.asdf
2026-07-22 21:49:11,861 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0627.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:49:12,648 - stpipe.step - INFO - Step dark_current done
2026-07-22 21:49:12,798 - stpipe.step - INFO - Step assign_wcs running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ccdcb2070>,).
2026-07-22 21:49:12,798 - romancal.assign_wcs.assign_wcs_step - INFO - reftype, distortion
2026-07-22 21:49:12,801 - romancal.assign_wcs.assign_wcs_step - INFO - Using reference files: {'distortion': '/home/runner/crds_cache/references/roman/wfi/roman_wfi_distortion_0014.asdf'} for assign_wcs
2026-07-22 21:49:12,860 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 270.934685029 -0.225734417 270.934627258 -0.102770948 270.809037196 -0.102466475 270.809759493 -0.225325334
2026-07-22 21:49:12,861 - romancal.assign_wcs.assign_wcs - INFO - S_REGION VALUES: POLYGON ICRS 270.934685029 -0.225734417 270.934627258 -0.102770948 270.809037196 -0.102466475 270.809759493 -0.225325334
2026-07-22 21:49:12,861 - romancal.assign_wcs.assign_wcs - INFO - Update S_REGION to POLYGON ICRS 270.934685029 -0.225734417 270.934627258 -0.102770948 270.809037196 -0.102466475 270.809759493 -0.225325334
2026-07-22 21:49:13,624 - stpipe.step - INFO - Step assign_wcs done
2026-07-22 21:49:13,778 - stpipe.step - INFO - Step photom running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ccdcb2070>,).
2026-07-22 21:49:13,796 - romancal.photom.photom - INFO - photmjsr value: 0.7417487930165987
2026-07-22 21:49:13,796 - romancal.photom.photom - INFO - uncertainty value: 0.028857321159254122
2026-07-22 21:49:14,556 - stpipe.step - INFO - Step photom done
2026-07-22 21:49:14,720 - stpipe.step - INFO - Step flatfield running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ccdcb2070>,).
2026-07-22 21:49:15,130 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/romancal/flatfield/flat_field.py:91: RuntimeWarning: overflow encountered in divide
science.var_poisson /= flat_data_squared
2026-07-22 21:49:15,803 - stpipe.step - INFO - Step flatfield done
2026-07-22 21:49:15,952 - stpipe.step - INFO - Step source_catalog running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ccdcb2070>,).
2026-07-22 21:49:15,955 - romancal.source_catalog.source_catalog_step - INFO - Using ePSF reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_epsf_0247.asdf
2026-07-22 21:49:15,972 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_epsf_0247.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.0.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:49:18,545 - romancal.source_catalog.psf - INFO - Performed jitter convolution. Image kernel: (8, 8, 0) Reference kernel: (0, 0, 0)
2026-07-22 21:49:18,792 - romancal.source_catalog.source_catalog_step - INFO - Calculating and subtracting background
2026-07-22 21:49:22,482 - romancal.source_catalog.source_catalog_step - INFO - Creating detection image
2026-07-22 21:49:23,239 - romancal.source_catalog.source_catalog_step - INFO - Detecting sources
2026-07-22 21:49:25,564 - romancal.source_catalog._detection - INFO - Detected 1610 sources
2026-07-22 21:49:25,565 - romancal.source_catalog.source_catalog_step - INFO - Creating ee_fractions model
2026-07-22 21:49:25,589 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_apcorr_0020.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.30.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:49:25,652 - romancal.source_catalog.source_catalog_step - INFO - Creating source catalog
2026-07-22 21:49:25,698 - romancal.source_catalog._source_catalog - INFO - Calculating segment properties
2026-07-22 21:49:26,705 - romancal.source_catalog._source_catalog - INFO - Calculating aperture photometry
2026-07-22 21:49:28,156 - romancal.source_catalog._source_catalog - INFO - Calculating DAOFind properties
2026-07-22 21:49:28,397 - romancal.source_catalog._source_catalog - INFO - Calculating nearest neighbor properties
2026-07-22 21:49:28,399 - romancal.source_catalog._source_catalog - INFO - Calculating PSF photometry
2026-07-22 21:49:28,401 - romancal.source_catalog.psf - INFO - Integrating over the native pixel scale.
2026-07-22 21:49:38,579 - romancal.source_catalog._source_catalog - WARNING - meta.wcsinfo missing skycell_name/pixel_scale_ref; flagged_spatial_id will be zero.
2026-07-22 21:49:39,060 - stpipe.step - INFO - Saved model in r0003201001001001004_0001_wfi01_f106_segm.asdf
2026-07-22 21:49:39,878 - stpipe.step - INFO - Saved model in r0003201001001001004_0001_wfi01_f106_cat.parquet
2026-07-22 21:49:40,521 - stpipe.step - INFO - Step source_catalog done
2026-07-22 21:49:40,699 - stpipe.step - INFO - Step tweakreg running with args (<romancal.datamodels.library.ModelLibrary object at 0x7f4cce0b6600>,).
2026-07-22 21:49:40,700 - romancal.tweakreg.tweakreg_step - INFO - Number of image groups to be aligned: 1.
2026-07-22 21:49:40,700 - romancal.tweakreg.tweakreg_step - INFO - Image groups:
2026-07-22 21:49:40,701 - romancal.tweakreg.tweakreg_step - INFO - ?
2026-07-22 21:49:40,701 - romancal.tweakreg.tweakreg_step - INFO - All source catalogs will be saved to: /home/runner/work/roman_notebooks/roman_notebooks/notebooks/exposure_pipeline
2026-07-22 21:49:40,702 - romancal.tweakreg.tweakreg_step - INFO - Using tweakreg catalog file 'r0003201001001001004_0001_wfi01_f106_cat.parquet' for r0003201001001001004_0001_wfi01_f106_uncal.asdf.
2026-07-22 21:49:40,743 - romancal.tweakreg.tweakreg_step - INFO - Using 1609 sources from r0003201001001001004_0001_wfi01_f106_uncal.asdf.
2026-07-22 21:49:42,447 - tweakwcs.imalign - INFO -
2026-07-22 21:49:42,447 - tweakwcs.imalign - INFO - ***** tweakwcs.imalign.align_wcs() started on 2026-07-22 21:49:42.447090
2026-07-22 21:49:42,448 - tweakwcs.imalign - INFO - Version 0.9.2
2026-07-22 21:49:42,448 - tweakwcs.imalign - INFO -
2026-07-22 21:49:42,575 - tweakwcs.imalign - INFO - Aligning image catalog 'GROUP ID: 987654' to the reference catalog.
2026-07-22 21:49:42,631 - tweakwcs.matchutils - INFO - Matching sources from 'r0003201001001001004_0001_wfi01_f106_uncal' catalog with sources from the reference 'GAIADR3_S3' catalog.
2026-07-22 21:49:42,631 - tweakwcs.matchutils - INFO - Computing initial guess for X and Y shifts...
2026-07-22 21:49:42,636 - tweakwcs.matchutils - INFO - Found initial X and Y shifts of 0.0119014, 0.0117613 (arcsec) with significance of 1492.81 and 1561 matches.
2026-07-22 21:49:42,638 - tweakwcs.wcsimage - INFO - Found 1564 matches for 'GROUP ID: 987654'...
2026-07-22 21:49:42,639 - tweakwcs.linearfit - INFO - Performing 'general' fit
2026-07-22 21:49:42,644 - tweakwcs.wcsimage - INFO - Computed 'general' fit for 'GROUP ID: 987654':
2026-07-22 21:49:42,645 - tweakwcs.wcsimage - INFO - XSH: 0.00272205 YSH: -0.000409455 PROPER ROT: 6.87107e-05
2026-07-22 21:49:42,645 - tweakwcs.wcsimage - INFO - <ROT>: 6.87107e-05 SKEW: 0.000122455 ROT_X: 7.48309e-06 ROT_Y: 0.000129938
2026-07-22 21:49:42,645 - tweakwcs.wcsimage - INFO - <SCALE>: 1 SCALE_X: 0.999998 SCALE_Y: 1
2026-07-22 21:49:42,646 - tweakwcs.wcsimage - INFO -
2026-07-22 21:49:42,646 - tweakwcs.wcsimage - INFO - FIT RMSE: 0.00305046 FIT MAE: 0.00272513
2026-07-22 21:49:42,647 - tweakwcs.wcsimage - INFO - Final solution based on 1549 objects.
2026-07-22 21:49:42,684 - tweakwcs.imalign - INFO -
2026-07-22 21:49:42,685 - tweakwcs.imalign - INFO - ***** tweakwcs.imalign.align_wcs() ended on 2026-07-22 21:49:42.684826
2026-07-22 21:49:42,685 - tweakwcs.imalign - INFO - ***** tweakwcs.imalign.align_wcs() TOTAL RUN TIME: 0:00:00.237736
2026-07-22 21:49:42,686 - tweakwcs.imalign - INFO -
2026-07-22 21:49:42,690 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 270.934685535 -0.225734685 270.934628042 -0.102770924 270.809038204 -0.102466434 270.809760222 -0.225325584
2026-07-22 21:49:42,690 - romancal.assign_wcs.assign_wcs - INFO - S_REGION VALUES: POLYGON ICRS 270.934685535 -0.225734685 270.934628042 -0.102770924 270.809038204 -0.102466434 270.809760222 -0.225325584
2026-07-22 21:49:42,691 - romancal.assign_wcs.assign_wcs - INFO - Update S_REGION to POLYGON ICRS 270.934685535 -0.225734685 270.934628042 -0.102770924 270.809038204 -0.102466434 270.809760222 -0.225325584
2026-07-22 21:49:43,290 - stpipe.step - INFO - Step tweakreg done
2026-07-22 21:49:43,291 - romancal.pipeline.exposure_pipeline - INFO - Roman exposure calibration pipeline ending...
2026-07-22 21:49:43,867 - stpipe.step - INFO - Step ExposurePipeline done
type(result)
roman_datamodels.datamodels._datamodels.ImageModel
The output from the Exposure Pipeline is an ImageModel object, which serves as the datamodel for L2 files.
In addition, the pipeline created three other files in the working directory with names similar to the input L1 file. These files end with *_cat.parquet, *_segm.asdf, and *_wcs.asdf, corresponding to a Level 4 (L4) single-band source catalog, a L4 segmentation map, and a L1 updated WCS file, respectively. The L1 WCS file provides a L2-quality World Coordinate System (WCS) when working with a L1 file, which have a different number of pixels than L2 files, without updating the original L1 file on disk. More information about working with L4 products will be added in another future tutorial. Note: L4 products are still being validated and should be used with caution during development.
Optional parameters can also be passed to individual pipeline steps through the steps dictionary. For example, the code below demonstrates how to skip both the source catalog step and the step that aligns the image with the Gaia astrometric catalog (the TweakReg step, named after the software used to update the WCS). Other parameters can be configured in the same way; for details, see the romancal documentation.
result = ExposurePipeline.call(dm_l1, steps={'source_catalog': {'skip': True}, 'tweakreg': {'skip': True}})
2026-07-22 21:49:43,893 - stpipe.step - INFO - ExposurePipeline instance created.
2026-07-22 21:49:43,895 - stpipe.step - INFO - DQInitStep instance created.
2026-07-22 21:49:43,895 - stpipe.step - INFO - SaturationStep instance created.
2026-07-22 21:49:43,896 - stpipe.step - INFO - RefPixStep instance created.
2026-07-22 21:49:43,897 - stpipe.step - INFO - DarkDecayStep instance created.
2026-07-22 21:49:43,898 - stpipe.step - INFO - WFI18TransientStep instance created.
2026-07-22 21:49:43,899 - stpipe.step - INFO - LinearityStep instance created.
2026-07-22 21:49:43,900 - stpipe.step - INFO - DarkCurrentStep instance created.
2026-07-22 21:49:43,901 - stpipe.step - INFO - RampFitStep instance created.
2026-07-22 21:49:43,902 - stpipe.step - INFO - AssignWcsStep instance created.
2026-07-22 21:49:43,903 - stpipe.step - INFO - FlatFieldStep instance created.
2026-07-22 21:49:43,904 - stpipe.step - INFO - PhotomStep instance created.
2026-07-22 21:49:43,905 - stpipe.step - INFO - SourceCatalogStep instance created.
2026-07-22 21:49:43,907 - stpipe.step - INFO - TweakRegStep instance created.
2026-07-22 21:49:44,085 - stpipe.step - INFO - Step ExposurePipeline running with args (<roman_datamodels.datamodels._datamodels.ScienceRawModel object at 0x7f4cce14f150>,).
2026-07-22 21:49:44,100 - stpipe.step - INFO - Step ExposurePipeline parameters are:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: cal
search_output_file: True
input_dir: ''
update_version: False
on_disk: False
steps:
dq_init:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
expand_gw_flagging: 0
saturation:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
n_pix_grow_sat: 0
backup: 0
refpix:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
remove_offset: True
remove_trends: True
cosine_interpolate: True
fft_interpolate: True
dark_decay:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
wfi18_transient:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
mask_rows: False
linearity:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
dark_current:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
rampfit:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: rampfit
search_output_file: True
input_dir: ''
update_version: False
algorithm: likely
rejection_threshold: 4.5
use_ramp_jump_detection: True
threshold_intercept: None
threshold_constant: None
include_var_rnoise: False
maximum_cores: '1'
expand_large_events: False
min_sat_area: 1.0
min_jump_area: 6.0
expand_factor: 1.9
sat_required_snowball: True
min_sat_radius_extend: 0.5
sat_expand: 2
edge_size: 0
assign_wcs:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
flatfield:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
include_var_flat: False
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
source_catalog:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: cat
search_output_file: True
input_dir: ''
update_version: False
bkg_boxsize: 1000
kernel_fwhm: 2.0
snr_threshold: 3.0
npixels: 25
deblend: False
fit_psf: True
forced_segmentation: ''
tweakreg:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
update_version: False
catalog_format: ascii.ecsv
catalog_path: ''
enforce_user_order: False
expand_refcat: False
minobj: 10
searchrad: 2.0
use2dhist: True
separation: 1.0
tolerance: 0.7
fitgeometry: general
nclip: 3
sigma: 3.0
abs_refcat: GAIADR3_S3
save_abs_catalog: False
abs_minobj: 10
abs_searchrad: 6.0
abs_use2dhist: True
abs_separation: 1.0
abs_tolerance: 0.7
abs_fitgeometry: general
abs_nclip: 3
abs_sigma: 3.0
update_source_catalog_coordinates: False
vo_timeout: 1200.0
2026-07-22 21:49:44,102 - stpipe.pipeline - INFO - Prefetching reference files for dataset: 'r0003201001001001004_0001_wfi01_f106_uncal.asdf' reftypes = ['dark', 'darkdecaysignal', 'distortion', 'flat', 'gain', 'integralnonlinearity', 'inverselinearity', 'linearity', 'mask', 'photom', 'readnoise', 'refpix', 'saturation']
2026-07-22 21:49:44,105 - stpipe.pipeline - INFO - Prefetch for DARK reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0627.asdf'.
2026-07-22 21:49:44,106 - stpipe.pipeline - INFO - Prefetch for DARKDECAYSIGNAL reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_darkdecaysignal_0001.asdf'.
2026-07-22 21:49:44,106 - stpipe.pipeline - INFO - Prefetch for DISTORTION reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_distortion_0014.asdf'.
2026-07-22 21:49:44,107 - stpipe.pipeline - INFO - Prefetch for FLAT reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_flat_0175.asdf'.
2026-07-22 21:49:44,108 - stpipe.pipeline - INFO - Prefetch for GAIN reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_gain_0022.asdf'.
2026-07-22 21:49:44,108 - stpipe.pipeline - INFO - Prefetch for INTEGRALNONLINEARITY reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_integralnonlinearity_0003.asdf'.
2026-07-22 21:49:44,109 - stpipe.pipeline - INFO - Prefetch for INVERSELINEARITY reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_inverselinearity_0042.asdf'.
2026-07-22 21:49:44,109 - stpipe.pipeline - INFO - Prefetch for LINEARITY reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_linearity_0039.asdf'.
2026-07-22 21:49:44,110 - stpipe.pipeline - INFO - Prefetch for MASK reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_mask_0030.asdf'.
2026-07-22 21:49:44,111 - stpipe.pipeline - INFO - Prefetch for PHOTOM reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_photom_0040.asdf'.
2026-07-22 21:49:44,111 - stpipe.pipeline - INFO - Prefetch for READNOISE reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_readnoise_0024.asdf'.
2026-07-22 21:49:44,111 - stpipe.pipeline - INFO - Prefetch for REFPIX reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_refpix_0013.asdf'.
2026-07-22 21:49:44,112 - stpipe.pipeline - INFO - Prefetch for SATURATION reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_saturation_0031.asdf'.
2026-07-22 21:49:44,113 - romancal.pipeline.exposure_pipeline - INFO - Starting Roman exposure calibration pipeline ...
2026-07-22 21:49:44,278 - stpipe.step - INFO - Step dq_init running with args (<roman_datamodels.datamodels._datamodels.ScienceRawModel object at 0x7f4cce14f150>,).
2026-07-22 21:49:44,333 - romancal.dq_init.dq_initialization - INFO - Invalid guide window location: -999999, -999983, -999999, -999983
2026-07-22 21:49:44,368 - stpipe.step - INFO - Step dq_init done
2026-07-22 21:49:44,547 - stpipe.step - INFO - Step saturation running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ccd325170>,).
2026-07-22 21:49:44,550 - romancal.saturation.saturation_step - INFO - Using SATURATION reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_saturation_0031.asdf
2026-07-22 21:49:45,746 - stcal.saturation.saturation - INFO - Detected 77254 saturated pixels
2026-07-22 21:49:45,784 - stcal.saturation.saturation - INFO - Detected 65549 A/D floor pixels
2026-07-22 21:49:45,800 - stpipe.step - INFO - Step saturation done
2026-07-22 21:49:46,028 - stpipe.step - INFO - Step refpix running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ccd325170>,).
2026-07-22 21:49:46,517 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/romancal/refpix/_data.py:398: RuntimeWarning: invalid value encountered in divide
kern = (cov / mask_conv).reshape(rows, columns)
2026-07-22 21:49:48,148 - stpipe.step - INFO - Step refpix done
2026-07-22 21:49:48,318 - stpipe.step - INFO - Step dark_decay running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ccd325170>,).
2026-07-22 21:49:48,321 - romancal.dark_decay.dark_decay_step - INFO - Using DARKDECAYSIGNAL reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_darkdecaysignal_0001.asdf
2026-07-22 21:49:48,332 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_darkdecaysignal_0001.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:49:52,010 - stpipe.step - INFO - Step dark_decay done
2026-07-22 21:49:52,184 - stpipe.step - INFO - Step wfi18_transient running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ccd325170>,).
2026-07-22 21:49:52,186 - stpipe.step - INFO - Step wfi18_transient done
2026-07-22 21:49:52,354 - stpipe.step - INFO - Step linearity running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ccd325170>,).
2026-07-22 21:49:52,359 - romancal.linearity.linearity_step - INFO - Using LINEARITY reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_linearity_0039.asdf
2026-07-22 21:49:52,360 - romancal.linearity.linearity_step - INFO - Using INVERSELINEARITY reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_inverselinearity_0042.asdf
2026-07-22 21:49:52,360 - romancal.linearity.linearity_step - INFO - Using INTEGRALNONLINEARITY reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_integralnonlinearity_0003.asdf
2026-07-22 21:49:52,385 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_integralnonlinearity_0003.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:49:52,407 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_linearity_0039.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.0.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:49:52,423 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_inverselinearity_0042.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.0.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:49:54,268 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/stcal/linearity/linearity.py:494: RuntimeWarning: overflow encountered in cast
data[i] = np.where(resultant_saturated, data[i], corrected_resultant)
2026-07-22 21:50:12,393 - romancal.linearity.linearity_step - WARNING - Flagged 282 spurious values outside remotely plausible range.
2026-07-22 21:50:12,400 - stpipe.step - INFO - Step linearity done
2026-07-22 21:50:12,568 - stpipe.step - INFO - Step rampfit running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ccd325170>,).
2026-07-22 21:50:12,572 - romancal.ramp_fitting.ramp_fit_step - INFO - Using READNOISE reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_readnoise_0024.asdf
2026-07-22 21:50:12,587 - romancal.ramp_fitting.ramp_fit_step - INFO - Using GAIN reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_gain_0022.asdf
2026-07-22 21:50:12,602 - romancal.ramp_fitting.ramp_fit_step - INFO - Number of resultants: 5
2026-07-22 21:51:00,242 - romancal.ramp_fitting.ramp_fit_step - INFO - Number of resultants: 5
2026-07-22 21:51:00,464 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/romancal/ramp_fitting/ramp_fit_step.py:460: RuntimeWarning: overflow encountered in cast
im.dumo = (slopes_alt[4:-4, 4:-4] - im.data).astype("float16")
2026-07-22 21:51:01,235 - stpipe.step - INFO - Step rampfit done
2026-07-22 21:51:01,403 - stpipe.step - INFO - Step dark_current running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4cdd5218f0>,).
2026-07-22 21:51:01,406 - romancal.dark_current.dark_current_step - INFO - Using DARK reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0627.asdf
2026-07-22 21:51:01,422 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0627.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:51:02,211 - stpipe.step - INFO - Step dark_current done
2026-07-22 21:51:02,377 - stpipe.step - INFO - Step assign_wcs running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4cdd5218f0>,).
2026-07-22 21:51:02,378 - romancal.assign_wcs.assign_wcs_step - INFO - reftype, distortion
2026-07-22 21:51:02,381 - romancal.assign_wcs.assign_wcs_step - INFO - Using reference files: {'distortion': '/home/runner/crds_cache/references/roman/wfi/roman_wfi_distortion_0014.asdf'} for assign_wcs
2026-07-22 21:51:02,439 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 270.934685029 -0.225734417 270.934627258 -0.102770948 270.809037196 -0.102466475 270.809759493 -0.225325334
2026-07-22 21:51:02,440 - romancal.assign_wcs.assign_wcs - INFO - S_REGION VALUES: POLYGON ICRS 270.934685029 -0.225734417 270.934627258 -0.102770948 270.809037196 -0.102466475 270.809759493 -0.225325334
2026-07-22 21:51:02,440 - romancal.assign_wcs.assign_wcs - INFO - Update S_REGION to POLYGON ICRS 270.934685029 -0.225734417 270.934627258 -0.102770948 270.809037196 -0.102466475 270.809759493 -0.225325334
2026-07-22 21:51:03,198 - stpipe.step - INFO - Step assign_wcs done
2026-07-22 21:51:03,362 - stpipe.step - INFO - Step photom running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4cdd5218f0>,).
2026-07-22 21:51:03,380 - romancal.photom.photom - INFO - photmjsr value: 0.7417487930165987
2026-07-22 21:51:03,380 - romancal.photom.photom - INFO - uncertainty value: 0.028857321159254122
2026-07-22 21:51:04,142 - stpipe.step - INFO - Step photom done
2026-07-22 21:51:04,315 - stpipe.step - INFO - Step flatfield running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4cdd5218f0>,).
2026-07-22 21:51:04,725 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/romancal/flatfield/flat_field.py:91: RuntimeWarning: overflow encountered in divide
science.var_poisson /= flat_data_squared
2026-07-22 21:51:05,400 - stpipe.step - INFO - Step flatfield done
2026-07-22 21:51:05,570 - stpipe.step - INFO - Step source_catalog running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4cdd5218f0>,).
2026-07-22 21:51:05,570 - stpipe.step - INFO - Step skipped.
2026-07-22 21:51:06,317 - stpipe.step - INFO - Step tweakreg running with args (<romancal.datamodels.library.ModelLibrary object at 0x7f4ccd3474d0>,).
2026-07-22 21:51:06,317 - stpipe.step - INFO - Step skipped.
2026-07-22 21:51:06,898 - romancal.pipeline.exposure_pipeline - INFO - Roman exposure calibration pipeline ending...
2026-07-22 21:51:07,480 - stpipe.step - INFO - Step ExposurePipeline done
At the end of the pipeline log messages, you will see that the SourceCatalog and TweakReg steps were skipped, as expected. Because the source catalog step was omitted, the L4 source catalog and segmentation map files were not regenerated. To verify the status of a step, you can also inspect the metadata of the output datamodel:
result.meta.cal_step.source_catalog
'SKIPPED'
More information on these steps can be found in the Exposure Pipeline article on RDox.
Note that the ramp-fitting step transforms the structure of the data — in other words, the data models before and after ramp fitting are intrinsically different. Therefore, steps following ramp fitting cannot be applied to data that has not undergone it, and similarly, steps preceding ramp fitting cannot be applied once the data has.
We can save our L2 datamodel to disk with the .save() method. The following commented command provides an example.
#result.save('my_roman_l2_file.asdf')
If you look at the file browser in the directory where you ran this tutorial, you should see a new file called “my_roman_l2_file.asdf”. Note that you may need to wait a moment or manually refresh the file browser before it appears.
Advanced Example: Running Individual Pipeline Steps#
Now, for a more advanced use case, let’s update the WCS based on the pointing information. For example, suppose we simulated an L1 file, processed it with the ELP, and now want to try shifting the pointing information and creating a new WCS to test the Gaia alignment. After editing any of the meta.wcsinfo values we wish to change, we can generate a new WCS by running the AssignWcsStep on our L2 ASDF file.
Let’s start by reading in a fresh L2 file:
l2_file = 'r0003201001001001004_0001_wfi01_f106_cal.asdf'
if os.path.exists(l2_file):
dm = rdm.open(l2_file)
original_wcs = copy.deepcopy(dm.meta.wcs)
else:
s3_uri = asdf_dir_uri = 's3://stpubdata/roman/nexus/soc_simulations/tutorial_data/roman-2026.2/'
fs = s3fs.S3FileSystem(anon=True)
dm = rdm.open(fs.open(s3_uri + l2_file, 'rb'))
original_wcs = copy.deepcopy(dm.meta.wcs)
Let’s take a quick look at the file we just opened:
dm.info()
root (AsdfObject)
├─asdf_library (Software)
│ ├─author (str): The ASDF Developers
│ ├─homepage (str): http://github.com/asdf-format/asdf
│ ├─name (str): asdf
│ └─version (str): 5.3.1
├─history (AsdfDictNode)
│ └─extensions (AsdfListNode) ...
└─roman (WfiImage) # Level 2 (L2) Calibrated Roman Wide Field Instrument (WFI) Rate Image.
├─meta (AsdfDictNode) ...
├─data (NDArrayType) # Science Data (DN/s) or (MJy/sr) ...
├─dq (NDArrayType) # Data Quality ...
├─err (NDArrayType) # Error (DN / s) or (MJy / sr) ...
├─var_poisson (NDArrayType) # Poisson Variance (DN^2/s^2) or (MJy^2/sr^2) ...
├─chisq (NDArrayType) # Chi-squared of Ramp Fit ...
├─dumo (NDArrayType) # Difference Uniform Minus Optimal (DN / s) or (MJy / sr) ...
├─amp33 (NDArrayType) # Amplifier 33 Reference Pixel Data (DN) ...
├─border_ref_pix_left (NDArrayType) # Left-Edge Border Reference Pixels (DN) ...
├─border_ref_pix_right (NDArrayType) # Right-Edge Border Reference Pixels (DN) ...
├─border_ref_pix_top (NDArrayType) # Border Reference Pixels on the Top of the Detector (DN) ...
├─border_ref_pix_bottom (NDArrayType) # Bottom-Edge Border Reference Pixels (DN) ...
├─dq_border_ref_pix_left (NDArrayType) # Left-Edge Border Reference Pixel Data Quality (DN) ...
└─3 not shown
Some nodes not shown.
Before aligning the images with the Gaia coordinates, the WCS in an L2 file is populated using the telescope pointing information, resulting in the so-called “coarse WCS”. The meta.pointing section of the metadata describes the spacecraft pointing, while the detector-dependent information used to construct the coarse WCS is contained in the meta.wcsinfo section. Although the values in meta.pointing and meta.wcsinfo are linked, the coarse WCS relies only on meta.wcsinfo. Let’s examine our meta.wcsinfo values:
dm.meta.wcsinfo
{'aperture_name': 'WFI01_FULL', 'dec_ref': -0.16439949970729792, 'ra_ref': 270.8719766359773, 'roll_ref': 59.99991238605931, 's_region': 'POLYGON ICRS 270.934685540 -0.225734681 270.934628038 -0.102770925 270.809038197 -0.102466445 270.809760224 -0.225325590', 'v2_ref': 1312.9491452484797, 'v3_ref': -1040.7853726755036, 'v3yangle': -60.0, 'vparity': -1}
Let’s focus on the ra_ref, dec_ref, and roll_ref keywords. Let’s first take a look at the descriptions of these fields:
print(f"ra_ref = {dm.schema_info(path='roman.meta.wcsinfo.ra_ref')['description']}")
print(f"dec_ref = {dm.schema_info(path='roman.meta.wcsinfo.dec_ref')['description']}")
print(f"roll_ref = {dm.schema_info(path='roman.meta.wcsinfo.roll_ref')['description']}")
ra_ref = Right ascension of the reference pixel position on the
sky in units of degrees.
dec_ref = Declination of the reference pixel position on the sky
in units of degrees.
roll_ref = Position angle of the telescope V3 axis at the
reference pixel position measured from North to East. The
telescope V coordinate system is defined with its origin at the
vertex of the primary mirror. The +V3 axis is orthogonal to the
sunshield. See Roman-STScI-000143 "Description of the Roman SIAF
and Coordinate Frames" for more information.
The “reference pixel position” mentioned in these descriptions is located at the center of each WFI detector (each detector has its own WCS). We can edit these values to make the pipeline create a WCS solution that is slightly different from the original. Let’s make a copy of the data (for comparison later) and apply a simple shift of 1 arcsecond in right ascension:
original_ra_ref = copy.copy(dm.meta.wcsinfo.ra_ref)
dm.meta.wcsinfo.ra_ref += (1 / 3600)
print(f'Original ra_ref = {original_ra_ref},\nUpdated ra_ref = {dm.meta.wcsinfo.ra_ref}')
Original ra_ref = 270.8719766359773,
Updated ra_ref = 270.8722544137551
Next, let’s run AssignWcsStep on the data:
result = romancal.assign_wcs.AssignWcsStep.call(dm)
2026-07-22 21:51:11,353 - stpipe.step - INFO - AssignWcsStep instance created.
2026-07-22 21:51:11,541 - stpipe.step - INFO - Step AssignWcsStep running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ccd28fb00>,).
2026-07-22 21:51:11,543 - stpipe.step - INFO - Step AssignWcsStep parameters are:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
2026-07-22 21:51:11,544 - romancal.assign_wcs.assign_wcs_step - INFO - reftype, distortion
2026-07-22 21:51:11,547 - romancal.assign_wcs.assign_wcs_step - INFO - Using reference files: {'distortion': '/home/runner/crds_cache/references/roman/wfi/roman_wfi_distortion_0014.asdf'} for assign_wcs
2026-07-22 21:51:11,604 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 270.934962807 -0.225734417 270.934905036 -0.102770948 270.809314973 -0.102466475 270.810037271 -0.225325334
2026-07-22 21:51:11,605 - romancal.assign_wcs.assign_wcs - INFO - S_REGION VALUES: POLYGON ICRS 270.934962807 -0.225734417 270.934905036 -0.102770948 270.809314973 -0.102466475 270.810037271 -0.225325334
2026-07-22 21:51:11,605 - romancal.assign_wcs.assign_wcs - INFO - Update S_REGION to POLYGON ICRS 270.934962807 -0.225734417 270.934905036 -0.102770948 270.809314973 -0.102466475 270.810037271 -0.225325334
2026-07-22 21:51:13,420 - romancal.stpipe.core - INFO - Results used CRDS context: roman_0058.pmap
2026-07-22 21:51:13,420 - stpipe.step - INFO - Step AssignWcsStep done
Let’s now verify whether the coordinate system has changed as expected by comparing the right ascension and declination of a given pixel in the two WCS reference systems. For simplicity, we’ll use the center of the L2 image, which corresponds to (x, y) = (2043.5, 2043.5) in 0-indexed pixels. The corresponding sky coordinates can be easily obtained using astropy.coordinates.SkyCoord objects:
# Get SkyCoord object for new position at center of detector
ra, dec = result.meta.wcs(2043.5, 2043.5)
result_coord = SkyCoord(ra=ra, dec=dec, unit='deg')
result_coord
# Get SkyCoord object for original position at center of detector
ra0, dec0 = original_wcs(2043.5, 2043.5)
original_coord = SkyCoord(ra=ra0, dec=dec0, unit='deg')
original_coord
# Compute the separation between the updated and original positions
result_coord.separation(original_coord)
As we can see, the newly updated WCS is shifted by approximately 1 arcsecond relative to the WCS in the original L2 file. The offset is not exactly 1 arcsecond because the WFI pixel grid is slightly rotated with respect to the celestial coordinate system. In other words, the detector axes are not perfectly aligned with the vertical (declination) and horizontal (right ascension) directions on the sky.
As in our pipeline example above, we can also pass optional arguments to individual steps. This is useful if we want to use our own version, or an older version, of a reference file.
Reference Files#
As mentioned above, several of the pipeline steps apply reference files to the data to correct for specific detectors’ effects. Common examples of reference files applied during the processing of imaging data include the Bad Pixel Mask, Dark, and Flat. More information on WFI reference file types can be found in the RDox article CRDS for Reference Files.
As you run the exposure pipeline, the most up-to-date reference files will be automatically selected for each step. However, if you would like to use a specific reference file, these can be retrieved through the crds Python API and the ELP run with those files (more on that later). Let’s begin with how to access reference files from CRDS.
The notebook Understanding CRDS and How to Select Calibration Reference files provides information on how to identify and download reference files by name. Once available we can override RomanCal to use these reference files.
How to Override RomanCal with Local Reference Files#
If you have a local reference file that you would like to use in RomanCal processing, either one you retrieved from CRDS or one that you made yourself, then you can supply that when you run the ELP as an optional argument. The new reference file you indicate will override the CRDS best reference file selection from the server. Each reference file type has its own override parameter name (e.g., override_mask) and must be passed as arguments to the relevant step. Let’s look at an example now where we run the pipeline and override the mask and flat files. First, we need new reference files to use. For this example, let’s run crds.getreferences() and get new files for a different set of observation parameters, and then we can use those to override the best references. Our example is generally a bad idea, but for real applications you will likely already have a file on your disk storage that you want to use. Our example is to show how to override the reference file selection.
For our example, we will process a WFI01 L1 file with the ELP, but we will override the mask and flat files to be those from WFI04. Again, this is not recommended but simply designed to show how to override the reference file selection used by the pipeline if you have your own calibration reference files you want to use.
Note: In romancal version 0.20.2 (August 2025), there is a bug when overriding reference files. Please make sure to disable the source catalog and tweakreg steps (as shown below) when overriding reference files to bypass this bug. This bug is already fixed in the next romancal version (0.21.0; November 2025), which is undergoing testing and validation.
meta = {'ROMAN.META.INSTRUMENT.NAME': 'WFI',
'ROMAN.META.INSTRUMENT.DETECTOR': 'WFI04',
'ROMAN.META.INSTRUMENT.OPTICAL_ELEMENT': 'F158',
'ROMAN.META.EXPOSURE.TYPE': 'WFI_IMAGE',
'ROMAN.META.EXPOSURE.START_TIME': '2026-01-01 00:00:00'
}
ref_files = crds.getreferences(meta, reftypes=['dark'], observatory='roman')
print(ref_files)
{'dark': '/home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0628.asdf'}
result = ExposurePipeline.call(dm_l1, save_results=False, steps={
'source_catalog': {'skip': True},
'tweakreg': {'skip': True},
'dark_current': {'override_dark': ref_files['dark']}})
2026-07-22 21:51:13,460 - stpipe.step - INFO - ExposurePipeline instance created.
2026-07-22 21:51:13,461 - stpipe.step - INFO - DQInitStep instance created.
2026-07-22 21:51:13,462 - stpipe.step - INFO - SaturationStep instance created.
2026-07-22 21:51:13,463 - stpipe.step - INFO - RefPixStep instance created.
2026-07-22 21:51:13,464 - stpipe.step - INFO - DarkDecayStep instance created.
2026-07-22 21:51:13,465 - stpipe.step - INFO - WFI18TransientStep instance created.
2026-07-22 21:51:13,466 - stpipe.step - INFO - LinearityStep instance created.
2026-07-22 21:51:13,467 - stpipe.step - INFO - DarkCurrentStep instance created.
2026-07-22 21:51:13,468 - stpipe.step - INFO - RampFitStep instance created.
2026-07-22 21:51:13,470 - stpipe.step - INFO - AssignWcsStep instance created.
2026-07-22 21:51:13,470 - stpipe.step - INFO - FlatFieldStep instance created.
2026-07-22 21:51:13,471 - stpipe.step - INFO - PhotomStep instance created.
2026-07-22 21:51:13,472 - stpipe.step - INFO - SourceCatalogStep instance created.
2026-07-22 21:51:13,474 - stpipe.step - INFO - TweakRegStep instance created.
2026-07-22 21:51:13,657 - stpipe.step - INFO - Step ExposurePipeline running with args (<roman_datamodels.datamodels._datamodels.ScienceRawModel object at 0x7f4cce14f150>,).
2026-07-22 21:51:13,673 - stpipe.step - INFO - Step ExposurePipeline parameters are:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: cal
search_output_file: True
input_dir: ''
update_version: False
on_disk: False
steps:
dq_init:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
expand_gw_flagging: 0
saturation:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
n_pix_grow_sat: 0
backup: 0
refpix:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
remove_offset: True
remove_trends: True
cosine_interpolate: True
fft_interpolate: True
dark_decay:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
wfi18_transient:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
mask_rows: False
linearity:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
dark_current:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
rampfit:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: rampfit
search_output_file: True
input_dir: ''
update_version: False
algorithm: likely
rejection_threshold: 4.5
use_ramp_jump_detection: True
threshold_intercept: None
threshold_constant: None
include_var_rnoise: False
maximum_cores: '1'
expand_large_events: False
min_sat_area: 1.0
min_jump_area: 6.0
expand_factor: 1.9
sat_required_snowball: True
min_sat_radius_extend: 0.5
sat_expand: 2
edge_size: 0
assign_wcs:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
flatfield:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
include_var_flat: False
photom:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: False
suffix: None
search_output_file: True
input_dir: ''
update_version: False
source_catalog:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: False
output_use_index: True
save_results: False
skip: True
suffix: cat
search_output_file: True
input_dir: ''
update_version: False
bkg_boxsize: 1000
kernel_fwhm: 2.0
snr_threshold: 3.0
npixels: 25
deblend: False
fit_psf: True
forced_segmentation: ''
tweakreg:
pre_hooks: []
post_hooks: []
output_file: None
output_dir: None
output_ext: .asdf
output_use_model: True
output_use_index: True
save_results: False
skip: True
suffix: None
search_output_file: True
input_dir: ''
update_version: False
catalog_format: ascii.ecsv
catalog_path: ''
enforce_user_order: False
expand_refcat: False
minobj: 10
searchrad: 2.0
use2dhist: True
separation: 1.0
tolerance: 0.7
fitgeometry: general
nclip: 3
sigma: 3.0
abs_refcat: GAIADR3_S3
save_abs_catalog: False
abs_minobj: 10
abs_searchrad: 6.0
abs_use2dhist: True
abs_separation: 1.0
abs_tolerance: 0.7
abs_fitgeometry: general
abs_nclip: 3
abs_sigma: 3.0
update_source_catalog_coordinates: False
vo_timeout: 1200.0
2026-07-22 21:51:13,674 - stpipe.pipeline - INFO - Prefetching reference files for dataset: 'r0003201001001001004_0001_wfi01_f106_uncal.asdf' reftypes = ['darkdecaysignal', 'distortion', 'flat', 'gain', 'integralnonlinearity', 'inverselinearity', 'linearity', 'mask', 'photom', 'readnoise', 'refpix', 'saturation']
2026-07-22 21:51:13,678 - stpipe.pipeline - INFO - Override for DARK reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0628.asdf'.
2026-07-22 21:51:13,679 - stpipe.pipeline - INFO - Prefetch for DARKDECAYSIGNAL reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_darkdecaysignal_0001.asdf'.
2026-07-22 21:51:13,680 - stpipe.pipeline - INFO - Prefetch for DISTORTION reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_distortion_0014.asdf'.
2026-07-22 21:51:13,680 - stpipe.pipeline - INFO - Prefetch for FLAT reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_flat_0175.asdf'.
2026-07-22 21:51:13,681 - stpipe.pipeline - INFO - Prefetch for GAIN reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_gain_0022.asdf'.
2026-07-22 21:51:13,681 - stpipe.pipeline - INFO - Prefetch for INTEGRALNONLINEARITY reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_integralnonlinearity_0003.asdf'.
2026-07-22 21:51:13,682 - stpipe.pipeline - INFO - Prefetch for INVERSELINEARITY reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_inverselinearity_0042.asdf'.
2026-07-22 21:51:13,682 - stpipe.pipeline - INFO - Prefetch for LINEARITY reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_linearity_0039.asdf'.
2026-07-22 21:51:13,683 - stpipe.pipeline - INFO - Prefetch for MASK reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_mask_0030.asdf'.
2026-07-22 21:51:13,684 - stpipe.pipeline - INFO - Prefetch for PHOTOM reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_photom_0040.asdf'.
2026-07-22 21:51:13,684 - stpipe.pipeline - INFO - Prefetch for READNOISE reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_readnoise_0024.asdf'.
2026-07-22 21:51:13,685 - stpipe.pipeline - INFO - Prefetch for REFPIX reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_refpix_0013.asdf'.
2026-07-22 21:51:13,685 - stpipe.pipeline - INFO - Prefetch for SATURATION reference file is '/home/runner/crds_cache/references/roman/wfi/roman_wfi_saturation_0031.asdf'.
2026-07-22 21:51:13,686 - romancal.pipeline.exposure_pipeline - INFO - Starting Roman exposure calibration pipeline ...
2026-07-22 21:51:13,859 - stpipe.step - INFO - Step dq_init running with args (<roman_datamodels.datamodels._datamodels.ScienceRawModel object at 0x7f4cce14f150>,).
2026-07-22 21:51:13,914 - romancal.dq_init.dq_initialization - INFO - Invalid guide window location: -999999, -999983, -999999, -999983
2026-07-22 21:51:13,945 - stpipe.step - INFO - Step dq_init done
2026-07-22 21:51:14,128 - stpipe.step - INFO - Step saturation running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ca5667880>,).
2026-07-22 21:51:14,131 - romancal.saturation.saturation_step - INFO - Using SATURATION reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_saturation_0031.asdf
2026-07-22 21:51:15,283 - stcal.saturation.saturation - INFO - Detected 77254 saturated pixels
2026-07-22 21:51:15,321 - stcal.saturation.saturation - INFO - Detected 65549 A/D floor pixels
2026-07-22 21:51:15,334 - stpipe.step - INFO - Step saturation done
2026-07-22 21:51:15,539 - stpipe.step - INFO - Step refpix running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ca5667880>,).
2026-07-22 21:51:15,998 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/romancal/refpix/_data.py:398: RuntimeWarning: invalid value encountered in divide
kern = (cov / mask_conv).reshape(rows, columns)
2026-07-22 21:51:17,663 - stpipe.step - INFO - Step refpix done
2026-07-22 21:51:17,843 - stpipe.step - INFO - Step dark_decay running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ca5667880>,).
2026-07-22 21:51:17,845 - romancal.dark_decay.dark_decay_step - INFO - Using DARKDECAYSIGNAL reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_darkdecaysignal_0001.asdf
2026-07-22 21:51:17,856 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_darkdecaysignal_0001.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:51:21,524 - stpipe.step - INFO - Step dark_decay done
2026-07-22 21:51:21,711 - stpipe.step - INFO - Step wfi18_transient running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ca5667880>,).
2026-07-22 21:51:21,713 - stpipe.step - INFO - Step wfi18_transient done
2026-07-22 21:51:21,897 - stpipe.step - INFO - Step linearity running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ca5667880>,).
2026-07-22 21:51:21,902 - romancal.linearity.linearity_step - INFO - Using LINEARITY reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_linearity_0039.asdf
2026-07-22 21:51:21,903 - romancal.linearity.linearity_step - INFO - Using INVERSELINEARITY reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_inverselinearity_0042.asdf
2026-07-22 21:51:21,904 - romancal.linearity.linearity_step - INFO - Using INTEGRALNONLINEARITY reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_integralnonlinearity_0003.asdf
2026-07-22 21:51:21,930 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_integralnonlinearity_0003.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:51:21,952 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_linearity_0039.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.0.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:51:21,967 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_inverselinearity_0042.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.0.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:51:23,796 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/stcal/linearity/linearity.py:494: RuntimeWarning: overflow encountered in cast
data[i] = np.where(resultant_saturated, data[i], corrected_resultant)
2026-07-22 21:51:41,356 - romancal.linearity.linearity_step - WARNING - Flagged 282 spurious values outside remotely plausible range.
2026-07-22 21:51:41,362 - stpipe.step - INFO - Step linearity done
2026-07-22 21:51:41,533 - stpipe.step - INFO - Step rampfit running with args (<roman_datamodels.datamodels._datamodels.RampModel object at 0x7f4ca5667880>,).
2026-07-22 21:51:41,537 - romancal.ramp_fitting.ramp_fit_step - INFO - Using READNOISE reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_readnoise_0024.asdf
2026-07-22 21:51:41,552 - romancal.ramp_fitting.ramp_fit_step - INFO - Using GAIN reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_gain_0022.asdf
2026-07-22 21:51:41,566 - romancal.ramp_fitting.ramp_fit_step - INFO - Number of resultants: 5
2026-07-22 21:52:29,092 - romancal.ramp_fitting.ramp_fit_step - INFO - Number of resultants: 5
2026-07-22 21:52:29,318 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/romancal/ramp_fitting/ramp_fit_step.py:460: RuntimeWarning: overflow encountered in cast
im.dumo = (slopes_alt[4:-4, 4:-4] - im.data).astype("float16")
2026-07-22 21:52:30,120 - stpipe.step - INFO - Step rampfit done
2026-07-22 21:52:30,304 - stpipe.step - INFO - Step dark_current running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ca56f2e80>,).
2026-07-22 21:52:30,305 - romancal.dark_current.dark_current_step - INFO - Using DARK reference file: /home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0628.asdf
2026-07-22 21:52:30,322 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/asdf/_asdf.py:274: AsdfPackageVersionWarning: File 'file:///home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0628.asdf'was created with extension URI 'asdf://stsci.edu/datamodels/roman/extensions/static-1.1.0' (from package roman_datamodels==0.27.0), which is not currently installed
warnings.warn(msg, AsdfPackageVersionWarning)
2026-07-22 21:52:31,009 - stpipe.step - INFO - Step dark_current done
2026-07-22 21:52:31,196 - stpipe.step - INFO - Step assign_wcs running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ca56f2e80>,).
2026-07-22 21:52:31,197 - romancal.assign_wcs.assign_wcs_step - INFO - reftype, distortion
2026-07-22 21:52:31,200 - romancal.assign_wcs.assign_wcs_step - INFO - Using reference files: {'distortion': '/home/runner/crds_cache/references/roman/wfi/roman_wfi_distortion_0014.asdf'} for assign_wcs
2026-07-22 21:52:31,259 - stcal.alignment.util - INFO - Update S_REGION to POLYGON ICRS 270.934685029 -0.225734417 270.934627258 -0.102770948 270.809037196 -0.102466475 270.809759493 -0.225325334
2026-07-22 21:52:31,260 - romancal.assign_wcs.assign_wcs - INFO - S_REGION VALUES: POLYGON ICRS 270.934685029 -0.225734417 270.934627258 -0.102770948 270.809037196 -0.102466475 270.809759493 -0.225325334
2026-07-22 21:52:31,260 - romancal.assign_wcs.assign_wcs - INFO - Update S_REGION to POLYGON ICRS 270.934685029 -0.225734417 270.934627258 -0.102770948 270.809037196 -0.102466475 270.809759493 -0.225325334
2026-07-22 21:52:31,922 - stpipe.step - INFO - Step assign_wcs done
2026-07-22 21:52:32,098 - stpipe.step - INFO - Step photom running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ca56f2e80>,).
2026-07-22 21:52:32,116 - romancal.photom.photom - INFO - photmjsr value: 0.7417487930165987
2026-07-22 21:52:32,116 - romancal.photom.photom - INFO - uncertainty value: 0.028857321159254122
2026-07-22 21:52:32,773 - stpipe.step - INFO - Step photom done
2026-07-22 21:52:32,949 - stpipe.step - INFO - Step flatfield running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ca56f2e80>,).
2026-07-22 21:52:33,374 - py.warnings - WARNING - /home/runner/micromamba/envs/ci-env/lib/python3.12/site-packages/romancal/flatfield/flat_field.py:91: RuntimeWarning: overflow encountered in divide
science.var_poisson /= flat_data_squared
2026-07-22 21:52:34,238 - stpipe.step - INFO - Step flatfield done
2026-07-22 21:52:34,413 - stpipe.step - INFO - Step source_catalog running with args (<roman_datamodels.datamodels._datamodels.ImageModel object at 0x7f4ca56f2e80>,).
2026-07-22 21:52:34,413 - stpipe.step - INFO - Step skipped.
2026-07-22 21:52:35,360 - stpipe.step - INFO - Step tweakreg running with args (<romancal.datamodels.library.ModelLibrary object at 0x7f4cdc1ac050>,).
2026-07-22 21:52:35,361 - stpipe.step - INFO - Step skipped.
2026-07-22 21:52:36,124 - romancal.pipeline.exposure_pipeline - INFO - Roman exposure calibration pipeline ending...
2026-07-22 21:52:36,886 - stpipe.step - INFO - Step ExposurePipeline done
Now let’s take a look at our result variable, which is our L2 datamodel in memory. Specifically, we can check the meta.ref_file section to see the names of the reference files used:
for k, v in result.meta.ref_file.items():
print(f'{k} = {v}')
apcorr = ?
area = ?
crds = {'context': 'roman_0058.pmap', 'version': '13.2.7'}
dark = /home/runner/crds_cache/references/roman/wfi/roman_wfi_dark_0628.asdf
darkdecaysignal = crds://roman_wfi_darkdecaysignal_0001.asdf
distortion = crds://roman_wfi_distortion_0014.asdf
epsf = ?
flat = crds://roman_wfi_flat_0175.asdf
gain = crds://roman_wfi_gain_0022.asdf
integralnonlinearity = crds://roman_wfi_integralnonlinearity_0003.asdf
inverselinearity = crds://roman_wfi_inverselinearity_0042.asdf
linearity = crds://roman_wfi_linearity_0039.asdf
mask = crds://roman_wfi_mask_0030.asdf
photom = crds://roman_wfi_photom_0040.asdf
readnoise = crds://roman_wfi_readnoise_0024.asdf
refpix = crds://roman_wfi_refpix_0013.asdf
saturation = crds://roman_wfi_saturation_0031.asdf
Indeed, we see that many of the files used came from CRDS (note the file names begin with “crds://”) whereas the flat and mask files contain a local path to the files we selected.
About this Notebook#
Author: T. Desjardins & R. Diaz
Updated On: 2026-07-06
| Top of page |
|
|