Skip to content

AttributeError in scousefitter when ncomps>8 is detected #74

@AkshayaMS

Description

@AkshayaMS

Hello,

I am using scousepy for the Galactic center data which has multiple components (some regions ncomps > 8). I noticed there is an error which recurs when I do the manual fit or when I use the interactive sliders to change the alpha or SNR. The total model, residuals and components are never drawn after this even with manual fits. I am attaching the screenshot below.

Screenshot from 2023-04-07 22-13-04

terminal

The manual fits are saved I think, but the plots don't get updated. The changes in alpha reduces the components to less than 8 but dspec doesn't work once the initial detected components were greater than 8.

I tried to find out what was the issue and tested the code with different datasets. This only happens when ncomps > 8. I did a temporary fix by changing the condition in scousefitter.py (line 1198) from:

if self.dsp.ncomps < 8:
    update_text(self.text_fitinformation,'pyspeckit fit information: ')

to

if self.dsp.ncomps < 15:
    update_text(self.text_fitinformation,'pyspeckit fit information: ')

I don't encounter the issue after this change. Everything works well (sample below).

Screenshot from 2023-04-07 22-15-28

Also, the manual fitting doesn't work with matplotlib versions > 3.5.3. Just a heads up in case someone encounters the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions