-
Notifications
You must be signed in to change notification settings - Fork 0
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
DM-43357: Assorted fixes/improvements for fitting and plotting #29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor comments...
"""RuntimeError for when there is no data to fit.""" | ||
|
||
@classmethod | ||
@abstractmethod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you want this to have @abstractmethod
.
@@ -473,6 +473,12 @@ def fit( | |||
if len(flux_total) != 1: | |||
raise RuntimeError(f"len({flux_total=}) != 1; PSF model is badly-formed") | |||
flux_total = flux_total[0] | |||
gaussians_linear = None | |||
if config.fit_linear_init: | |||
flux_total.fixed = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a point to setting this, then changing it at line 480? Is flux_total
actually a parameter of model_source
that is affecting the next line? If so, please add a comment explaining.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is the easiest way to make the next line work correctly, and I added a note about that.
@@ -506,6 +512,7 @@ def fit( | |||
# dummy size for first iteration | |||
size, size_new = 0, 0 | |||
fitInputs = FitInputsDummy() | |||
catexp_get_psf_image = catexp.get_psf_image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you getting out of moving this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a probably-irrelevant micro-optimization. I could do the same with setting modeller=self.modeller
to avoid more attribute retrievals in the for loop, for example.
These are various things that came up during testing. There's no particular theme to the changes.