legolason / PyQSOFit

A code to fit the spectrum of quasar
GNU General Public License v3.0
72 stars 36 forks source link

Continuum fitting #23

Closed LydiaMak closed 2 years ago

LydiaMak commented 3 years ago

I have an issue with continuum fitting and I wonder if you have come across this or can suggest a solution. When I fit the continuum for the full spectrum with simply the power-law it doesn't fit very well on the red part. When I add a polynomial contribution it behaves weird. See attached files. Playing around with the initial guess doesn't change things. Let me know if you have any suggestion. Fitting the blue and the red spectrum separately can be a solution but I would like it if it was possible to fit the whole spectrum. Screenshot 2021-11-04 at 11 25 17 Screenshot 2021-11-04 at 11 31 15

legolason commented 3 years ago

check the continuum fitting windows, make sure your continuum is constrained in a fitting window. Like in your first case, make sure there is a window around 7000-7500

LydiaMak commented 2 years ago

Hi, thanks for the reply. Actually there are I think enough windows for >7000. Screenshot 2021-11-07 at 09 53 48

LydiaMak commented 2 years ago

I figured out that a better solution for now is to remove the windows <5000.

LydiaMak commented 2 years ago

Actually this causes problems with the blue part so I reopen the issue.

legolason commented 2 years ago

your figure looks very weird, it seems there is a very low data point > 8500A and drags the continuum to a very level?

LydiaMak commented 2 years ago

I changed the windows a bit and it gave me better results. Thanks!