MRS Pipeline#
Use case: Extract spatial-spectral features from IFU cube and measure their attributes.
Data: Simulated MIRI MRS spectrum of AGB star.
Tools: specutils, jwst, photutils, astropy, aplpy, scipy.
Cross-intrument: NIRSpec, MIRI.
Documentation: This notebook is part of a STScI’s larger post-pipeline Data Analysis Tools Ecosystem and can be downloaded directly from the JDAT Notebook Github directory.
Source of Simulations: MIRISim
Pipeline Version: JWST Pipeline
Note: This notebook includes MIRI simulated data cubes obtained using MIRISim (https://wiki.miricle.org//bin/view/Public/MIRISim_Public) and run through the JWST pipeline (https://jwst-pipeline.readthedocs.io/en/latest/) of point sources with spectra representative of late M type stars.
Introduction#
This notebook analyzes one star represented by a dusty SED corresponding to the ISO SWS spectrum of W Per from Kraemer et al. (2002) and Sloan et al. (2003) to cover the MRS spectral range 5-28 microns. Analysis of JWST spectral cubes requires extracting spatial-spectral features of interest and measuring their attributes.
This is the first notebook, which will process the data and automatically detect and extract spectra for the point source. The workflow will use photutils
to automatically detect sources in the cube to extract the spectrum of the point source. Then it will read in the spectra generated at Stage 3 of the JWST pipeline.
Import Packages#
# Import useful python packages
import numpy as np
# Import packages to display images inline in the notebook
import matplotlib.pyplot as plt
%matplotlib inline
# Set general plotting options
params = {'legend.fontsize': '18', 'axes.labelsize': '18',
'axes.titlesize': '18', 'xtick.labelsize': '18',
'ytick.labelsize': '18', 'lines.linewidth': 2, 'axes.linewidth': 2, 'animation.html': 'html5'}
plt.rcParams.update(params)
plt.rcParams.update({'figure.max_open_warning': 0})
import warnings
warnings.simplefilter('ignore')
# Import astropy packages
from astropy import units as u
from astropy.io import ascii
from astropy.wcs import WCS
from astropy.table import Table, vstack
from astropy.stats import sigma_clipped_stats
from astropy.nddata import StdDevUncertainty
from astropy.io import fits # added by BAS on 8 April 2021
from astropy.utils.data import get_pkg_data_filename
# To find stars in the MRS spectralcubes and do aperture photometry
from photutils.aperture import CircularAperture
from photutils.detection import DAOStarFinder
# To deal with 1D spectrum
from specutils import Spectrum1D
from specutils.fitting import fit_generic_continuum
from specutils.manipulation import box_smooth, extract_region, SplineInterpolatedResampler
from specutils.analysis import line_flux, centroid, equivalent_width
from specutils.spectra import SpectralRegion
from specutils import SpectrumList
# To fit a curve to the data
from scipy.optimize import curve_fit
import os
Set paths to the Data and Outputs#
Use MIRISim JWST pipeline processed data in future iterations.
os.environ['CRDS_PATH'] = os.environ['HOME']+'/crds_cache'
os.environ['CRDS_SERVER_URL'] = 'https://jwst-crds-pub.stsci.edu'
# import pipeline
from jwst.pipeline import Detector1Pipeline
from jwst.pipeline import Spec2Pipeline
from jwst.pipeline import Spec3Pipeline
from jwst.extract_1d import Extract1dStep
import json
import glob
from jwst.associations.lib.rules_level3_base import DMS_Level3_Base
from jwst.associations import asn_from_list
import crds
from jdaviz.app import Application
import asdf
from photutils import aperture_photometry
import os
# Download data if you don't already have it.
import urllib.request
if os.path.exists("20210413_120546_mirisim.tar.gz"):
print("20210413_120546_mirisim.tar.gz Exists")
else:
url = 'https://data.science.stsci.edu/redirect/JWST/jwst-data_analysis_tools/MRS_Mstar_analysis/20210413_120546_mirisim.tar.gz'
urllib.request.urlretrieve(url, './20210413_120546_mirisim.tar.gz')
if os.path.exists("20210413_123047_mirisim.tar.gz"):
print("20210413_123047_mirisim.tar.gz Exists")
else:
url = 'https://data.science.stsci.edu/redirect/JWST/jwst-data_analysis_tools/MRS_Mstar_analysis/20210413_123047_mirisim.tar.gz'
urllib.request.urlretrieve(url, './20210413_123047_mirisim.tar.gz')
if os.path.exists("20210413_125354_mirisim.tar.gz"):
print("20210413_125354_mirisim.tar.gz Exists")
else:
url = 'https://data.science.stsci.edu/redirect/JWST/jwst-data_analysis_tools/MRS_Mstar_analysis/20210413_125354_mirisim.tar.gz'
urllib.request.urlretrieve(url, './20210413_125354_mirisim.tar.gz')
# Unzip Tar Files
import tarfile
# Unzip files if they haven't already been unzipped
if os.path.exists("20210413_120546_mirisim/"):
print("20210413_120546_mirisim Exists")
else:
tar = tarfile.open('./20210413_120546_mirisim.tar.gz', "r:gz")
tar.extractall()
tar.close()
if os.path.exists("20210413_123047_mirisim/"):
print("20210413_123047_mirisim Exists")
else:
tar = tarfile.open('./20210413_123047_mirisim.tar.gz', "r:gz")
tar.extractall()
tar.close()
if os.path.exists("20210413_125354_mirisim/"):
print("20210413_125354_mirisim Exists")
else:
tar = tarfile.open('./20210413_125354_mirisim.tar.gz', "r:gz")
tar.extractall()
tar.close()
Run Pipeline#
The various stages of the pipeline can be run within Python. For a more in depth tutorial on running the pipelines, check out the JWebbinars.
# Execute calwebb_detector1 pipeline on raw simulation output. This will overwrite previous reductions.
allshortfiles = glob.glob('20210413_*_mirisim/det_images/*MIRIFUSHORT*fits')
alllongfiles = glob.glob('20210413_*_mirisim/det_images/*MIRIFULONG*fits')
pipe1short = Detector1Pipeline()
# run calwebb_detector1 on the MIRIFUSHORT data separate from MIRIFULONG data, as it saves time this way
for shortfile in allshortfiles:
print(shortfile)
baseshort, remaindershort = shortfile.split('.')
# If you run your own simulations, you will need to update these hardcoded files.
beforestuffshort, dateafterstuffshort = shortfile.split('20210413_')
datestringshort, afterstuffshort = dateafterstuffshort.split('_mirisim')
pipe1short.refpix.skip = True
pipe1short.output_file = baseshort + datestringshort
pipe1short.run(shortfile)
pipe1long = Detector1Pipeline()
for longfile in alllongfiles:
print(longfile)
baselong, remainderlong = longfile.split('.')
# If you run your own simulations, you will need to update these hardcoded files.
beforestufflong, dateafterstufflong = longfile.split('20210413_')
datestringlong, afterstufflong = dateafterstufflong.split('_mirisim')
pipe1long.refpix.skip = True
pipe1long.output_file = baselong + datestringlong
pipe1long.run(longfile)
20210413_120546_mirisim/det_images/det_image_seq1_MIRIFUSHORT_12SHORTexp1.fits
2023-09-20 19:09:07,408 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_system_datalvl_0002.rmap 694 bytes (1 / 179 files) (0 / 578.7 K bytes)
2023-09-20 19:09:07,667 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_system_calver_0031.rmap 3.8 K bytes (2 / 179 files) (694 / 578.7 K bytes)
2023-09-20 19:09:07,887 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_system_0030.imap 385 bytes (3 / 179 files) (4.5 K / 578.7 K bytes)
2023-09-20 19:09:08,150 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_wavelengthrange_0020.rmap 1.5 K bytes (4 / 179 files) (4.9 K / 578.7 K bytes)
2023-09-20 19:09:08,353 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_wavecorr_0005.rmap 884 bytes (5 / 179 files) (6.4 K / 578.7 K bytes)
2023-09-20 19:09:08,537 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_superbias_0052.rmap 29.8 K bytes (6 / 179 files) (7.2 K / 578.7 K bytes)
2023-09-20 19:09:08,804 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_sflat_0021.rmap 20.6 K bytes (7 / 179 files) (37.0 K / 578.7 K bytes)
2023-09-20 19:09:09,050 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_saturation_0018.rmap 2.0 K bytes (8 / 179 files) (57.6 K / 578.7 K bytes)
2023-09-20 19:09:09,196 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_refpix_0015.rmap 1.6 K bytes (9 / 179 files) (59.6 K / 578.7 K bytes)
2023-09-20 19:09:09,364 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_readnoise_0020.rmap 2.3 K bytes (10 / 179 files) (61.2 K / 578.7 K bytes)
2023-09-20 19:09:09,520 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_photom_0013.rmap 958 bytes (11 / 179 files) (63.6 K / 578.7 K bytes)
2023-09-20 19:09:09,751 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_pathloss_0004.rmap 983 bytes (12 / 179 files) (64.5 K / 578.7 K bytes)
2023-09-20 19:09:10,007 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_pars-whitelightstep_0001.rmap 777 bytes (13 / 179 files) (65.5 K / 578.7 K bytes)
2023-09-20 19:09:10,149 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_pars-spec2pipeline_0013.rmap 2.1 K bytes (14 / 179 files) (66.3 K / 578.7 K bytes)
2023-09-20 19:09:10,291 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_pars-image2pipeline_0008.rmap 1.0 K bytes (15 / 179 files) (68.4 K / 578.7 K bytes)
2023-09-20 19:09:10,491 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_pars-detector1pipeline_0003.rmap 1.1 K bytes (16 / 179 files) (69.4 K / 578.7 K bytes)
2023-09-20 19:09:10,640 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_pars-darkpipeline_0003.rmap 872 bytes (17 / 179 files) (70.4 K / 578.7 K bytes)
2023-09-20 19:09:10,784 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_ote_0027.rmap 1.2 K bytes (18 / 179 files) (71.3 K / 578.7 K bytes)
2023-09-20 19:09:10,934 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_msaoper_0007.rmap 1.1 K bytes (19 / 179 files) (72.5 K / 578.7 K bytes)
2023-09-20 19:09:11,093 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_msa_0025.rmap 1.2 K bytes (20 / 179 files) (73.6 K / 578.7 K bytes)
2023-09-20 19:09:11,281 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_mask_0027.rmap 1.9 K bytes (21 / 179 files) (74.8 K / 578.7 K bytes)
2023-09-20 19:09:11,426 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_linearity_0017.rmap 1.6 K bytes (22 / 179 files) (76.7 K / 578.7 K bytes)
2023-09-20 19:09:11,638 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_ipc_0006.rmap 876 bytes (23 / 179 files) (78.3 K / 578.7 K bytes)
2023-09-20 19:09:11,851 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_ifuslicer_0015.rmap 1.5 K bytes (24 / 179 files) (79.2 K / 578.7 K bytes)
2023-09-20 19:09:11,995 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_ifupost_0017.rmap 1.4 K bytes (25 / 179 files) (80.6 K / 578.7 K bytes)
2023-09-20 19:09:12,150 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_ifufore_0015.rmap 1.4 K bytes (26 / 179 files) (82.1 K / 578.7 K bytes)
2023-09-20 19:09:12,299 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_gain_0022.rmap 1.8 K bytes (27 / 179 files) (83.5 K / 578.7 K bytes)
2023-09-20 19:09:12,447 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_fpa_0026.rmap 1.2 K bytes (28 / 179 files) (85.3 K / 578.7 K bytes)
2023-09-20 19:09:12,606 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_fore_0024.rmap 4.5 K bytes (29 / 179 files) (86.5 K / 578.7 K bytes)
2023-09-20 19:09:12,805 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_flat_0015.rmap 3.8 K bytes (30 / 179 files) (91.0 K / 578.7 K bytes)
2023-09-20 19:09:12,955 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_fflat_0015.rmap 7.2 K bytes (31 / 179 files) (94.8 K / 578.7 K bytes)
2023-09-20 19:09:13,119 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_extract1d_0015.rmap 2.2 K bytes (32 / 179 files) (102.0 K / 578.7 K bytes)
2023-09-20 19:09:13,311 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_disperser_0026.rmap 5.1 K bytes (33 / 179 files) (104.2 K / 578.7 K bytes)
2023-09-20 19:09:13,505 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_dflat_0007.rmap 1.1 K bytes (34 / 179 files) (109.3 K / 578.7 K bytes)
2023-09-20 19:09:13,659 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_dark_0048.rmap 28.5 K bytes (35 / 179 files) (110.5 K / 578.7 K bytes)
2023-09-20 19:09:13,974 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_cubepar_0011.rmap 966 bytes (36 / 179 files) (138.9 K / 578.7 K bytes)
2023-09-20 19:09:14,117 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_collimator_0024.rmap 1.3 K bytes (37 / 179 files) (139.9 K / 578.7 K bytes)
2023-09-20 19:09:14,258 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_camera_0024.rmap 1.2 K bytes (38 / 179 files) (141.2 K / 578.7 K bytes)
2023-09-20 19:09:14,441 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_barshadow_0004.rmap 928 bytes (39 / 179 files) (142.4 K / 578.7 K bytes)
2023-09-20 19:09:14,597 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_area_0017.rmap 6.3 K bytes (40 / 179 files) (143.3 K / 578.7 K bytes)
2023-09-20 19:09:14,758 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_apcorr_0010.rmap 5.6 K bytes (41 / 179 files) (149.6 K / 578.7 K bytes)
2023-09-20 19:09:14,920 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nirspec_0293.imap 5.1 K bytes (42 / 179 files) (155.1 K / 578.7 K bytes)
2023-09-20 19:09:15,071 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_wfssbkg_0007.rmap 3.1 K bytes (43 / 179 files) (160.2 K / 578.7 K bytes)
2023-09-20 19:09:15,219 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_wavemap_0008.rmap 2.2 K bytes (44 / 179 files) (163.3 K / 578.7 K bytes)
2023-09-20 19:09:15,367 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_wavelengthrange_0006.rmap 862 bytes (45 / 179 files) (165.6 K / 578.7 K bytes)
2023-09-20 19:09:15,573 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_trappars_0004.rmap 753 bytes (46 / 179 files) (166.4 K / 578.7 K bytes)
2023-09-20 19:09:15,776 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_trapdensity_0004.rmap 774 bytes (47 / 179 files) (167.2 K / 578.7 K bytes)
2023-09-20 19:09:15,925 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_throughput_0004.rmap 979 bytes (48 / 179 files) (168.0 K / 578.7 K bytes)
2023-09-20 19:09:16,087 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_superbias_0024.rmap 7.2 K bytes (49 / 179 files) (168.9 K / 578.7 K bytes)
2023-09-20 19:09:16,233 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_specwcs_0010.rmap 3.1 K bytes (50 / 179 files) (176.2 K / 578.7 K bytes)
2023-09-20 19:09:16,424 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_spectrace_0008.rmap 2.3 K bytes (51 / 179 files) (179.3 K / 578.7 K bytes)
2023-09-20 19:09:16,568 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_specprofile_0008.rmap 2.4 K bytes (52 / 179 files) (181.6 K / 578.7 K bytes)
2023-09-20 19:09:16,710 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_speckernel_0006.rmap 1.0 K bytes (53 / 179 files) (184.0 K / 578.7 K bytes)
2023-09-20 19:09:16,901 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_saturation_0014.rmap 761 bytes (54 / 179 files) (185.1 K / 578.7 K bytes)
2023-09-20 19:09:17,045 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_readnoise_0011.rmap 987 bytes (55 / 179 files) (185.8 K / 578.7 K bytes)
2023-09-20 19:09:17,239 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_photom_0033.rmap 1.2 K bytes (56 / 179 files) (186.8 K / 578.7 K bytes)
2023-09-20 19:09:17,423 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_persat_0005.rmap 738 bytes (57 / 179 files) (188.0 K / 578.7 K bytes)
2023-09-20 19:09:17,567 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_pathloss_0003.rmap 758 bytes (58 / 179 files) (188.7 K / 578.7 K bytes)
2023-09-20 19:09:17,711 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_pars-tweakregstep_0005.rmap 3.1 K bytes (59 / 179 files) (189.5 K / 578.7 K bytes)
2023-09-20 19:09:17,865 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_pars-spec2pipeline_0008.rmap 984 bytes (60 / 179 files) (192.6 K / 578.7 K bytes)
2023-09-20 19:09:18,033 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_pars-sourcecatalogstep_0001.rmap 668 bytes (61 / 179 files) (193.6 K / 578.7 K bytes)
2023-09-20 19:09:18,182 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_pars-outlierdetectionstep_0004.rmap 2.7 K bytes (62 / 179 files) (194.3 K / 578.7 K bytes)
2023-09-20 19:09:18,325 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_pars-jumpstep_0003.rmap 4.5 K bytes (63 / 179 files) (196.9 K / 578.7 K bytes)
2023-09-20 19:09:18,474 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_pars-image2pipeline_0005.rmap 1.0 K bytes (64 / 179 files) (201.4 K / 578.7 K bytes)
2023-09-20 19:09:18,631 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_pars-detector1pipeline_0002.rmap 1.0 K bytes (65 / 179 files) (202.4 K / 578.7 K bytes)
2023-09-20 19:09:18,780 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_pars-darkpipeline_0002.rmap 868 bytes (66 / 179 files) (203.5 K / 578.7 K bytes)
2023-09-20 19:09:18,925 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_mask_0019.rmap 797 bytes (67 / 179 files) (204.3 K / 578.7 K bytes)
2023-09-20 19:09:19,072 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_linearity_0020.rmap 894 bytes (68 / 179 files) (205.1 K / 578.7 K bytes)
2023-09-20 19:09:19,274 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_ipc_0007.rmap 651 bytes (69 / 179 files) (206.0 K / 578.7 K bytes)
2023-09-20 19:09:19,424 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_gain_0011.rmap 797 bytes (70 / 179 files) (206.7 K / 578.7 K bytes)
2023-09-20 19:09:19,569 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_flat_0021.rmap 5.9 K bytes (71 / 179 files) (207.5 K / 578.7 K bytes)
2023-09-20 19:09:19,724 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_filteroffset_0006.rmap 844 bytes (72 / 179 files) (213.3 K / 578.7 K bytes)
2023-09-20 19:09:19,896 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_extract1d_0007.rmap 905 bytes (73 / 179 files) (214.2 K / 578.7 K bytes)
2023-09-20 19:09:20,054 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_drizpars_0004.rmap 519 bytes (74 / 179 files) (215.1 K / 578.7 K bytes)
2023-09-20 19:09:20,257 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_distortion_0024.rmap 3.4 K bytes (75 / 179 files) (215.6 K / 578.7 K bytes)
2023-09-20 19:09:20,398 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_dark_0030.rmap 6.8 K bytes (76 / 179 files) (219.0 K / 578.7 K bytes)
2023-09-20 19:09:20,607 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_area_0014.rmap 2.7 K bytes (77 / 179 files) (225.8 K / 578.7 K bytes)
2023-09-20 19:09:20,754 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_apcorr_0006.rmap 4.3 K bytes (78 / 179 files) (228.5 K / 578.7 K bytes)
2023-09-20 19:09:20,903 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_abvegaoffset_0003.rmap 1.4 K bytes (79 / 179 files) (232.9 K / 578.7 K bytes)
2023-09-20 19:09:21,043 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_niriss_0204.imap 5.1 K bytes (80 / 179 files) (234.2 K / 578.7 K bytes)
2023-09-20 19:09:21,228 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_wfssbkg_0004.rmap 7.2 K bytes (81 / 179 files) (239.4 K / 578.7 K bytes)
2023-09-20 19:09:21,374 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_wavelengthrange_0010.rmap 996 bytes (82 / 179 files) (246.6 K / 578.7 K bytes)
2023-09-20 19:09:21,534 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_tsophot_0003.rmap 896 bytes (83 / 179 files) (247.5 K / 578.7 K bytes)
2023-09-20 19:09:21,692 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_trappars_0003.rmap 1.6 K bytes (84 / 179 files) (248.4 K / 578.7 K bytes)
2023-09-20 19:09:21,842 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_trapdensity_0003.rmap 1.6 K bytes (85 / 179 files) (250.0 K / 578.7 K bytes)
2023-09-20 19:09:21,989 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_superbias_0011.rmap 11.2 K bytes (86 / 179 files) (251.7 K / 578.7 K bytes)
2023-09-20 19:09:22,198 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_specwcs_0016.rmap 7.1 K bytes (87 / 179 files) (262.9 K / 578.7 K bytes)
2023-09-20 19:09:22,364 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_saturation_0008.rmap 2.2 K bytes (88 / 179 files) (270.0 K / 578.7 K bytes)
2023-09-20 19:09:22,517 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_readnoise_0015.rmap 18.6 K bytes (89 / 179 files) (272.2 K / 578.7 K bytes)
2023-09-20 19:09:22,705 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_psfmask_0007.rmap 11.0 K bytes (90 / 179 files) (290.8 K / 578.7 K bytes)
2023-09-20 19:09:22,851 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_photom_0014.rmap 5.0 K bytes (91 / 179 files) (301.8 K / 578.7 K bytes)
2023-09-20 19:09:23,049 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_persat_0005.rmap 1.6 K bytes (92 / 179 files) (306.8 K / 578.7 K bytes)
2023-09-20 19:09:23,193 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_pars-whitelightstep_0003.rmap 1.5 K bytes (93 / 179 files) (308.3 K / 578.7 K bytes)
2023-09-20 19:09:23,388 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_pars-tweakregstep_0003.rmap 4.5 K bytes (94 / 179 files) (309.8 K / 578.7 K bytes)
2023-09-20 19:09:23,554 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_pars-spec2pipeline_0008.rmap 984 bytes (95 / 179 files) (314.3 K / 578.7 K bytes)
2023-09-20 19:09:23,698 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_pars-sourcecatalogstep_0001.rmap 668 bytes (96 / 179 files) (315.3 K / 578.7 K bytes)
2023-09-20 19:09:23,857 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_pars-outlierdetectionstep_0003.rmap 940 bytes (97 / 179 files) (315.9 K / 578.7 K bytes)
2023-09-20 19:09:24,019 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_pars-image2pipeline_0003.rmap 1.0 K bytes (98 / 179 files) (316.9 K / 578.7 K bytes)
2023-09-20 19:09:24,207 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_pars-detector1pipeline_0002.rmap 1.0 K bytes (99 / 179 files) (317.9 K / 578.7 K bytes)
2023-09-20 19:09:24,349 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_pars-darkpipeline_0002.rmap 868 bytes (100 / 179 files) (318.9 K / 578.7 K bytes)
2023-09-20 19:09:24,505 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_mask_0010.rmap 2.9 K bytes (101 / 179 files) (319.8 K / 578.7 K bytes)
2023-09-20 19:09:24,645 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_linearity_0011.rmap 2.4 K bytes (102 / 179 files) (322.7 K / 578.7 K bytes)
2023-09-20 19:09:24,790 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_ipc_0003.rmap 2.0 K bytes (103 / 179 files) (325.1 K / 578.7 K bytes)
2023-09-20 19:09:24,955 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_gain_0016.rmap 2.1 K bytes (104 / 179 files) (327.1 K / 578.7 K bytes)
2023-09-20 19:09:25,108 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_flat_0020.rmap 51.6 K bytes (105 / 179 files) (329.2 K / 578.7 K bytes)
2023-09-20 19:09:25,331 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_filteroffset_0004.rmap 1.4 K bytes (106 / 179 files) (380.8 K / 578.7 K bytes)
2023-09-20 19:09:25,522 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_extract1d_0004.rmap 842 bytes (107 / 179 files) (382.2 K / 578.7 K bytes)
2023-09-20 19:09:25,677 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_drizpars_0001.rmap 519 bytes (108 / 179 files) (383.0 K / 578.7 K bytes)
2023-09-20 19:09:25,831 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_distortion_0028.rmap 25.5 K bytes (109 / 179 files) (383.6 K / 578.7 K bytes)
2023-09-20 19:09:26,019 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_dark_0042.rmap 22.9 K bytes (110 / 179 files) (409.1 K / 578.7 K bytes)
2023-09-20 19:09:26,218 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_area_0007.rmap 4.6 K bytes (111 / 179 files) (431.9 K / 578.7 K bytes)
2023-09-20 19:09:26,366 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_apcorr_0008.rmap 4.3 K bytes (112 / 179 files) (436.6 K / 578.7 K bytes)
2023-09-20 19:09:26,573 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_abvegaoffset_0002.rmap 1.3 K bytes (113 / 179 files) (440.8 K / 578.7 K bytes)
2023-09-20 19:09:26,717 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_nircam_0225.imap 5.0 K bytes (114 / 179 files) (442.1 K / 578.7 K bytes)
2023-09-20 19:09:26,862 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_wavelengthrange_0024.rmap 929 bytes (115 / 179 files) (447.1 K / 578.7 K bytes)
2023-09-20 19:09:27,012 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_tsophot_0003.rmap 882 bytes (116 / 179 files) (448.1 K / 578.7 K bytes)
2023-09-20 19:09:27,163 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_straymask_0008.rmap 987 bytes (117 / 179 files) (448.9 K / 578.7 K bytes)
2023-09-20 19:09:27,304 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_specwcs_0034.rmap 5.8 K bytes (118 / 179 files) (449.9 K / 578.7 K bytes)
2023-09-20 19:09:27,457 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_saturation_0014.rmap 1.2 K bytes (119 / 179 files) (455.7 K / 578.7 K bytes)
2023-09-20 19:09:27,644 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_rscd_0008.rmap 1.0 K bytes (120 / 179 files) (456.9 K / 578.7 K bytes)
2023-09-20 19:09:27,836 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_resol_0005.rmap 790 bytes (121 / 179 files) (457.9 K / 578.7 K bytes)
2023-09-20 19:09:27,978 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_reset_0023.rmap 3.9 K bytes (122 / 179 files) (458.7 K / 578.7 K bytes)
2023-09-20 19:09:28,127 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_regions_0030.rmap 5.2 K bytes (123 / 179 files) (462.6 K / 578.7 K bytes)
2023-09-20 19:09:28,287 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_readnoise_0020.rmap 1.6 K bytes (124 / 179 files) (467.8 K / 578.7 K bytes)
2023-09-20 19:09:28,446 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_psfmask_0007.rmap 1.6 K bytes (125 / 179 files) (469.4 K / 578.7 K bytes)
2023-09-20 19:09:28,597 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_photom_0037.rmap 3.9 K bytes (126 / 179 files) (471.0 K / 578.7 K bytes)
2023-09-20 19:09:28,741 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pathloss_0004.rmap 802 bytes (127 / 179 files) (474.9 K / 578.7 K bytes)
2023-09-20 19:09:28,887 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pars-whitelightstep_0002.rmap 887 bytes (128 / 179 files) (475.7 K / 578.7 K bytes)
2023-09-20 19:09:29,099 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pars-tweakregstep_0003.rmap 1.8 K bytes (129 / 179 files) (476.6 K / 578.7 K bytes)
2023-09-20 19:09:29,242 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pars-spec3pipeline_0003.rmap 890 bytes (130 / 179 files) (478.4 K / 578.7 K bytes)
2023-09-20 19:09:29,393 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pars-spec2pipeline_0008.rmap 1.1 K bytes (131 / 179 files) (479.3 K / 578.7 K bytes)
2023-09-20 19:09:29,554 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pars-sourcecatalogstep_0003.rmap 1.9 K bytes (132 / 179 files) (480.4 K / 578.7 K bytes)
2023-09-20 19:09:29,710 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pars-outlierdetectionstep_0011.rmap 3.4 K bytes (133 / 179 files) (482.3 K / 578.7 K bytes)
2023-09-20 19:09:29,904 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pars-image2pipeline_0005.rmap 979 bytes (134 / 179 files) (485.7 K / 578.7 K bytes)
2023-09-20 19:09:30,099 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pars-detector1pipeline_0004.rmap 1.1 K bytes (135 / 179 files) (486.7 K / 578.7 K bytes)
2023-09-20 19:09:30,261 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_pars-darkpipeline_0002.rmap 860 bytes (136 / 179 files) (487.8 K / 578.7 K bytes)
2023-09-20 19:09:30,401 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_mrsxartcorr_0004.rmap 2.2 K bytes (137 / 179 files) (488.6 K / 578.7 K bytes)
2023-09-20 19:09:30,567 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_mrsptcorr_0002.rmap 1.9 K bytes (138 / 179 files) (490.8 K / 578.7 K bytes)
2023-09-20 19:09:30,758 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_mask_0019.rmap 1.1 K bytes (139 / 179 files) (492.7 K / 578.7 K bytes)
2023-09-20 19:09:30,914 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_linearity_0015.rmap 2.4 K bytes (140 / 179 files) (493.8 K / 578.7 K bytes)
2023-09-20 19:09:31,069 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_gain_0007.rmap 893 bytes (141 / 179 files) (496.1 K / 578.7 K bytes)
2023-09-20 19:09:31,232 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_fringefreq_0003.rmap 1.4 K bytes (142 / 179 files) (497.0 K / 578.7 K bytes)
2023-09-20 19:09:31,395 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_fringe_0017.rmap 3.7 K bytes (143 / 179 files) (498.5 K / 578.7 K bytes)
2023-09-20 19:09:31,545 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_flat_0059.rmap 15.1 K bytes (144 / 179 files) (502.2 K / 578.7 K bytes)
2023-09-20 19:09:31,722 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_filteroffset_0022.rmap 1.5 K bytes (145 / 179 files) (517.3 K / 578.7 K bytes)
2023-09-20 19:09:31,869 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_extract1d_0016.rmap 1.3 K bytes (146 / 179 files) (518.8 K / 578.7 K bytes)
2023-09-20 19:09:32,015 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_drizpars_0002.rmap 511 bytes (147 / 179 files) (520.1 K / 578.7 K bytes)
2023-09-20 19:09:32,167 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_distortion_0037.rmap 4.9 K bytes (148 / 179 files) (520.6 K / 578.7 K bytes)
2023-09-20 19:09:32,314 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_dark_0031.rmap 4.4 K bytes (149 / 179 files) (525.5 K / 578.7 K bytes)
2023-09-20 19:09:32,453 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_cubepar_0013.rmap 800 bytes (150 / 179 files) (529.9 K / 578.7 K bytes)
2023-09-20 19:09:32,604 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_area_0012.rmap 806 bytes (151 / 179 files) (530.7 K / 578.7 K bytes)
2023-09-20 19:09:32,811 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_apcorr_0009.rmap 4.3 K bytes (152 / 179 files) (531.5 K / 578.7 K bytes)
2023-09-20 19:09:32,955 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_abvegaoffset_0002.rmap 1.3 K bytes (153 / 179 files) (535.8 K / 578.7 K bytes)
2023-09-20 19:09:33,105 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_miri_0310.imap 5.1 K bytes (154 / 179 files) (537.0 K / 578.7 K bytes)
2023-09-20 19:09:33,298 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_trappars_0004.rmap 903 bytes (155 / 179 files) (542.2 K / 578.7 K bytes)
2023-09-20 19:09:33,484 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_trapdensity_0006.rmap 930 bytes (156 / 179 files) (543.1 K / 578.7 K bytes)
2023-09-20 19:09:33,641 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_superbias_0017.rmap 3.8 K bytes (157 / 179 files) (544.0 K / 578.7 K bytes)
2023-09-20 19:09:33,785 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_saturation_0009.rmap 779 bytes (158 / 179 files) (547.8 K / 578.7 K bytes)
2023-09-20 19:09:33,930 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_readnoise_0011.rmap 1.3 K bytes (159 / 179 files) (548.6 K / 578.7 K bytes)
2023-09-20 19:09:34,077 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_photom_0014.rmap 1.1 K bytes (160 / 179 files) (549.8 K / 578.7 K bytes)
2023-09-20 19:09:34,263 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_persat_0006.rmap 884 bytes (161 / 179 files) (551.0 K / 578.7 K bytes)
2023-09-20 19:09:34,460 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_pars-tweakregstep_0002.rmap 850 bytes (162 / 179 files) (551.8 K / 578.7 K bytes)
2023-09-20 19:09:34,611 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_pars-sourcecatalogstep_0001.rmap 636 bytes (163 / 179 files) (552.7 K / 578.7 K bytes)
2023-09-20 19:09:34,762 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_pars-outlierdetectionstep_0001.rmap 654 bytes (164 / 179 files) (553.3 K / 578.7 K bytes)
2023-09-20 19:09:34,910 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_pars-image2pipeline_0005.rmap 974 bytes (165 / 179 files) (554.0 K / 578.7 K bytes)
2023-09-20 19:09:35,070 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_pars-detector1pipeline_0002.rmap 1.0 K bytes (166 / 179 files) (555.0 K / 578.7 K bytes)
2023-09-20 19:09:35,279 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_pars-darkpipeline_0002.rmap 856 bytes (167 / 179 files) (556.0 K / 578.7 K bytes)
2023-09-20 19:09:35,446 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_mask_0022.rmap 1.1 K bytes (168 / 179 files) (556.8 K / 578.7 K bytes)
2023-09-20 19:09:35,598 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_linearity_0015.rmap 925 bytes (169 / 179 files) (557.9 K / 578.7 K bytes)
2023-09-20 19:09:35,745 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_ipc_0003.rmap 614 bytes (170 / 179 files) (558.8 K / 578.7 K bytes)
2023-09-20 19:09:35,886 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_gain_0010.rmap 890 bytes (171 / 179 files) (559.4 K / 578.7 K bytes)
2023-09-20 19:09:36,038 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_flat_0009.rmap 1.1 K bytes (172 / 179 files) (560.3 K / 578.7 K bytes)
2023-09-20 19:09:36,197 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_distortion_0009.rmap 1.2 K bytes (173 / 179 files) (561.5 K / 578.7 K bytes)
2023-09-20 19:09:36,340 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_dark_0016.rmap 4.3 K bytes (174 / 179 files) (562.7 K / 578.7 K bytes)
2023-09-20 19:09:36,488 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_area_0010.rmap 1.2 K bytes (175 / 179 files) (567.0 K / 578.7 K bytes)
2023-09-20 19:09:36,648 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_apcorr_0003.rmap 4.1 K bytes (176 / 179 files) (568.1 K / 578.7 K bytes)
2023-09-20 19:09:36,818 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_abvegaoffset_0002.rmap 1.3 K bytes (177 / 179 files) (572.2 K / 578.7 K bytes)
2023-09-20 19:09:36,965 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_fgs_0103.imap 4.6 K bytes (178 / 179 files) (573.5 K / 578.7 K bytes)
2023-09-20 19:09:37,106 - CRDS - INFO - Fetching /home/runner/crds_cache/mappings/jwst/jwst_0994.pmap 580 bytes (179 / 179 files) (578.1 K / 578.7 K bytes)
2023-09-20 19:09:37,551 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_dark_0044.fits 773.6 M bytes (1 / 7 files) (0 / 842.4 M bytes)
2023-09-20 19:09:51,207 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_gain_0007.fits 4.2 M bytes (2 / 7 files) (773.6 M / 842.4 M bytes)
2023-09-20 19:09:51,674 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_linearity_0023.fits 46.5 M bytes (3 / 7 files) (777.8 M / 842.4 M bytes)
2023-09-20 19:09:52,889 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_mask_0027.fits 4.3 M bytes (4 / 7 files) (824.4 M / 842.4 M bytes)
2023-09-20 19:09:53,380 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_readnoise_0050.fits 4.2 M bytes (5 / 7 files) (828.6 M / 842.4 M bytes)
2023-09-20 19:09:53,954 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_rscd_0013.fits 37.4 K bytes (6 / 7 files) (832.8 M / 842.4 M bytes)
2023-09-20 19:09:54,138 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_saturation_0025.fits 9.5 M bytes (7 / 7 files) (832.9 M / 842.4 M bytes)
20210413_120546_mirisim/det_images/det_image_seq3_MIRIFUSHORT_12SHORTexp1.fits
20210413_120546_mirisim/det_images/det_image_seq4_MIRIFUSHORT_12SHORTexp1.fits
20210413_120546_mirisim/det_images/det_image_seq2_MIRIFUSHORT_12SHORTexp1.fits
20210413_125354_mirisim/det_images/det_image_seq3_MIRIFUSHORT_12LONGexp1.fits
20210413_125354_mirisim/det_images/det_image_seq2_MIRIFUSHORT_12LONGexp1.fits
20210413_125354_mirisim/det_images/det_image_seq1_MIRIFUSHORT_12LONGexp1.fits
20210413_125354_mirisim/det_images/det_image_seq4_MIRIFUSHORT_12LONGexp1.fits
20210413_123047_mirisim/det_images/det_image_seq3_MIRIFUSHORT_12MEDIUMexp1.fits
20210413_123047_mirisim/det_images/det_image_seq1_MIRIFUSHORT_12MEDIUMexp1.fits
20210413_123047_mirisim/det_images/det_image_seq4_MIRIFUSHORT_12MEDIUMexp1.fits
20210413_123047_mirisim/det_images/det_image_seq2_MIRIFUSHORT_12MEDIUMexp1.fits
20210413_120546_mirisim/det_images/det_image_seq4_MIRIFULONG_34SHORTexp1.fits
2023-09-20 19:21:37,720 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_dark_0057.fits 773.6 M bytes (1 / 7 files) (0 / 842.4 M bytes)
2023-09-20 19:21:49,888 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_gain_0006.fits 4.2 M bytes (2 / 7 files) (773.6 M / 842.4 M bytes)
2023-09-20 19:21:50,591 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_linearity_0026.fits 46.5 M bytes (3 / 7 files) (777.8 M / 842.4 M bytes)
2023-09-20 19:21:51,763 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_mask_0029.fits 4.3 M bytes (4 / 7 files) (824.4 M / 842.4 M bytes)
2023-09-20 19:21:52,376 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_readnoise_0064.fits 4.2 M bytes (5 / 7 files) (828.6 M / 842.4 M bytes)
2023-09-20 19:21:52,876 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_rscd_0014.fits 37.4 K bytes (6 / 7 files) (832.8 M / 842.4 M bytes)
2023-09-20 19:21:53,086 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_saturation_0024.fits 9.5 M bytes (7 / 7 files) (832.9 M / 842.4 M bytes)
20210413_120546_mirisim/det_images/det_image_seq2_MIRIFULONG_34SHORTexp1.fits
20210413_120546_mirisim/det_images/det_image_seq1_MIRIFULONG_34SHORTexp1.fits
20210413_120546_mirisim/det_images/det_image_seq3_MIRIFULONG_34SHORTexp1.fits
20210413_125354_mirisim/det_images/det_image_seq4_MIRIFULONG_34LONGexp1.fits
2023-09-20 19:26:00,971 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_linearity_0022.fits 46.5 M bytes (1 / 1 files) (0 / 46.5 M bytes)
20210413_125354_mirisim/det_images/det_image_seq3_MIRIFULONG_34LONGexp1.fits
20210413_125354_mirisim/det_images/det_image_seq2_MIRIFULONG_34LONGexp1.fits
20210413_125354_mirisim/det_images/det_image_seq1_MIRIFULONG_34LONGexp1.fits
20210413_123047_mirisim/det_images/det_image_seq3_MIRIFULONG_34MEDIUMexp1.fits
2023-09-20 19:30:02,390 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_linearity_0027.fits 46.5 M bytes (1 / 1 files) (0 / 46.5 M bytes)
20210413_123047_mirisim/det_images/det_image_seq1_MIRIFULONG_34MEDIUMexp1.fits
20210413_123047_mirisim/det_images/det_image_seq2_MIRIFULONG_34MEDIUMexp1.fits
20210413_123047_mirisim/det_images/det_image_seq4_MIRIFULONG_34MEDIUMexp1.fits
# Execute calwebb_spec2 pipeline. This will overwrite previous reductions.
# All the local calwebb_detector1 files
allshortfiles2 = glob.glob('det_image_*_MIRIFUSHORT_*_rate.fits')
alllongfiles2 = glob.glob('det_image_*_MIRIFULONG_*_rate.fits')
for short2file in allshortfiles2:
print(short2file)
pipe2short = Spec2Pipeline()
base2short, remainder2short = short2file.split('.')
pipe2short.straylight.skip = True
# If you run your own simulations, you will need to update these hardcoded files.
if (short2file == 'det_image_seq1_MIRIFUSHORT_12LONGexp1125354_rate.fits'):
print('this one will have the level 2b cube built')
else:
pipe2short.cube_build.skip = True
pipe2short.extract_1d.skip = True
pipe2short.output_file = base2short
pipe2short.run(short2file)
for long2file in alllongfiles2:
print(long2file)
pipe2long = Spec2Pipeline()
base2long, remainder2long = long2file.split('.')
pipe2long.straylight.skip = True
# If you run your own simulations, you will need to update these hardcoded files.
if (long2file == 'det_image_seq1_MIRIFULONG_34SHORTexp1120546_rate.fits'):
print('this one will have the level 2b cube built')
else:
pipe2long.cube_build.skip = True
pipe2long.extract_1d.skip = True
pipe2long.output_file = base2long
pipe2long.run(long2file)
det_image_seq2_MIRIFUSHORT_12SHORTexp1120546_rate.fits
2023-09-20 19:34:06,764 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_distortion_0031.asdf 131.0 K bytes (1 / 8 files) (0 / 135.5 M bytes)
2023-09-20 19:34:07,117 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_drizpars_0001.fits 8.6 K bytes (2 / 8 files) (131.0 K / 135.5 M bytes)
2023-09-20 19:34:07,303 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_flat_0749.fits 12.7 M bytes (3 / 8 files) (139.7 K / 135.5 M bytes)
2023-09-20 19:34:07,933 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_fringe_0046.fits 12.7 M bytes (4 / 8 files) (12.8 M / 135.5 M bytes)
2023-09-20 19:34:08,574 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_photom_0052.fits 33.8 M bytes (5 / 8 files) (25.5 M / 135.5 M bytes)
2023-09-20 19:34:09,605 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_regions_0027.asdf 76.1 M bytes (6 / 8 files) (59.4 M / 135.5 M bytes)
2023-09-20 19:34:11,192 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_specwcs_0024.asdf 42.1 K bytes (7 / 8 files) (135.5 M / 135.5 M bytes)
2023-09-20 19:34:11,441 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_wavelengthrange_0005.asdf 2.4 K bytes (8 / 8 files) (135.5 M / 135.5 M bytes)
det_image_seq3_MIRIFUSHORT_12MEDIUMexp1123047_rate.fits
2023-09-20 19:34:29,194 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_distortion_0030.asdf 131.0 K bytes (1 / 6 files) (0 / 135.5 M bytes)
2023-09-20 19:34:29,500 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_flat_0763.fits 12.7 M bytes (2 / 6 files) (131.0 K / 135.5 M bytes)
2023-09-20 19:34:30,132 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_fringe_0034.fits 12.7 M bytes (3 / 6 files) (12.8 M / 135.5 M bytes)
2023-09-20 19:34:30,903 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_photom_0064.fits 33.8 M bytes (4 / 6 files) (25.5 M / 135.5 M bytes)
2023-09-20 19:34:31,829 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_regions_0026.asdf 76.1 M bytes (5 / 6 files) (59.4 M / 135.5 M bytes)
2023-09-20 19:34:33,497 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_specwcs_0021.asdf 42.1 K bytes (6 / 6 files) (135.5 M / 135.5 M bytes)
det_image_seq1_MIRIFUSHORT_12SHORTexp1120546_rate.fits
det_image_seq3_MIRIFUSHORT_12SHORTexp1120546_rate.fits
det_image_seq4_MIRIFUSHORT_12SHORTexp1120546_rate.fits
det_image_seq4_MIRIFUSHORT_12MEDIUMexp1123047_rate.fits
det_image_seq2_MIRIFUSHORT_12LONGexp1125354_rate.fits
2023-09-20 19:36:03,109 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_distortion_0029.asdf 131.1 K bytes (1 / 6 files) (0 / 135.5 M bytes)
2023-09-20 19:36:03,384 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_flat_0753.fits 12.7 M bytes (2 / 6 files) (131.1 K / 135.5 M bytes)
2023-09-20 19:36:04,118 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_fringe_0049.fits 12.7 M bytes (3 / 6 files) (12.8 M / 135.5 M bytes)
2023-09-20 19:36:04,757 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_photom_0060.fits 33.8 M bytes (4 / 6 files) (25.5 M / 135.5 M bytes)
2023-09-20 19:36:05,681 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_regions_0028.asdf 76.1 M bytes (5 / 6 files) (59.4 M / 135.5 M bytes)
2023-09-20 19:36:07,410 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_specwcs_0022.asdf 42.1 K bytes (6 / 6 files) (135.5 M / 135.5 M bytes)
det_image_seq4_MIRIFUSHORT_12LONGexp1125354_rate.fits
det_image_seq1_MIRIFUSHORT_12LONGexp1125354_rate.fits
this one will have the level 2b cube built
2023-09-20 19:36:45,340 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_cubepar_0006.fits 489.6 K bytes (1 / 1 files) (0 / 489.6 K bytes)
det_image_seq3_MIRIFUSHORT_12LONGexp1125354_rate.fits
det_image_seq2_MIRIFUSHORT_12MEDIUMexp1123047_rate.fits
det_image_seq1_MIRIFUSHORT_12MEDIUMexp1123047_rate.fits
det_image_seq4_MIRIFULONG_34SHORTexp1120546_rate.fits
2023-09-20 19:38:21,379 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_distortion_0034.asdf 98.3 K bytes (1 / 6 files) (0 / 135.5 M bytes)
2023-09-20 19:38:21,666 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_flat_0758.fits 12.7 M bytes (2 / 6 files) (98.3 K / 135.5 M bytes)
2023-09-20 19:38:22,300 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_fringe_0042.fits 12.7 M bytes (3 / 6 files) (12.8 M / 135.5 M bytes)
2023-09-20 19:38:22,960 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_photom_0057.fits 33.8 M bytes (4 / 6 files) (25.5 M / 135.5 M bytes)
2023-09-20 19:38:23,904 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_regions_0029.asdf 76.1 M bytes (5 / 6 files) (59.4 M / 135.5 M bytes)
2023-09-20 19:38:25,750 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_specwcs_0020.asdf 31.4 K bytes (6 / 6 files) (135.4 M / 135.5 M bytes)
det_image_seq1_MIRIFULONG_34MEDIUMexp1123047_rate.fits
2023-09-20 19:38:41,708 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_distortion_0033.asdf 98.4 K bytes (1 / 6 files) (0 / 135.5 M bytes)
2023-09-20 19:38:42,060 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_flat_0747.fits 12.7 M bytes (2 / 6 files) (98.4 K / 135.5 M bytes)
2023-09-20 19:38:42,695 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_fringe_0044.fits 12.7 M bytes (3 / 6 files) (12.8 M / 135.5 M bytes)
2023-09-20 19:38:43,353 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_photom_0049.fits 33.8 M bytes (4 / 6 files) (25.5 M / 135.5 M bytes)
2023-09-20 19:38:44,386 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_regions_0030.asdf 76.1 M bytes (5 / 6 files) (59.4 M / 135.5 M bytes)
2023-09-20 19:38:45,942 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_specwcs_0023.asdf 31.4 K bytes (6 / 6 files) (135.4 M / 135.5 M bytes)
det_image_seq3_MIRIFULONG_34LONGexp1125354_rate.fits
2023-09-20 19:39:02,679 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_distortion_0032.asdf 98.3 K bytes (1 / 6 files) (0 / 135.5 M bytes)
2023-09-20 19:39:02,934 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_flat_0750.fits 12.7 M bytes (2 / 6 files) (98.3 K / 135.5 M bytes)
2023-09-20 19:39:03,543 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_fringe_0045.fits 12.7 M bytes (3 / 6 files) (12.8 M / 135.5 M bytes)
2023-09-20 19:39:04,264 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_photom_0059.fits 33.8 M bytes (4 / 6 files) (25.5 M / 135.5 M bytes)
2023-09-20 19:39:05,245 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_regions_0025.asdf 76.1 M bytes (5 / 6 files) (59.4 M / 135.5 M bytes)
2023-09-20 19:39:06,830 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_specwcs_0019.asdf 31.4 K bytes (6 / 6 files) (135.4 M / 135.5 M bytes)
det_image_seq2_MIRIFULONG_34SHORTexp1120546_rate.fits
det_image_seq4_MIRIFULONG_34LONGexp1125354_rate.fits
det_image_seq4_MIRIFULONG_34MEDIUMexp1123047_rate.fits
det_image_seq3_MIRIFULONG_34MEDIUMexp1123047_rate.fits
det_image_seq1_MIRIFULONG_34LONGexp1125354_rate.fits
det_image_seq2_MIRIFULONG_34LONGexp1125354_rate.fits
det_image_seq1_MIRIFULONG_34SHORTexp1120546_rate.fits
this one will have the level 2b cube built
det_image_seq3_MIRIFULONG_34SHORTexp1120546_rate.fits
det_image_seq2_MIRIFULONG_34MEDIUMexp1123047_rate.fits
Now to detect the point source in the datacube and extract and plot the spectra for each source#
For data cubes like the JWST/MIRI MRS information on the point sources in the FOV and also obtaining a source subtracted
data cube will be necessary (See the PampelMuse
software for an example on how spectral extraction is implemented for
near-IR data cubes like MUSE).
Note these backgrounds of diffuse emission can be quite complex.
On these source extracted data cubes (see SUBTRES
in PampelMuse
) I would like to produce moment maps
(https://casa.nrao.edu/Release3.4.0/docs/UserMan/UserManse41.html) and Position-Velocity (PV) diagrams
(https://casa.nrao.edu/Release4.1.0/doc/UserMan/UserManse42.html).
1) Use Photutils
to detect stars/point sources in the continuum image#
The first step of the analysis is to identify those sources for which it is feasible to extract spectra from the IFU data. Ideally we can estimate the signal-to-noise ratio (S/N) for all sources in the cube, do a number of checks to determine the status of every source and loop through these (brightest first) to extract the spectra. Open up the Level 2 Cubes and use photutils to search for point sources for Level 3 extraction.
# If you run your own simulations, you will need to update these hardcoded files.
l_cube_file = 'det_image_seq1_MIRIFULONG_34SHORTexp1120546_s3d.fits'
s_cube_file = 'det_image_seq1_MIRIFUSHORT_12LONGexp1125354_s3d.fits'
with fits.open(s_cube_file) as hdu_s_cube:
s_cube = hdu_s_cube['SCI'].data
s_med_cube = np.nanmedian(s_cube, axis=0)
mean, median, std = sigma_clipped_stats(s_med_cube, sigma = 2.0)
# Get a list of sources using a dedicated source detection algorithm
# Find sources at least 3* background (typically)
daofind = DAOStarFinder(fwhm = 2.0, threshold = 3. * std)
sources = daofind(s_med_cube - median)
print("\n Number of sources in field: ", len(sources))
# Positions in pixels
positions = Table([sources['xcentroid'], sources['ycentroid']])
# Convert to RA & Dec (ICRS)
peakpixval = np.zeros(len(sources['xcentroid']))
for count_s, _ in enumerate(sources):
peakpixval[count_s] = s_med_cube[int(np.round(sources['xcentroid'][count_s])), int(np.round(sources['ycentroid'][count_s]))]
print('peak pixel x =')
print(sources['xcentroid'][np.argmax(peakpixval)])
print('peak pixel y =')
print(sources['ycentroid'][np.argmax(peakpixval)])
plt.imshow(s_med_cube, vmin=0, vmax=100)#.value)
plt.tight_layout()
plt.scatter(sources['xcentroid'], sources['ycentroid'], c = "red", marker = "+", s=50)
plt.scatter(sources['xcentroid'][np.argmax(peakpixval)], sources['ycentroid'][np.argmax(peakpixval)], c = 'black', marker='+', s=50)
plt.show()
f0 = fits.open(s_cube_file)
w0 = WCS(f0[('sci',1)].header, f0)
f0.close()
radec = w0.all_pix2world([sources['xcentroid'][np.argmax(peakpixval)]], [sources['ycentroid'][np.argmax(peakpixval)]], [1], 1)
# Take the brightest source flux and take that to be your primary point source for extraction
ra_ptsrc = radec[0][0]
dec_ptsrc = radec[1][0]
Number of sources in field: 5
peak pixel x =
20.96266848664633
peak pixel y =
22.663345906682785

# Due to the way the pipeline currently extracts Level3 data, you must update the headers to be centered on the point source of your choosing from the step above.
all_files = glob.glob('det_image_*_cal.fits')
targra = ra_ptsrc
targdec = dec_ptsrc
for thisfile in all_files:
base, remainder = thisfile.split('.')
outfilename = base + '_fix.' + remainder
print(outfilename)
with fits.open(thisfile) as hduthis:
hduthis['SCI'].header['SRCTYPE'] = 'POINT'
hduthis[0].header['TARG_RA'] = targra
hduthis[0].header['TARG_DEC'] = targdec
hduthis.writeto(outfilename, overwrite=True)
det_image_seq2_MIRIFULONG_34LONGexp1125354_cal_fix.fits
det_image_seq3_MIRIFUSHORT_12SHORTexp1120546_cal_fix.fits
det_image_seq4_MIRIFUSHORT_12LONGexp1125354_cal_fix.fits
det_image_seq4_MIRIFULONG_34SHORTexp1120546_cal_fix.fits
det_image_seq2_MIRIFULONG_34MEDIUMexp1123047_cal_fix.fits
det_image_seq1_MIRIFUSHORT_12SHORTexp1120546_cal_fix.fits
det_image_seq3_MIRIFULONG_34MEDIUMexp1123047_cal_fix.fits
det_image_seq1_MIRIFULONG_34MEDIUMexp1123047_cal_fix.fits
det_image_seq2_MIRIFULONG_34SHORTexp1120546_cal_fix.fits
det_image_seq3_MIRIFUSHORT_12MEDIUMexp1123047_cal_fix.fits
det_image_seq1_MIRIFULONG_34LONGexp1125354_cal_fix.fits
det_image_seq4_MIRIFULONG_34LONGexp1125354_cal_fix.fits
det_image_seq1_MIRIFUSHORT_12LONGexp1125354_cal_fix.fits
det_image_seq4_MIRIFUSHORT_12SHORTexp1120546_cal_fix.fits
det_image_seq2_MIRIFUSHORT_12MEDIUMexp1123047_cal_fix.fits
det_image_seq3_MIRIFUSHORT_12LONGexp1125354_cal_fix.fits
det_image_seq2_MIRIFUSHORT_12LONGexp1125354_cal_fix.fits
det_image_seq4_MIRIFULONG_34MEDIUMexp1123047_cal_fix.fits
det_image_seq3_MIRIFULONG_34SHORTexp1120546_cal_fix.fits
det_image_seq4_MIRIFUSHORT_12MEDIUMexp1123047_cal_fix.fits
det_image_seq1_MIRIFULONG_34SHORTexp1120546_cal_fix.fits
det_image_seq1_MIRIFUSHORT_12MEDIUMexp1123047_cal_fix.fits
det_image_seq3_MIRIFULONG_34LONGexp1125354_cal_fix.fits
det_image_seq2_MIRIFUSHORT_12SHORTexp1120546_cal_fix.fits
# set up needed reference file(s) for spec3
file_all_list = glob.glob('det_image_*_cal_fix.fits')
asnall = asn_from_list.asn_from_list(file_all_list, rule=DMS_Level3_Base, product_name='combine_dithers_all_exposures')
asnallfile = 'for_spec3_all.json'
with open(asnallfile, 'w') as fpall:
fpall.write(asnall.dump()[1])
# Execute calwebb_spec3 pipeline. This will overwrite previous reductions.
pipe3ss = Spec3Pipeline()
pipe3ss.master_background.skip = True
pipe3ss.mrs_imatch.skip = True
pipe3ss.outlier_detection.skip = True
pipe3ss.resample_spec.skip = True
pipe3ss.combine_1d.skip = True
pipe3ss.use_source_posn = 'True'
pipe3ss.subtract_background = 'True'
pipe3ss.output_file = 'allspec3'
pipe3ss.run(asnallfile)
2023-09-20 19:42:14,711 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_apcorr_0002.asdf 432.8 K bytes (1 / 2 files) (0 / 683.5 K bytes)
2023-09-20 19:42:15,147 - CRDS - INFO - Fetching /home/runner/crds_cache/references/jwst/miri/jwst_miri_extract1d_0003.asdf 250.7 K bytes (2 / 2 files) (432.8 K / 683.5 K bytes)
Next Step#
Proceed to Notebook 2 for visualization and data anlysis.
Additional Resources#
About this notebook#
Author: Olivia Jones, Project Scientist, UK ATC. Updated On: 2020-08-11 Later Updated On: 2021-09-06 by B. Sargent, STScI Scientist, Space Telescope Science Institute
Top of Page