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

fit_lines center window does not work #1160

Closed
TurboSlayer opened this issue Aug 21, 2024 · 1 comment · Fixed by #1164
Closed

fit_lines center window does not work #1160

TurboSlayer opened this issue Aug 21, 2024 · 1 comment · Fixed by #1164
Labels
analysis Spectral analysis/measurement tools bug

Comments

@TurboSlayer
Copy link

Using a single value for window in fit_lines causes the program to use the entire spectrum as opposed to centering around the mean of the gaussian. Defining the window bounds manually works as expected. I've tried putting in some extreme constants into window such as np.inf and negative numbers, all of which have no effect on the line fit.

Defining a window of 10 by setting bounds manually:

g_init = models.Gaussian1D(amplitude=2000, mean=6563 * u.AA, stddev=3 * u.AA)
g_init += models.Const1D(0)
g_fit = fit_lines(spectrum, g_init, window=(6553 * u.AA, 6573 * u.AA))

bounds_window

Defining a window of 10 automatically:

g_init = models.Gaussian1D(amplitude=2000, mean=6563 * u.AA, stddev=3 * u.AA)
g_init += models.Const1D(0)
g_fit = fit_lines(spectrum, g_init, window=10 * u.AA)

center_window

@rosteen rosteen added bug analysis Spectral analysis/measurement tools labels Aug 22, 2024
@rosteen
Copy link
Contributor

rosteen commented Aug 22, 2024

Thanks for the report, I'm hoping I'll have time to look into this next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Spectral analysis/measurement tools bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants