8000 Add PIXTLM and BGDTYP by jeanconn · Pull Request #90 · sot/chandra_aca · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 10 commits into from
Jul 29, 2020
Merged

Add PIXTLM and BGDTYP #90

merged 10 commits into from
Jul 29, 2020

Conversation

jeanconn
Copy link
Contributor
@jeanconn jeanconn commented Jan 28, 2020

This includes the follwing changes:

  • Add PIXTLM and BGDTYP (telemetry for dynamic background patch)
  • add kwargs to maude_decom functions that get passed to maude (this is to get telemetry from channel='ASVT', which is where dynamic background patch data is at this time)
  • added VCDU frame counter to aca packets returned by maude_decom.get_aca_*
  • test and test data for PIXTLM, BGDTYP (and VCDUCTR)

@jeanconn
Copy link
Contributor Author

Also, doesn't look to be working at all on the ASVT data ignoring the pixel issue, so this is super WIP.

@jeanconn jeanconn changed the title Add PIXTLM and BGDTYP WIP: Add PIXTLM and BGDTYP Jan 28, 2020
@jeanconn jeanconn changed the base branch from master to asvt January 28, 2020 23:11
@jeanconn jeanconn changed the title WIP: Add PIXTLM and BGDTYP Add PIXTLM and BGDTYP Feb 7, 2020
@javierggt
Copy link
Contributor
javierggt commented Feb 11, 2020

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.

@javierggt
Copy link
Contributor

After the latest commit, I think this is ready.

@jeanconn
Copy link
Contributor Author

My plan was to rebase this and merge to master after #89. Since this is testing with a pkl in the project, do we need an ASVT-calling test too as part of #89?

@javierggt javierggt changed the base branch from asvt to master February 13, 2020 19:58
@javierggt
Copy link
Contributor

I think #89 is not controversial, since it is just passing through the kwargs. That is why I though of merging together with this.

@jeanconn
Copy link
Contributor Author

OK. We can close #89 as superseded by #90. Still wondering if we need an ASVT test or if we just don't care because from a maude perspective FLIGHT and ASVT are just labels.

@jeanconn jeanconn mentioned this pull request Feb 13, 2020
@javierggt
Copy link
Contributor

maude kwargs are used by the changes in this PR, because of the 'channel' argument. I would not add tests for that.

@jeanconn
Copy link
Contributor Author

OK. So right, the kwargs get "exercised" in that test anyway so this is done.

@jeanconn
Copy link
Contributor Author

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?

@jeanconn jeanconn requested a review from taldcroft February 13, 2020 23:47
Copy link
Member
@taldcroft taldcroft left a 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.

@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@taldcroft
Copy link
Member

It looks like this was sufficiently reviewed and approved, so merging now.

@taldcroft taldcroft merged commit 4c4b141 into master Jul 29, 2020
@taldcroft taldcroft deleted the pea_decom branch July 29, 2020 16:07
@javierggt javierggt mentioned this pull request Dec 7, 2020
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

Successfully merging this pull request may close these issues.

3 participants
0