Use astropy in mktrace#37
Open
nden wants to merge 1 commit into
Open
Conversation
Contributor
|
@nden, the mktrace tests are setup in that testing_plus branch! Ready for use. And for official records sake I'll write this down here: we got the go ahead from the STIS team to put this change in with the testing updates and Python 3 only changes. |
Contributor
|
Needs a rebase. Also, I am removing nmpfit from stsci.tools, so this should go in sooner than later. |
sean-lockwood
added a commit
that referenced
this pull request
Jan 29, 2025
Remove dependence on deprecated stsci.tools.gfit Gaussian fitting; replace with Astropy fitting. Allow for scipy API change for scipy.signal.boxcar to scipy.signal.windows.boxcar. Changed Gaussian fitting initial guess to peak. Aggregate Astropy fitting warnings (with ierr > 4 into a single warning for each call of Trace.gFitTrace(). Set data types to Float as they are created rather than after, avoiding conversions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use
astropy.modelingto fit a Gaussian instead ofnmpfitwhich is deprecated.Also PEP 8 and other common sense changes.