jdhenshaw / scousepy

ScousePy
https://scousepy.readthedocs.io/en/latest/
MIT License
21 stars 7 forks source link

Stage 2 manual fitting error (AttributeError: 'ScouseFitter' object has no attribute 'plot_res') #73

Open AkshayaMS opened 2 years ago

AkshayaMS commented 2 years ago

Hello,

I am using scousepy on an ALMA datacube. The spectra has multiple components so I have to use the manual fit in most cases. The manual fit interactive window becomes unresponsive if I go to the previous spectra. The fits are also not shown when I go back. Is going back not allowed during stage 2? As I understand the "refit=True" can be used to look at the plots after stage 2 is complete. Since I have a lot of spectra to fit (>500) I wanted to have the option to check the fitted spectra.

Also once I go to a previous spectrum and try manual fit again, the fit I had done before does not show up (ideally it should show the previous fit parameters and ask if I want to do a re-fit). I am not sure if it was erased.

Example: I perform the fit manually shown below before

I exit the code. I start stage 2 again, but the above fit does not show up when I go back to it. Shown below, after

I get the following error in the terminal: error

jdhenshaw commented 2 years ago

Hi, are you closing the manual fit window before moving on? (pressing enter). Also it looks like you are fitting lots of negative spikes - these will ultimately be rejected by scouse in stage 3 so its best not to fit these. Yes setting refit=True should allow you to go back and check the fitted spectra....

AkshayaMS commented 2 years ago

Hi, are you closing the manual fit window before moving on? (pressing enter). Also it looks like you are fitting lots of negative spikes - these will ultimately be rejected by scouse in stage 3 so its best not to fit these. Yes setting refit=True should allow you to go back and check the fitted spectra....

Okay, thank you. By rejecting negative peaks do you mean I can't use this to fit absorption lines? (I have regions with just absorption lines) I assumed if I don't mask the negative data the fits would work.

jdhenshaw commented 2 years ago

thats right, Scouse doesn't currently fit absorption spectra.

AkshayaMS commented 2 years ago

thats right, Scouse doesn't currently fit absorption spectra.

Ah, I missed that! Thank you so much.