Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve subprocess CRDS calls for easier debugging #140

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions notebooks/DrizzlePac/Initialization/Initialization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"import os\n",
"import shutil\n",
"import stwcs\n",
"import subprocess "
"import crds "
]
},
{
Expand Down Expand Up @@ -215,7 +215,7 @@
"outputs": [],
"source": [
"os.environ['CRDS_SERVER_URL'] = 'https://hst-crds.stsci.edu'\n",
"os.environ['CRDS_PATH'] = os.path.abspath(os.path.join('.', 'reference_files'))"
"os.environ['CRDS_PATH'] = os.path.abspath(os.path.join('.', 'reference_files2'))"
]
},
{
Expand All @@ -231,7 +231,7 @@
"metadata": {},
"outputs": [],
"source": [
"subprocess.check_output('crds bestrefs --files ib2j02n5q_flc.fits --sync-references=1 --update-bestrefs', shell=True, stderr=subprocess.DEVNULL)"
"crds.assign_bestrefs(['ib2j02n5q_flc.fits'], sync_references=True, verbosity=0)"
]
},
{
Expand Down Expand Up @@ -302,7 +302,8 @@
"## About this Notebook\n",
"\n",
" Author: T. Desjardins, STScI ACS Team \n",
" Updated: December 14, 2018"
" Updated: December 14, 2018\n",
" Updated: June 23, 2020"
]
},
{
Expand All @@ -329,7 +330,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.6"
"version": "3.7.6"
}
},
"nbformat": 4,
Expand Down
9 changes: 5 additions & 4 deletions notebooks/DrizzlePac/drizzle_wfpc2/drizzle_wfpc2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"import shutil\n",
"import glob\n",
"import os\n",
"import subprocess\n",
"import crds\n",
"\n",
"import matplotlib.pyplot as plt\n",
"from astropy.io import fits\n",
Expand Down Expand Up @@ -119,7 +119,7 @@
"os.environ['CRDS_SERVER_URL'] = 'https://hst-crds.stsci.edu'\n",
"os.environ['CRDS_PATH'] = os.path.abspath(os.path.join('.', 'reference_files'))\n",
"\n",
"subprocess.check_output('crds bestrefs --files ua0605*_c0m.fits --sync-references=1 --update-bestrefs', shell=True, stderr=subprocess.DEVNULL)\n",
"crds.assign_bestrefs(glob.glob(\"ua0605*_c0m.fits\"), sync_references=True, verbosity=0)\n",
"\n",
"os.environ['uref'] = os.path.abspath(os.path.join('.', 'reference_files', 'references', 'hst', 'wfpc2')) + os.path.sep"
]
Expand Down Expand Up @@ -424,7 +424,8 @@
"# About this Notebook\n",
"\n",
" Author: M. Cara, STScI Data Analysis Tools Branch\n",
" Updated: December 14, 2018"
" Updated: December 14, 2018\n",
" Updated: June 23, 2018"
]
}
],
Expand All @@ -444,7 +445,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.6"
"version": "3.7.6"
}
},
"nbformat": 4,
Expand Down
Loading