Skip to content

Commit

Permalink
Update requirements for python 3.11 upgrade - IFU_cube_continuum_fit (#…
Browse files Browse the repository at this point in the history
…170)

* Update requirements for python 3.11 upgrade - IFU_cube_continuum_fit

* Update pre-install.sh

* Adress style errors

---------

Co-authored-by: Michael Gough <[email protected]>
Co-authored-by: Hatice Karatay <[email protected]>
  • Loading branch information
3 people authored Oct 20, 2023
1 parent 09c0b04 commit 4aec3ac
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 deletions.
30 changes: 9 additions & 21 deletions notebooks/IFU_cube_continuum_fit/NGC4151_FeII_ContinuumFit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,15 @@
"# load important packages\n",
"import time\n",
"import os\n",
"from copy import copy\n",
"from IPython.display import HTML, YouTubeVideo\n",
"\n",
"import astropy\n",
"import numpy as np\n",
"from astropy.io import fits, ascii\n",
"from astropy.io import fits\n",
"from astropy import units as u\n",
"from astropy.modeling import models\n",
"from astropy.utils.data import download_file\n",
"from specutils.fitting import fit_lines\n",
"from specutils import Spectrum1D\n",
"from jdaviz import Cubeviz\n",
"from jdaviz.app import Application\n",
"from specutils.manipulation import extract_region\n",
"from specutils.spectra import SpectralRegion"
]
Expand Down Expand Up @@ -99,9 +95,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"# This cell accesses the datacube file, defines the wavelength grid from header information and then plots a simple\n",
Expand Down Expand Up @@ -154,9 +148,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"# This cell defines the wavelength regions of interest: around the emission line, and the location\n",
Expand Down Expand Up @@ -366,9 +358,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"# Extract the line region defined in the spectral viewer\n",
Expand All @@ -383,9 +373,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"# Extract the continuum region defined in the spectral viewer\n",
Expand Down Expand Up @@ -637,7 +625,7 @@
"source": [
"# If you are using jdaviz < 3.5, uncomment the following line instead:\n",
"# params['LinFitCont_3d']['slope']\n",
"params['LinFitCont']['slope']"
"# params['LinFitCont']['slope']"
]
},
{
Expand Down Expand Up @@ -871,7 +859,7 @@
"\n",
"model_label = \"GaussAll\"\n",
"# If you are using jdaviz < 3.5, uncomment the following line instead:\n",
"# model_label = \"GaussAll_3d\"\n",
"model_label = \"GaussAll_3d\"\n",
"\n",
"nz, ny, nx = gauss_cube_2component.shape\n",
"for i in range(0, nx-1):\n",
Expand Down Expand Up @@ -991,7 +979,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1005,7 +993,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.15"
"version": "3.11.6"
},
"toc": {
"base_numbering": 1,
Expand Down
6 changes: 3 additions & 3 deletions notebooks/IFU_cube_continuum_fit/pre-install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

source bin/activate
pip install astropy-helpers==2.0.11
pip install radio_beam==0.3.2
pip install git+https://github.com/spacetelescope/jdaviz.git@625acca8562249c2f4d9041c566c1820a4d480b2#egg=jdaviz
pip install astropy-helpers>=2.0.11
pip install radio_beam>=0.3.2
pip install jdaviz>=3.7.0
2 changes: 2 additions & 0 deletions notebooks/IFU_cube_continuum_fit/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
astropy-helpers>=2.0.11
radio_beam>=0.3.2
astropy>=4.3.1
specutils>=1.4.0
matplotlib>=3.4.3
Expand Down

0 comments on commit 4aec3ac

Please sign in to comment.