Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NIRISS post pipeline 03 #256

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -428,18 +428,18 @@
"spectrum_cut = Spectrum1D(flux=line_2d[yy, :][con]*spec_unit,\n",
" spectral_axis=wave_2d[yy, :][con]*u.um)\n",
"\n",
"# !!! Some tweaks may be needed for initial value, to successfuully run the fit;\n",
"# !!! Some tweaks may be needed for initial value, to successfully run the fit;\n",
"\n",
"# For Hb\n",
"g1_init = models.Gaussian1D(amplitude=40*spec_unit, mean=1.5*u.um, stddev=0.005*u.um)\n",
"g1_init = models.Gaussian1D(amplitude=100*spec_unit, mean=1.51*u.um, stddev=0.009*u.um)\n",
"\n",
"# For O3 blue\n",
"g2_init = models.Gaussian1D(amplitude=50.*spec_unit, mean=1.535*u.um, stddev=0.002*u.um)\n",
"g2_init = models.Gaussian1D(amplitude=80.*spec_unit, mean=1.53*u.um, stddev=0.006*u.um)\n",
"\n",
"# For O3 red\n",
"g3_init = models.Gaussian1D(amplitude=45.*spec_unit, mean=1.55*u.um, stddev=0.001*u.um)\n",
"g3_init = models.Gaussian1D(amplitude=200.*spec_unit, mean=1.55*u.um, stddev=0.006*u.um)\n",
"\n",
"g123_fit = fit_lines(spectrum_cut, g1_init+g2_init+g3_init, window=[0.01*u.um, 0.001*u.um, 0.001*u.um])\n",
"g123_fit = fit_lines(spectrum_cut, g1_init+g2_init+g3_init)\n",
"y_fit = g123_fit(wave_2d[yy, :]*u.um)\n",
"\n",
"print(g123_fit)"
Expand Down Expand Up @@ -515,12 +515,12 @@
" # !!! Some tweaks may be needed for initial value, to successfuully run the fit;\n",
"\n",
" # For Hb\n",
" g1_init = models.Gaussian1D(amplitude=40*spec_unit, mean=1.5*u.um, stddev=0.005*u.um)\n",
" g1_init = models.Gaussian1D(amplitude=100*spec_unit, mean=1.51*u.um, stddev=0.009*u.um)\n",
" # For O3 blue\n",
" g2_init = models.Gaussian1D(amplitude=50.*spec_unit, mean=1.535*u.um, stddev=0.002*u.um)\n",
" g2_init = models.Gaussian1D(amplitude=80.*spec_unit, mean=1.53*u.um, stddev=0.006*u.um)\n",
" # For O3 red\n",
" g3_init = models.Gaussian1D(amplitude=45.*spec_unit, mean=1.55*u.um, stddev=0.001*u.um)\n",
" g123_fit = fit_lines(spectrum_cut, g1_init+g2_init+g3_init, window=[0.01*u.um, 0.001*u.um, 0.001*u.um])\n",
" g3_init = models.Gaussian1D(amplitude=200.*spec_unit, mean=1.55*u.um, stddev=0.006*u.um)\n",
" g123_fit = fit_lines(spectrum_cut, g1_init+g2_init+g3_init)\n",
" y_fit = g123_fit(wave_2d[yy, :]*u.um)\n",
"\n",
" # This has to be done at each y pixel, as wavelength array can be tilted.\n",
Expand Down Expand Up @@ -593,7 +593,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.11.10"
}
},
"nbformat": 4,
Expand Down
Loading