-
Notifications
You must be signed in to change notification settings - Fork 29
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
Updates to detect.py, sigproc.py and quantize.py blocks #218
Conversation
telegraphic
commented
Aug 10, 2023
•
edited by jaycedowell
Loading
edited by jaycedowell
- Added Stokes-I and 'coherence' mode to detect.py
- Added more telescopes to the sigproc.py and sigproc2.py lookup dictionaries
- Enabled cuda support in quantize.py and unpack.py
Adding Stokes I and coherence modes, which were in a previous PR that was too difficult to merge
The telescope -> integer ID scheme is insane, but I've added a few from https://github.com/SixByNine/sigproc/blob/28ba4f4539d41a8722c6ed194fa66e87bf4610fc/src/aliases.c#L52 and https://github.com/FRBs/sigpyproc3 and set MWA = 12
I recall we tackled this a few years ago, perhaps in the ill-fated dcp-merge PR.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #218 +/- ##
==========================================
- Coverage 67.56% 67.50% -0.06%
==========================================
Files 65 65
Lines 5515 5524 +9
==========================================
+ Hits 3726 3729 +3
- Misses 1789 1795 +6 ☔ View full report in Codecov by Sentry. |
@league can you take a look at the type hints in blocks/quantize.py? |
@league can you take a look at the type hints in the PR? |
Looking at and validating type annotations. One error I don't know what to do with yet... the comment in sigproc2.py that says "this is broken" ... the code just beneath fails validation because There's another error about
to focus just on the files touched by this PR. (With the default follow-imports setting, there are lots of error that show up in imports, including in |
I guess that "broken" else branch was being used. Can claim then that dtype is optional and keep None there.
I think the correct thing to do is throw an exception and let the user know that sub-byte types are currently unsupported. |
I tried it in 8c5d258, and it turned out that one of the test cases failed due to the exception… class TestPrintHeader(unittest.TestCase):
"""Test all aspects of the print header block"""
def setUp(self):
self.fil_file = "./data/2chan4bitNoDM.fil"
def test_read_sigproc(self):
... Apparently sigproc can proceed with |
With respect to type annotations in the files touched by this PR, I think they are ready to go. I added a "make check" to the Makefile that runs the mypy checker on a limited selection of files. The idea could be that we gradually expand its scope. It's not run by any CI actions, but maybe that could come later as well. |