Skip to content

Commit

Permalink
Address style errors
Browse files Browse the repository at this point in the history
  • Loading branch information
haticekaratay committed Oct 10, 2023
1 parent 55cd6ad commit 344326a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions notebooks/mos_spectroscopy_advanced/MOSspec_advanced.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"\n",
"# jdaviz\n",
"import jdaviz\n",
"from jdaviz import Mosviz, Specviz2d, Specviz\n",
"from jdaviz import Mosviz, Specviz2d, Specviz # noqa\n",
"\n",
"# glue\n",
"from glue.core.roi import XRangeROI\n",
Expand Down Expand Up @@ -181,7 +181,7 @@
"metadata": {},
"outputs": [],
"source": [
"#pathtodata = Path('/home/shared/preloaded-fits/jdaviz_data/mos_ceers_data')\n",
"# pathtodata = Path('/home/shared/preloaded-fits/jdaviz_data/mos_ceers_data')\n",
"pathtodata = Path('./data')"
]
},
Expand Down Expand Up @@ -287,8 +287,8 @@
"source": [
"# Include some fake uncertainty for now\n",
"spec1d = Spectrum1D(spectral_axis=spectra.spectral_axis,\n",
" flux=spectra.flux,\n",
" uncertainty=StdDevUncertainty((np.zeros(len(spectra.flux)) + 1E-13) * spectra.unit))\n",
" flux=spectra.flux,\n",
" uncertainty=StdDevUncertainty((np.zeros(len(spectra.flux)) + 1E-13) * spectra.unit))\n",
"spec1d"
]
},
Expand Down Expand Up @@ -327,7 +327,7 @@
" region1_exists = False\n",
" \n",
"# Spectral region for masking artifacts\n",
"if region1_exists==False:\n",
"if not region1_exists:\n",
" sv = specviz.app.get_viewer('spectrum-viewer')\n",
" sv.toolbar_active_subset.selected = []\n",
" sv.apply_roi(XRangeROI(1., 1.58)) "
Expand Down Expand Up @@ -760,7 +760,7 @@
"plt.scatter(spec1d_sub.spectral_axis, spec1d_sub.flux, label=None)\n",
"plt.axvline(lines['line_center'][0].value, color=\"red\", alpha=0.5, label='[OII]')\n",
"for line in lines:\n",
" if(line['line_type'] == 'emission'):\n",
" if line['line_type'] == 'emission':\n",
" plt.axvline(line['line_center'].value, alpha=0.5, color='red')\n",
"plt.xlim(x_min, x_max)\n",
"plt.xlabel(\"wavelength ({:latex})\".format(spec1d_sub.spectral_axis.unit))\n",
Expand Down Expand Up @@ -958,8 +958,8 @@
"# The new_flux_unit function does not change the uncertainty and specviz complains that there is a mismatch\n",
"# so we re-add the uncertainty like we did a few cells above\n",
"spec1d_masked_flamb_unc = Spectrum1D(spectral_axis=spec1d_masked_flamb.spectral_axis,\n",
" flux=spec1d_masked_flamb.flux,\n",
" uncertainty=StdDevUncertainty((np.zeros(len(spec1d_masked_flamb.flux)) + 1E-20) * spec1d_masked_flamb.unit))"
" flux=spec1d_masked_flamb.flux,\n",
" uncertainty=StdDevUncertainty((np.zeros(len(spec1d_masked_flamb.flux)) + 1E-20) * spec1d_masked_flamb.unit))"
]
},
{
Expand Down Expand Up @@ -1069,7 +1069,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 344326a

Please sign in to comment.