-
Notifications
You must be signed in to change notification settings - Fork 0
Add PIXTLM and BGDTYP #90
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
Also, doesn't look to be working at all on the ASVT data ignoring the pixel issue, so this is super WIP. |
I just added functionality to get VCDU counter. I also updated the test after adding VCDU counter. There are still no unit tests for the decom, but I looked at the test data from mark. I used this notebook: https://nbviewer.jupyter.org/urls/cxc.cfa.harvard.edu/mta/ASPECT/jgonzalez/Dynamic_Background_Decom.ipynb Note that the alternating raw and dynamic background values seems to start earlier than what Mark said. |
After the latest commit, I think this is ready. |
I think #89 is not controversial, since it is just passing through the kwargs. That is why I though of merging together with this. |
maude kwargs are used by the changes in this PR, because of the 'channel' argument. I would not add tests for that. |
OK. So right, the kwargs get "exercised" in that test anyway so this is done. |
I can't approve my own PR though and this is now half @javierggt 's work. @taldcroft do you want to approve before we merge? |
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.
I did not actually run the tests myself, but it looks good to me apart from two documentation nitpicks. We should get this and #95 in the 2020.3.
chandra_aca/maude_decom.py
Outdated
@@ -355,9 +355,18 @@ def unpack_aca_telemetry(packet): | |||
img_pixels = np.sum(np.packbits(_pixel_bits, axis=1) * [[2 ** 8, 1]], axis=1) | |||
img_header['pixels'] = img_pixels | |||
slots.append(img_header) | |||
integ, glbstat = _unpack('>HB', packet[:3]) | |||
|
|||
# The first two bytes that were integration time will have first two bits for |
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.
Write this comment so it will also work in 2027. You can mention pre- / post-dynamic background patch.
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.
I don't quite understand the comment on the comment about 2027, but seems fine to remove the "were integration time" part.
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.
I went with
# Before the dynamic background patch, the first two bytes contained INTEG in those
# 16 bits (named integbits). After the dynamic background patch, the first 6 bits of
# integbits will be repurposed: two bits for PIXTLM, next bit for BGDTYP, 3 spares,
# and 10 bits for INTEG. This telem/decom change is back-compatible and can be promoted
# before the dynamic background patch is in use onboard.
It looks like this was sufficiently reviewed and approved, so merging now. |
This includes the follwing changes: