-
Notifications
You must be signed in to change notification settings - Fork 26
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
Power Drude and Gaussian #295
Conversation
I changed a use of |
Thanks for working on this. RE: numpy 2.0, we'll have to go there at some point, so might as well make ourselves compliant now. Will add review separately. |
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.
Looks good overall. I do want to make sure we "save room" for easily adding support for flux units (and not just intensity units). I'm also not sure I understand the "assume all units are the internal PAHFIT units". Rather than assume, can't we enforce this by directly converting? I guess this is at the level of Fitter
so it's a safe assumption. But if/when we do accept flux units, we'll need Fitter
's to be versant in units.flux_power
.
Hi @drvdputt, would be great to get this merged to dev and then to master soon. |
I pushed some changes. For the numpy trapz (<2.0.0) vs trapezoid (>=2.0.0) issue, I have found a workaround: use scipy.integrate.trapezoid instead. To deal with the flux/intensity split, there will have to be some logic in certain places.
I should note that I find that most of the differences come down to the differences in ratios between
|
Did they really remove one name and add another? Sigh.
Can you expand on this? Why is the ratio significant? If it simplifies treating the two flavors the same, we could make both of these ratios 1e-9, for example. |
BTW, with my suggestion above of normalizing on intensity for |
The ratio matters because it affect the value of
Multiplying with If we go with the Not sure what would be expected for the |
I see, so if we are careful with our units, the factor needed to go between power and amplitude for Drude's/Gaussian's would be agnostic as to whether we have intensity of flux units. I can see an advantage there for Why don't we punt for now on the question of a canonical solid angle or "special units". A See #297 (for discussion of another PR). |
Hi @drvdputt, I'd like to get this PR buttoned up and onto dev so we can do a bit of testing before merging to master. Can you let me know what remains to be done? |
I reread the comments and looked over my code changes again, and I think no more changes are needed at this point. I think we can merge to dev, and the other minor issues can be addressed in smaller/quicker pull requests. With this merged, that concludes all of my major changes, and the dev branch should be open for new additions by other contributors. And any other changes I develop in my experimental branches will likely be small enough to copy paste and adapt. |
Great, thanks for your work on this, Dries. I've merged to In terms of other changes, I'd like to restore our old practice of smaller PRs doing ~one thing, vetted and merged to master, so if you have any small changes let's wait for |
Here is the next pull request. I have just rebased this branch on dev.
Replaces #225 , and this should be the final part of #280 .
Changes with respect to the user experience: