diff --git a/notebooks/MIRI_IFU_YSOs_in_the_LMC/isha_nayak_ysos_in_the_lmc.ipynb b/notebooks/MIRI_IFU_YSOs_in_the_LMC/isha_nayak_ysos_in_the_lmc.ipynb index 549bc42f5..353cf602d 100644 --- a/notebooks/MIRI_IFU_YSOs_in_the_LMC/isha_nayak_ysos_in_the_lmc.ipynb +++ b/notebooks/MIRI_IFU_YSOs_in_the_LMC/isha_nayak_ysos_in_the_lmc.ipynb @@ -48,27 +48,21 @@ "\n", "from astropy import units as u\n", "from astropy.wcs import WCS\n", - "from astropy import constants as const\n", - "from astropy.io import ascii, fits\n", + "from astropy.io import ascii\n", "from astropy.nddata import StdDevUncertainty\n", - "from astropy.modeling import models\n", - "from astropy.table import Table, Column, vstack\n", + "from astropy.table import Table\n", "from astropy.stats import sigma_clipped_stats\n", - "from astropy.utils.data import download_file\n", "import urllib.request\n", "\n", "import numpy as np\n", - "import pandas as pd\n", - "\n", - "from scipy.optimize import curve_fit\n", "from spectral_cube import SpectralCube\n", "from photutils.detection import DAOStarFinder\n", "from photutils.aperture import CircularAperture\n", "\n", "from specutils import Spectrum1D, SpectralRegion\n", - "from specutils.analysis import snr, line_flux, centroid, equivalent_width\n", - "from specutils.fitting import fit_generic_continuum, fit_continuum, find_lines_threshold, find_lines_derivative, estimate_line_parameters, fit_lines\n", - "from specutils.manipulation import noise_region_uncertainty, box_smooth, extract_region, gaussian_smooth, SplineInterpolatedResampler" + "from specutils.analysis import snr\n", + "from specutils.fitting import fit_generic_continuum, find_lines_derivative\n", + "from specutils.manipulation import box_smooth, extract_region" ] }, { @@ -98,19 +92,15 @@ "from aplpy import __version__ as aplpy_version\n", "print(\"Aplpy: {}\".format(aplpy_version))\n", "\n", - "import astrodendro\n", "from astrodendro import __version__ as astrodendro_version\n", "print(\"Astrodendro: {}\".format(astrodendro_version))\n", "\n", - "import astropy\n", "from astropy import __version__ as astropy_version\n", "print(\"Astropy: {}\".format(astropy_version))\n", "\n", - "import jwst\n", "from jwst import __version__ as jwst_version\n", "print(\"JWST: {}\".format(jwst_version))\n", "\n", - "import matplotlib\n", "from matplotlib import __version__ as matplotlib_version\n", "print(\"Matplotlib: {}\".format(matplotlib_version))\n", "\n", @@ -118,23 +108,18 @@ "from numpy import __version__ as numpy_version\n", "print(\"Numpy: {}\".format(numpy_version))\n", "\n", - "import pandas\n", "from pandas import __version__ as pandas_version\n", "print(\"Pandas: {}\".format(pandas_version))\n", "\n", - "import photutils\n", "from photutils import __version__ as photutils_version\n", "print(\"Photutils: {}\".format(photutils_version))\n", "\n", - "import scipy\n", "from scipy import __version__ as scipy_version\n", "print(\"Scipy: {}\".format(scipy_version))\n", "\n", - "import specutils\n", "from specutils import __version__ as specutils_version\n", "print(\"Specutils: {}\".format(specutils_version))\n", "\n", - "import spectral_cube\n", "from spectral_cube import __version__ as spectral_cube_version\n", "print(\"SpectralCube: {}\".format(spectral_cube_version))" ] @@ -176,13 +161,13 @@ "outputs": [], "source": [ "params = {'legend.fontsize': '18',\n", - " 'axes.labelsize': '18',\n", - " 'axes.titlesize': '18',\n", - " 'xtick.labelsize': '18',\n", - " 'ytick.labelsize': '18',\n", - " 'lines.linewidth': 2,\n", - " 'axes.linewidth': 2,\n", - " 'animation.html': 'html5'}\n", + " 'axes.labelsize': '18',\n", + " 'axes.titlesize': '18',\n", + " 'xtick.labelsize': '18',\n", + " 'ytick.labelsize': '18',\n", + " 'lines.linewidth': 2,\n", + " 'axes.linewidth': 2,\n", + " 'animation.html': 'html5'}\n", "plt.rcParams.update(params)\n", "plt.rcParams.update({'figure.max_open_warning': 0})" ] @@ -1091,7 +1076,7 @@ " if drop_dups_ice and not drop_dups_sil:\n", " for i in range(0, count_ice):\n", " if ice_absorption_detected[i].value < 15.4 and ice_absorption_detected[i].value > 15.0:\n", - " print(\"This is a Class 1 YSO.\")\n", + " print(\"This is a Class 1 YSO.\")\n", " \n", " # Else find out if YSO 2 (more evolved YSO with other ice absoprtion and silicate absorption features)\n", " if drop_dups_sil:\n", @@ -1099,14 +1084,13 @@ " elif count_pah == 0 and drop_dups_ice:\n", " for i in range(0, count_ice):\n", " if ((ice_absorption_detected[i].value < 4.87 and ice_absorption_detected[i].value > 4.47)\n", - " or (ice_absorption_detected[i].value < 5.8 and ice_absorption_detected[i].value > 6.2)\n", - " or (ice_absorption_detected[i].value < 6.69 and ice_absorption_detected[i].value > 7.09)\n", - " or (ice_absorption_detected[i].value < 7.5 and ice_absorption_detected[i].value > 7.7)):\n", - " print(\"This is a Class 2 YSO.\")\n", + " or (ice_absorption_detected[i].value < 5.8 and ice_absorption_detected[i].value > 6.2)\n", + " or (ice_absorption_detected[i].value < 6.69 and ice_absorption_detected[i].value > 7.09)\n", + " or (ice_absorption_detected[i].value < 7.5 and ice_absorption_detected[i].value > 7.7)):\n", + " print(\"This is a Class 2 YSO.\")\n", " \n", " # Else if PAH emission features then YSO 3\n", - " if ((count_pah > 0 and not drop_dups_ice)\n", - " or (count_pah > 0 and drop_dups_sil)):\n", + " if (count_pah > 0 and not drop_dups_ice) or (count_pah > 0 and drop_dups_sil):\n", " print(\"This is a Class 3 YSO.\")" ] }, diff --git a/notebooks/MRS_Mstar_analysis/JWST_Mstar_dataAnalysis_analysis.ipynb b/notebooks/MRS_Mstar_analysis/JWST_Mstar_dataAnalysis_analysis.ipynb index 29b2e331f..09594f6ce 100644 --- a/notebooks/MRS_Mstar_analysis/JWST_Mstar_dataAnalysis_analysis.ipynb +++ b/notebooks/MRS_Mstar_analysis/JWST_Mstar_dataAnalysis_analysis.ipynb @@ -100,9 +100,6 @@ "from astropy.nddata import StdDevUncertainty\n", "from astropy.utils.data import download_file\n", "\n", - "# To find stars in the MRS spectralcubes and do aperture photometry\n", - "from photutils.detection import DAOStarFinder\n", - "\n", "# To deal with 1D spectrum\n", "from specutils import Spectrum1D\n", "from specutils.manipulation import box_smooth, extract_region\n",