Skip to content
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

scans don't apply multiple negated tags, or a mix including at least one negated tag, correctly #309

Open
adriaanph opened this issue Jul 7, 2020 · 2 comments

Comments

@adriaanph
Copy link
Member

currently, select(scans=["~slew","~stop"]) does nothing. that's because the scan filters are ORed together. same with compscans.

the current behaviour is unexpected since it is reasonable to expect the rules of boolean algebra to apply, i.e. all un-negated tags get ORed while negated tags get ANDed with the rest.

the relevant code appears in katdal/dataset.py line 740, where negated tags are ORed. this OR could simply be changed to AND.

while one may go overboard with this issue and invent a syntax to support complicated sequences of ANDs and ORs, i propose that a reasonable user would be happy to accept that all un-negated tags are ORed together, before being ANDed with the negated tags.

@ludwigschwardt
Copy link
Contributor

Why not just select(scans=['track', 'scan'])? Or is this trickier with compscans?

@adriaanph
Copy link
Member Author

indeed, there are many work-arounds possible, but the issue remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants