-
Notifications
You must be signed in to change notification settings - Fork 7
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
Assorted bug fixes #275
Merged
Merged
Assorted bug fixes #275
Conversation
This file contains 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
14 tasks
ssiegelx
reviewed
Jun 4, 2024
jmaceachern
approved these changes
Jun 5, 2024
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 great. I think after double checking Seth's point about units, this looks good to merge.
ssiegelx
reviewed
Jun 10, 2024
ssiegelx
reviewed
Jun 10, 2024
ssiegelx
approved these changes
Jun 12, 2024
The minimization routine used to find an optimal factorizable mask used method 'golden', which would fail to find a proper bracket with scipy > 3.8 (used in python 3.10). With more up-to-date versions of scipy, we need to use a simpler 'bounded' minimization
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.
Some miscellaneous bug fixes:
np.ndarray
instead ofmpiarray.MPIArray
inMaskBaselines
. This was causing an error in python 3.11+ because ufuncwhere
is not defined for distributed arraysminimize_scalar
inMaskFreq
. The previous methodgolden
would fail with newer versions of scipy because it could not find a valid bracket. I believe that this is because the function being minimized is roughly monotonically decreasing, so the criteriafunc(xb) < func(xa) and func(xb) < func(xc)
could not be met. (See: https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize_scalar.html). I also tried using a standardscipyoptimize.minimize
here. The only method which would converge properly wasCOBYLA
, but it sometimes produced a slightly different mask even with appx. the same minimum at a1e-4
tolerance.nsigma
initial threshold for thesumthreshold
algorithm inRFIStokesI
and a variance estimate. Previously, the default threshold of the 95th percentile was being used, which causes problems when previous masks have been applied. The variance is calculated in a slightly wonky way, but it works well to applysumthreshold
over daytime data. A variance boost of1e4
is added during solar transit, andmax_m
is increased for better masking.sumthreshold
With these changes, we can run the pipeline with the newest version of python available on Cedar (3.11.5), which has a built module
chime/python/2024.04