Skip to content

Commit d41a85a

Browse files
committed
Update notebooks to generate HTML build
1 parent 41b8f76 commit d41a85a

File tree

2 files changed

+10
-28
lines changed

2 files changed

+10
-28
lines changed

notebooks/MIRI_IFU_YSOs_in_the_LMC/isha_nayak_ysos_in_the_lmc.ipynb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@
622622
"\n",
623623
"# Assign to variable to make it more readable for line below\n",
624624
"spec_contsub_1 = spec[count_axis:len(spec.spectral_axis)] - y_continuum_1[count_axis:len(spec.spectral_axis)]\n",
625-
"spec_contsub_2 = spec[0:count_axis] - y_continuum_2[0:count_axis]\n"
625+
"spec_contsub_2 = spec[0:count_axis] - y_continuum_2[0:count_axis]"
626626
]
627627
},
628628
{
@@ -1157,13 +1157,6 @@
11571157
"plt.show()\n",
11581158
"plt.close()"
11591159
]
1160-
},
1161-
{
1162-
"cell_type": "code",
1163-
"execution_count": null,
1164-
"metadata": {},
1165-
"outputs": [],
1166-
"source": []
11671160
}
11681161
],
11691162
"metadata": {
@@ -1182,7 +1175,7 @@
11821175
"name": "python",
11831176
"nbconvert_exporter": "python",
11841177
"pygments_lexer": "ipython3",
1185-
"version": "3.11.5"
1178+
"version": "3.9.13"
11861179
}
11871180
},
11881181
"nbformat": 4,

notebooks/MRS_Mstar_analysis/JWST_Mstar_dataAnalysis_analysis.ipynb

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -97,31 +97,21 @@
9797
"# Import astropy packages \n",
9898
"from astropy import units as u\n",
9999
"from astropy.io import ascii\n",
100-
"from astropy.wcs import WCS\n",
101-
"from astropy.table import Table, vstack\n",
102-
"from astropy.stats import sigma_clipped_stats\n",
103100
"from astropy.nddata import StdDevUncertainty\n",
104-
"from astropy.io import fits # added by BAS on 8 April 2021\n",
105-
"from astropy.utils.data import get_pkg_data_filename\n",
106101
"from astropy.utils.data import download_file\n",
107102
"\n",
108103
"# To find stars in the MRS spectralcubes and do aperture photometry\n",
109-
"from photutils.aperture import CircularAperture\n",
110104
"from photutils.detection import DAOStarFinder\n",
111105
"\n",
112106
"# To deal with 1D spectrum\n",
113107
"from specutils import Spectrum1D\n",
114-
"from specutils.fitting import fit_generic_continuum\n",
115-
"from specutils.manipulation import box_smooth, extract_region, SplineInterpolatedResampler\n",
108+
"from specutils.manipulation import box_smooth, extract_region\n",
116109
"from specutils.analysis import line_flux, centroid, equivalent_width\n",
117110
"from specutils.spectra import SpectralRegion\n",
118111
"from specutils import SpectrumList\n",
119112
"from jdaviz import Specviz\n",
120113
"from jdaviz import Cubeviz\n",
121114
"\n",
122-
"# To fit a curve to the data\n",
123-
"from scipy.optimize import curve_fit\n",
124-
"\n",
125115
"# Display the video\n",
126116
"from IPython.display import HTML, YouTubeVideo"
127117
]
@@ -157,10 +147,10 @@
157147
" if key in dict.keys():\n",
158148
" print(\"Present, \", end=\" \")\n",
159149
" print(\"value =\", dict[key])\n",
160-
" return(True)\n",
150+
" return True\n",
161151
" else:\n",
162152
" print(\"Not present\")\n",
163-
" return(False)"
153+
" return False"
164154
]
165155
},
166156
{
@@ -240,7 +230,7 @@
240230
"fnuall = fnuallarr[srtind]\n",
241231
"\n",
242232
"# Developer Note: We put in errors of 0.0001, but uncertainties need to be fixed\n",
243-
"dfnuall = (0.0001)*np.ones(len(fnuall))\n"
233+
"dfnuall = (0.0001)*np.ones(len(fnuall))"
244234
]
245235
},
246236
{
@@ -856,7 +846,7 @@
856846
"\n",
857847
"plt.xlabel('Wavelength (microns)')\n",
858848
"plt.ylabel(\"Flux ({:latex})\".format(spec.flux.unit))\n",
859-
"plt.title(\"10$\\mu$m feature plus local continuum\")\n",
849+
"plt.title(r\"10$\\mu$m feature plus local continuum\")\n",
860850
"plt.legend(frameon=False, fontsize='medium')\n",
861851
"plt.tight_layout()\n",
862852
"plt.show()\n",
@@ -872,7 +862,7 @@
872862
"\n",
873863
"plt.xlabel('Wavelength (microns)')\n",
874864
"plt.ylabel(\"Flux ({:latex})\".format(spec.flux.unit))\n",
875-
"plt.title(\"Continuum subtracted 10$\\mu$m feature\")\n",
865+
"plt.title(r\"Continuum subtracted 10$\\mu$m feature\")\n",
876866
"plt.tight_layout()\n",
877867
"plt.show()\n",
878868
"plt.close()"
@@ -953,8 +943,7 @@
953943
"\n",
954944
"tau = -(np.log(line_spec.flux.value / line_y_continuum.value))\n",
955945
"optdepth_spec = Spectrum1D(spectral_axis=line_spec.spectral_axis,\n",
956-
" flux=tau*(u.Jy/u.Jy))\n",
957-
" "
946+
" flux=tau*(u.Jy/u.Jy))"
958947
]
959948
},
960949
{
@@ -1044,7 +1033,7 @@
10441033
"name": "python",
10451034
"nbconvert_exporter": "python",
10461035
"pygments_lexer": "ipython3",
1047-
"version": "3.11.7"
1036+
"version": "3.9.13"
10481037
}
10491038
},
10501039
"nbformat": 4,

0 commit comments

Comments
 (0)