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

Add experimental ASI TPX3 Support #81

Merged
merged 20 commits into from Apr 19, 2023
Merged

Add experimental ASI TPX3 Support #81

merged 20 commits into from Apr 19, 2023

Conversation

sk1p
Copy link
Member

@sk1p sk1p commented Apr 17, 2023

Currently includes #74 - once that is merged, I'll rebase. Fixes #77

TODO

For the first experimental version, the following should be sufficient:

  • Import code from LiberTEM-rs examples
  • Write connection builder and integrate into LiveContext
  • Update some details
    • connection: make parameters consistent w/ DECTRIS (uri vs. data_host + data_port)
    • connection: use total size of shm area, vs. number of slots plus their size
  • Initial round of docs
    • Usage description
    • Docstrings: add/update parameters and descriptions of the main classes
    • Examples in docstrings
  • Re-write sim to conform to our generic simulator interface
    • Stoppable background thread
    • Automatic port allocation
    • Triggering? Might be needed at least for tests
  • Tests
    • Add test data to data mgmt (or rather, copy/move to the libertem-test-data folder)
    • Add simulator startup to the docs
    • Add passive mode example to docs
    • Add simulator startup to conftest.py for docstrings, in a autouse fixture; also asi_tpx3/conftest.py
    • Write the usual integration tests

Contributor Checklist:

  • I have added or updated my entry in the creators.json file
  • I have added a changelog entry for my contribution
  • I have added/updated documentation for all user-facing changes
  • I have added/updated test cases

Reviewer Checklist:

  • /azp run libertem.libertem-live-data passed

@sk1p
Copy link
Member Author

sk1p commented Apr 17, 2023

/azp run libertem.libertem-live-data

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sk1p
Copy link
Member Author

sk1p commented Apr 17, 2023

/azp run libertem.libertem-live-data

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Patch coverage: 87.47% and project coverage change: +2.11 🎉

Comparison is base (3143ed3) 77.13% compared to head (02e42e0) 79.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
+ Coverage   77.13%   79.24%   +2.11%     
==========================================
  Files          31       35       +4     
  Lines        2943     3359     +416     
  Branches      410      446      +36     
==========================================
+ Hits         2270     2662     +392     
- Misses        544      561      +17     
- Partials      129      136       +7     
Impacted Files Coverage Δ
src/libertem_live/detectors/dectris/connection.py 90.21% <ø> (+1.91%) ⬆️
src/libertem_live/detectors/common.py 86.59% <82.60%> (-9.96%) ⬇️
src/libertem_live/detectors/asi_tpx3/sim.py 84.75% <84.75%> (ø)
src/libertem_live/detectors/asi_tpx3/connection.py 89.47% <89.47%> (ø)
...rc/libertem_live/detectors/asi_tpx3/acquisition.py 89.63% <89.63%> (ø)
src/libertem_live/api.py 100.00% <100.00%> (+20.00%) ⬆️
src/libertem_live/detectors/asi_tpx3/__init__.py 100.00% <100.00%> (ø)
src/libertem_live/detectors/base/acquisition.py 85.54% <100.00%> (+6.97%) ⬆️
src/libertem_live/detectors/base/connection.py 100.00% <100.00%> (ø)
src/libertem_live/detectors/dectris/sim.py 58.93% <100.00%> (+0.38%) ⬆️
... and 1 more

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sk1p
Copy link
Member Author

sk1p commented Apr 18, 2023

/azp run libertem.libertem-live-data

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sk1p sk1p requested a review from uellue April 18, 2023 14:34
@sk1p sk1p added this to the 0.2 milestone Apr 18, 2023
@sk1p
Copy link
Member Author

sk1p commented Apr 18, 2023

/azp run libertem.libertem-live-data

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

sk1p added 17 commits April 19, 2023 10:12
* In some cases, the detector may have the concrete `nav_shape`
  available, then it doesn't make sense to start guessing
* Add pytest fixtures for asi tpx3 simulator etc.
* Start work on ASI TPX3 docs
* uri -> data_host + data_port
* num_slots -> buffer_size
* Add (hopefully reasonable?) defaults for bytes_per_chunk
  / chunks_per_stack etc.
Make sure we correctly update our tracking of `passive_started`, so we
try to restart passive mode after reconnecting. Also add tests for
coverage of the asi_tpx3 sim
@sk1p
Copy link
Member Author

sk1p commented Apr 19, 2023

/azp run libertem.libertem-live-data

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Don't use such a low value - for sparse data, much larger partition
sizes are efficient.
@sk1p
Copy link
Member Author

sk1p commented Apr 19, 2023

/azp run libertem.libertem-live-data

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@uellue
Copy link
Member

uellue commented Apr 19, 2023

Let's merge with debug output and see where it goes...

@uellue uellue merged commit fd9dbf4 into LiberTEM:master Apr 19, 2023
16 checks passed
@sk1p sk1p deleted the asi-tpx3 branch April 19, 2023 10:37
@sk1p sk1p mentioned this pull request Apr 19, 2023
23 tasks
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.

Add ASI TPX3 support
2 participants