Skip to content

Commit

Permalink
ensure pipeline steps have access to necessary reference files
Browse files Browse the repository at this point in the history
  • Loading branch information
gibsongreen committed Nov 8, 2024
1 parent 9a81d76 commit 2f0e6c6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"import requests\n",
"from scipy.stats import sigmaclip\n",
"\n",
"from crds import client\n",
"import grismconf\n",
"from jwst.assign_wcs import AssignWcsStep\n",
"from jwst.flatfield import FlatFieldStep\n",
Expand Down Expand Up @@ -198,7 +199,7 @@
"id": "41068262-9a54-46c5-a9d2-ca2217ad1fee",
"metadata": {},
"source": [
"## Download Data"
"## Download Data and Ensure CRDS Configuration"
]
},
{
Expand All @@ -223,6 +224,28 @@
"get_jwst_file(wfss_file)"
]
},
{
"cell_type": "markdown",
"id": "faa27c94",
"metadata": {},
"source": [
"If CRDS is not configured, set the CRDS server URL and define a local cache path \n",
"to ensure the pipeline steps can access reference files as needed."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "af7a4057",
"metadata": {},
"outputs": [],
"source": [
"if os.environ.get(\"CRDS_PATH\") is None:\n",
" client.set_crds_server('https://jwst-crds.stsci.edu')\n",
" os.environ[\"CRDS_SERVER_URL\"] = \"https://jwst-crds.stsci.edu\"\n",
" os.environ[\"CRDS_PATH\"] = \"\""
]
},
{
"cell_type": "markdown",
"id": "ab5f3c78-258f-49c4-99c4-87e26f0972cf",
Expand Down
3 changes: 2 additions & 1 deletion notebooks/NIRCam/NIRCam_WFSS_Box_extraction/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ jwst >= 1.16.0
matplotlib >= 3.9.2
numpy == 1.26.4
requests >= 2.32.3
scipy >= 1.14.1
scipy >= 1.14.1
crds >= 12.0.4

0 comments on commit 2f0e6c6

Please sign in to comment.