-
Notifications
You must be signed in to change notification settings - Fork 40
Mss3 #817
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
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.
Some minor comments. Thanks for the additional unit tests!
if inverse: | ||
return ~self.obj._views[view_name] | ||
else: | ||
return self.obj._views[view_name] |
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.
Inverting intervals on the fly is a neat feature. However, this is not free. My concern is that if calling code repeatedly loops over negated intervals, then that will create a temporary object on every call. It would be much better to just create such an interval list once. For the use case in this PR (flagging negated intervals) it is fine, but we should avoid ever using the ~
syntax when passing views to pointing operators and mapmaking templates for example. Another option would be to only create these negated intervals temporarily in the FlagIntervals operator and then delete them. I am fine leaving this as-is, but we should perhaps add a warning to the documentation.
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.
Good point. Added a warning that is triggered when the same view is inverted more than 100 times.
src/toast/ops/flag_intervals.py
Outdated
@@ -20,7 +20,8 @@ class FlagIntervals(Operator): | |||
with shared flags. The view_mask trait is a list of tuples. Each tuple contains | |||
the name of the view (i.e. interval) to apply and the bitmask to use for that | |||
view. For each interval view, flag values in the shared_flags object are bitwise- | |||
OR'd with the specified mask for samples in the view. | |||
OR'd with the specified mask for samples in the view. If the name of the view is | |||
prefixed with '~' or '-', the bitmask is applied to all samples outside the view. |
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.
You mention using -
here in addition to ~
, but the observation view manager only considers ~
. Did I miss something?
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.
That was the original idea but really only ~
makes sense.
…r repeated inversions
A bucket of tweaks needed to facilitate the MSS3 simulations:
FilterBin
operator andsotodlib
Splits
operatorScan
object when the Celestial coordinates are not yet calculatedFlagIntervals