Skip to content

Commit

Permalink
Update dependencies for COS notebooks (#304)
Browse files Browse the repository at this point in the history
* Update asnfile nb dependencies

* Update CalCOS nb dependencies

* Update DataDI nb dependencies

* Update DayNight nb dependencies

* Update LSF nb dependencies

* Update view data nb dependencies

* Fix style errors on the LSF nb
  • Loading branch information
haticekaratay authored Sep 4, 2024
1 parent 765c944 commit b48b3d8
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 46 deletions.
4 changes: 2 additions & 2 deletions notebooks/COS/AsnFile/AsnFile.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"\n",
"- `numpy` to handle array functions\n",
"- `astropy.io fits` and `astropy.table Table` for accessing FITS files\n",
"- `glob`, `os`, and `shutil` for working with system files\n",
"- `glob`, `os`, and `shutil` for working with system files \n",
" - `glob` helps us search for filenames\n",
" - `os` and `shutil` for moving files and deleting folders, respectively\n",
"- `astroquery.mast Mast` and `Observations` for finding and downloading data from the [MAST](https://mast.stsci.edu/portal/Mashup/Clients/Mast/Portal.html) archive\n",
Expand Down Expand Up @@ -1112,7 +1112,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.12.5"
},
"nbdime-conflicts": {
"local_diff": [
Expand Down
8 changes: 4 additions & 4 deletions notebooks/COS/AsnFile/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
astropy==5.3.3
astroquery==0.4.6
numpy==1.23.4
pandas==1.5.3
astropy>=5.3.3
astroquery>=0.4.6
numpy>=1.23.4
pandas>=1.5.3
6 changes: 3 additions & 3 deletions notebooks/COS/CalCOS/CalCOS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"# 0. Introduction\n",
"**The Cosmic Origins Spectrograph ([*COS*](https://www.nasa.gov/content/hubble-space-telescope-cosmic-origins-spectrograph)) is an ultraviolet spectrograph on-board the Hubble Space Telescope ([*HST*](https://www.stsci.edu/hst/about)) with capabilities in the near ultraviolet (*NUV*) and far ultraviolet (*FUV*).**\n",
"\n",
"**`CalCOS`** is the data processing pipeline which converts the raw data produced by COS's detectors onboard HST into usable spectral data. It transforms the data from a list of many individual recorded photon interactions into tables of wavelength and flux.\n",
"**`CalCOS`** is the data processing pipeline which converts the raw data produced by COS's detectors onboard HST into usable spectral data. It transforms the data from a list of many individual recorded photon interactions into tables of wavelength and flux. \n",
"\n",
"**This tutorial aims to prepare you run the `CalCOS` pipeline to reduce spectral data taken with the COS instrument.** It focuses on COS data taken in `TIME-TAG` mode. \n",
"*Note* that there is another, less commonly used mode, `ACCUM`, which should generally be used only for UV bright targets.\n",
Expand Down Expand Up @@ -442,7 +442,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -1093,7 +1093,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.12.5"
}
},
"nbformat": 4,
Expand Down
12 changes: 6 additions & 6 deletions notebooks/COS/CalCOS/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
astropy==5.3.3
astroquery==0.4.6
calcos==3.4.4
matplotlib==3.7.1
numpy==1.24.2
crds==11.17.0
astropy>=5.3.3
astroquery>=0.4.6
calcos>=3.4.4
matplotlib>=3.7.1
numpy>=1.24.2
crds>=11.17.0
4 changes: 2 additions & 2 deletions notebooks/COS/DataDl/DataDl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"### 0.1. Choosing how to access the data \n",
"\n",
"**This Notebook explains three methods of accessing COS data hosted by the STScI Mikulski Archive for Space Telescopes (MAST).**\n",
"You may read through all three, or you may wish to focus on a particular method which best suits your needs. \n",
"You may read through all three, or you may wish to focus on a particular method which best suits your needs.\n",
"**Please use the table below to determine which section on which to focus.**\n",
"\n",
"||The [HST-specific Search (Web Interface)](https://mast.stsci.edu/search/ui/#/hst)|The [MAST Portal (Web Interface)](https://mast.stsci.edu/portal/Mashup/Clients/Mast/Portal.html)|The [`Astroquery` (`Python` Interface)](http://astroquery.readthedocs.io/)|\n",
Expand Down Expand Up @@ -899,7 +899,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.12.5"
},
"vscode": {
"interpreter": {
Expand Down
6 changes: 3 additions & 3 deletions notebooks/COS/DataDl/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
astropy==5.3.3
astroquery==0.4.6
numpy==1.23.4
astropy>=5.3.3
astroquery>=0.4.6
numpy>=1.23.4
4 changes: 2 additions & 2 deletions notebooks/COS/DayNight/DayNight.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"\n",
"In particular, this tutorial will walk you through separating datapoints obtained during the Hubble Space Telescope's \"night\" - when the sun is below the geometric horizon from the observatory's point of view - from datapoints taken during the observatory's \"day\" - when the sun is above this horizon. \n",
"You may wish to disaggregate photons from these two time periods, as data taken during the day can be subject to different and higher background noise conditions, as well as more intense geocoronal Lyman-alpha or Oxygen-I emission lines from the Earth’s atmosphere ([See Data Handbook 5.4.2](https://hst-docs.stsci.edu/cosdhb/chapter-5-cos-data-analysis/5-4-working-with-time-tag-data#id-5.4WorkingwithTIMETAGData-5.4.2FilteringTime-TagData:~:text=same%20as%20above.-,5.4.2%20Filtering%20Time%2DTag%20Data,-Filtering%20Events%20in)).\n",
"This type of data separation is possible with the [`TIME-TAG` data](https://hst-docs.stsci.edu/cosdhb/chapter-5-cos-data-analysis/5-4-working-with-time-tag-data) obtained by the COS photon-counting detectors, because each individual encounter with a photon is recorded with its own metadata such as the time of the encounter, and can be linked to the physical position of Hubble at that time.\n",
"This type of data separation is possible with the [`TIME-TAG` data](https://hst-docs.stsci.edu/cosdhb/chapter-5-cos-data-analysis/5-4-working-with-time-tag-data) obtained by the COS photon-counting detectors, because each individual encounter with a photon is recorded with its own metadata such as the time of the encounter, and can be linked to the physical position of Hubble at that time. \n",
"\n",
"- For an in-depth manual to working with COS data and a discussion of caveats and user tips, see the [COS Data Handbook](https://hst-docs.stsci.edu/display/COSDHB/).\n",
"- For a detailed overview of the COS instrument, see the [COS Instrument Handbook](https://hst-docs.stsci.edu/display/COSIHB/)."
Expand Down Expand Up @@ -868,7 +868,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.12.5"
}
},
"nbformat": 4,
Expand Down
14 changes: 7 additions & 7 deletions notebooks/COS/DayNight/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
astropy==5.3.3
astroquery==0.4.6
calcos==3.4.4
costools==1.2.6
matplotlib==3.7.0
numpy==1.23.4
crds==11.17.13
astropy>=5.3.3
astroquery>=0.4.6
calcos>=3.4.4
costools>=1.2.6
matplotlib>=3.7.0
numpy>=1.23.4
crds>=11.17.13
10 changes: 5 additions & 5 deletions notebooks/COS/LSF/LSF.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"## 0. Introduction\n",
"**The Cosmic Origins Spectrograph ([*COS*](https://www.nasa.gov/content/hubble-space-telescope-cosmic-origins-spectrograph)) is an ultraviolet spectrograph on-board the Hubble Space Telescope ([*HST*](https://www.stsci.edu/hst/about)) with capabilities in the near ultraviolet (*NUV*) and far ultraviolet (*FUV*).**\n",
"\n",
"**This tutorial aims to prepare you to work with the COS data of your choice by walking you through convolving a template or high-resolution spectrum with the COS LSF - both for far-ultraviolet (FUV) and near-ultraviolet (NUV) data.** This is an important step for many spectral applications, notably fitting spectral lines.\n",
"**This tutorial aims to prepare you to work with the COS data of your choice by walking you through convolving a template or high-resolution spectrum with the COS LSF - both for far-ultraviolet (FUV) and near-ultraviolet (NUV) data.** This is an important step for many spectral applications, notably fitting spectral lines. \n",
"\n",
"- For an in-depth manual to working with COS data and a discussion of caveats and user tips, see the [COS Data Handbook](https://hst-docs.stsci.edu/display/COSDHB/).\n",
"- For a detailed overview of the COS instrument, see the [COS Instrument Handbook](https://hst-docs.stsci.edu/display/COSIHB/).\n"
Expand Down Expand Up @@ -384,7 +384,7 @@
" )\n",
" \n",
" # Where to save file to locally\n",
" print(f\"Downloaded LSF file to {str(datadir/ LSF_file_name)}\")\n",
" print(f\"Downloaded LSF file to {str(datadir / LSF_file_name)}\")\n",
"\n",
" # And we'll need to get the DISPTAB file as well\n",
" disptab_path = str(datadir / disptab)\n",
Expand Down Expand Up @@ -1314,7 +1314,7 @@
"integral1 = np.trapz(x=wvln_in, y=spec_in)\n",
"integral2 = np.trapz(x=wvln_out, y=spec_out)\n",
"\n",
"print(f\"The integrated fluxes are within {100* (integral1-integral2)/integral2:.2f} % of eachother\")"
"print(f\"The integrated fluxes are within {100 * (integral1-integral2)/integral2:.2f} % of eachother\")"
]
},
{
Expand Down Expand Up @@ -1570,7 +1570,7 @@
"integral1 = np.trapz(x=wvln_in, y=spec_in)\n",
"integral2 = np.trapz(x=wvln_out, y=spec_out)\n",
"\n",
"print(f\"The integrated fluxes are within {100* (integral1-integral2)/integral2:.2f} % of eachother\")"
"print(f\"The integrated fluxes are within {100 * (integral1-integral2)/integral2:.2f} % of eachother\")"
]
},
{
Expand Down Expand Up @@ -2207,7 +2207,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.12.5"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions notebooks/COS/LSF/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
astropy==5.3.3
astroquery==0.4.6
matplotlib==3.7.0
numpy==1.23.4
scipy==1.10.0
astropy>=5.3.3
astroquery>=0.4.6
matplotlib>=3.7.0
numpy>=1.23.4
scipy>=1.10.0
4 changes: 2 additions & 2 deletions notebooks/COS/ViewData/ViewData.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"<a id=onecellV></a>\n",
"## 0.1. A one-cell summary of this Notebook's key points:\n",
"\n",
"While the rest of this Notebook will walk you through each step and decision made when examining your COS data, the following code cell serves as a summary for the Notebook. It contains the key material condensed into a single code cell, without much explanation. If this is all the help you need, great! If you still have questions, read on!"
"While the rest of this Notebook will walk you through each step and decision made when examining your COS data, the following code cell serves as a summary for the Notebook. It contains the key material condensed into a single code cell, without much explanation. If this is all the help you need, great! If you still have questions, read on! "
]
},
{
Expand Down Expand Up @@ -2024,7 +2024,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.12.5"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions notebooks/COS/ViewData/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
astropy==5.3.3
astroquery==0.4.6
matplotlib==3.7.0
numpy==1.23.4
specutils==1.9.1
astropy>=5.3.3
astroquery>=0.4.6
matplotlib>=3.7.0
numpy>=1.23.4
specutils>=1.9.1

0 comments on commit b48b3d8

Please sign in to comment.