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

DECTRIS support; use PipelinedExecutor for live processing #51

Merged
merged 83 commits into from
Aug 24, 2022

Commits on Jul 28, 2022

  1. WIP: dectris support

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    50a6dec View commit details
    Browse the repository at this point in the history
  2. Real Dectris interface code

    uellue authored and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    ddd5500 View commit details
    Browse the repository at this point in the history
  3. Record and replay ZMQ messages

    A very simple file format: int64 length field
    followed by bytes of that length per message.
    uellue authored and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    c24ea05 View commit details
    Browse the repository at this point in the history
  4. Derive nimages from aq.shape.nav

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    61c56d3 View commit details
    Browse the repository at this point in the history
  5. Misc. dectris improvements

    - Add `lz4` dependency
    - Set `trigger_mode` explicitly, and ensure `nimages` and/or `ntrigger`
      is set according to the current `nav_shape`
    - Make the `trigger` function optional, as it is not needed unless you
      want to either set additional detector parameters, or automate
      acquisition with a microscope API
    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    3136e0d View commit details
    Browse the repository at this point in the history
  6. Drive-by: remove code duplication

    uellue authored and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    0f529cf View commit details
    Browse the repository at this point in the history
  7. Remove unused import

    uellue authored and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    29a7c0a View commit details
    Browse the repository at this point in the history
  8. Add bitshuffle dependency

    Use own fork for now, see
    kiyo-masui/bitshuffle#120
    uellue authored and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    d69f59b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b9aa50d View commit details
    Browse the repository at this point in the history
  10. Simulator for Dectris detector

    This simulator can replay an acquisition that was recorded with
    prototypes/zmq_record.py.
    
    Usage: `libertem-live-dectris-sim <file>`
    
    This is not a complete simulator, but implements just enough
    of the API to allow performance
    testing and run unit tests of the whole acquisition code.
    
    It reads the metadata from the recording and ensures that
    the user settings match the file. For exte and exts triggers
    it will assume to be triggered. For inte and ints
    it will wait for the 'trigger' command.
    uellue authored and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    8cbd7a9 View commit details
    Browse the repository at this point in the history
  11. Allow co-existence of Dectris acquisition objects

    ZMQ sockets balance load, meaning several co-existing listeners
    will only receive part of the data.
    
    For that reason we only connect while an acquisition is running and
    destroy the context directly after. That closes all sockets.
    uellue authored and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    023b0f1 View commit details
    Browse the repository at this point in the history
  12. Apply corrections

    Drive-by: Deactivate debug print.
    
    Co-authored-by: Alexander Clausen <a.clausen@fz-juelich.de>
    uellue and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    4e18717 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9036f95 View commit details
    Browse the repository at this point in the history
  14. Fix reversed shape

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    aad63b0 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f1d11ba View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    1728a3b View commit details
    Browse the repository at this point in the history
  17. Allow enabling file writing

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    fefe6d2 View commit details
    Browse the repository at this point in the history
  18. wip

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    8126ad4 View commit details
    Browse the repository at this point in the history
  19. WIP: Working prototyp for multiprocessing-based executor

    Still needs to be extracted into an executor and probably an adjusted
    `UDFRunner`.
    
    - properly drain and close queues
    - use a single response queue - this simplifies result handling on the
      receiving side (might become bottleneck in many-core situations)
    - perform decoding in the worker processes
    - `ZeroMQReceiver`: zero-copy recv, at least for the payload
    - some hacks to inject the receiver into the partition
    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    d19a079 View commit details
    Browse the repository at this point in the history
  20. WIP

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    40c4b15 View commit details
    Browse the repository at this point in the history
  21. Updates for pipelined executor

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    78ca481 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    257b250 View commit details
    Browse the repository at this point in the history
  23. WIP: update merlin to new API

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    ec960f9 View commit details
    Browse the repository at this point in the history
  24. Fixup for 359c5bd

    The duplicated code for `StoppableThreadMixin` was modified to take
    a `stop_event`, which is now moved to `libertem_live.detectors.common`.
    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    348340d View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    da40ee0 View commit details
    Browse the repository at this point in the history
  26. Require current LiberTEM (0.10)

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    d85ece0 View commit details
    Browse the repository at this point in the history
  27. Try to fix version constraint

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    8891142 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    8982808 View commit details
    Browse the repository at this point in the history
  29. merlin: simplify comparison test case

    This should now continue to work, even if we change further details of
    the communication between acquisition and partition
    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    31dd7fa View commit details
    Browse the repository at this point in the history
  30. Follow-up renaming: get_controller -> get_task_comm_handler

    Also fixes tracing span names
    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    56ef8a8 View commit details
    Browse the repository at this point in the history
  31. Allow running the Dectris simulator in pytest

    * Restructure to make all relevant components of the simulator
      importable and runnable from other code
    * Run Flask app for API in separate process to make it killable
    * Allow running both API and data on random free port
    * Fixture and simple test case, FIXME integrate meaningful tests
    * FIXME the other Dectris test cases seem to be broken, not sure what to do
      there
    uellue authored and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    1eec10e View commit details
    Browse the repository at this point in the history
  32. Mark as data test

    uellue authored and sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    826409d View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    fd47000 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    90fdaa4 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    84a63ef View commit details
    Browse the repository at this point in the history
  36. Depend on LiberTEM >= v0.10

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    d79b522 View commit details
    Browse the repository at this point in the history
  37. It's not really a protocol...

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    ab035ad View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    6118026 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    0a87587 View commit details
    Browse the repository at this point in the history
  40. More environment re-creation

    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    2f7c209 View commit details
    Browse the repository at this point in the history
  41. Add missing DEigerClient

    Disregard copyright notice, will be changed before merging (!)
    sk1p committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    c56db8c View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    75f4efe View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    8268426 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    75772c9 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2022

  1. Configuration menu
    Copy the full SHA
    e5f4e32 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8fe94fa View commit details
    Browse the repository at this point in the history
  3. More memfd stuff

    sk1p committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    f9a132a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0625285 View commit details
    Browse the repository at this point in the history
  5. UDF for recording data

    FIXME documentation and tests
    uellue committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    a474460 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8b8849b View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2022

  1. Configuration menu
    Copy the full SHA
    72993da View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    624821c View commit details
    Browse the repository at this point in the history
  3. tox.ini: install dectris extras; remove hdbscan

    hdbscan does not exist as an extra of LiberTEM-live
    sk1p committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    1a3279b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    383d53b View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2022

  1. Test case for a skipped frame

    Caused a freeze in the pipelined executor before
    uellue committed Aug 4, 2022
    Configuration menu
    Copy the full SHA
    3cf67dd View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2022

  1. DECTRIS sim: send multipart messages; misc fixes

    * Ignore extra data at the beginning of the file
    * Add missing acquisition footer
    sk1p committed Aug 15, 2022
    Configuration menu
    Copy the full SHA
    22227ba View commit details
    Browse the repository at this point in the history
  2. Use LiberTEM-dectris-rs

    sk1p committed Aug 15, 2022
    Configuration menu
    Copy the full SHA
    17e9a49 View commit details
    Browse the repository at this point in the history
  3. merlin: fix for small partitions

    sk1p committed Aug 15, 2022
    Configuration menu
    Copy the full SHA
    de1c860 View commit details
    Browse the repository at this point in the history
  4. Otel instrumentation for Eiger client

    Debug connection lag on Windows
    
    FYI it was DNS for localhost -- examples should use IP address instead
    uellue committed Aug 15, 2022
    Configuration menu
    Copy the full SHA
    ce2c0e9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    201de86 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2022

  1. Update to libertem_dectris>=0.2

    + Clean up some now-unused code
    + Move mocking/offline receiver into
      `libertem_live.detectors.dectris.mock`
    + dectris sim: use Python sim when `data_filter` is used
      (not needed for performance tests)
    sk1p committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    8c36640 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ff200d9 View commit details
    Browse the repository at this point in the history
  3. Require Python 3.7 for dectris support

    Don't install libertem-dectris on Python 3.6
    sk1p committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    fc2090c View commit details
    Browse the repository at this point in the history
  4. Fix constraint syntax

    sk1p committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    2c7d2b8 View commit details
    Browse the repository at this point in the history
  5. Lazily import dectris dependencies

    Throw a helpful error message when dependencies are missing
    sk1p committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    a8d9000 View commit details
    Browse the repository at this point in the history
  6. More lazy imports

    sk1p committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    606996f View commit details
    Browse the repository at this point in the history
  7. Don't clobber the ctx_pipelined in test_frame_skip

    Instead, pull up a new one which we can close at the end
    sk1p committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    761269d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9ede22d View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2022

  1. dectris sim: fix for Python 3.6

    To at least make it importable - this doesn't add full 3.6 support
    sk1p committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    49adba0 View commit details
    Browse the repository at this point in the history
  2. merlin: cleanup; pool_size is not used anymore

    Ignore and warn. Also remove some unused commented code.
    sk1p committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    e6b54f2 View commit details
    Browse the repository at this point in the history
  3. Only run test_frame_skip on recent LiberTEM versions

    On older versions, it does still hang, so we can't run that test in CI.
    sk1p committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    50bba77 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f6abec7 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2022

  1. Configuration menu
    Copy the full SHA
    5f32333 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f2c6a83 View commit details
    Browse the repository at this point in the history
  3. Improved documentation

    * Switch to RTD theme
    * Run the dectris sim in docs-check to check the example code
    * Separate sections for API reference and user documentation
    * Add verbosity switch in dectris sim to make sphinx doctest happy (it's
      not yet possible to ignore output of testsetup / testcleanup
      directives)
    * dectris sim: catch StopException
    sk1p committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    6d09ba3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    549023f View commit details
    Browse the repository at this point in the history
  5. Add dectris example notebook

    sk1p committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    0e86c4b View commit details
    Browse the repository at this point in the history
  6. Add changelog entries

    sk1p committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    eb274b9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    312f456 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2022

  1. Configuration menu
    Copy the full SHA
    2ff5fc0 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2022

  1. Configuration menu
    Copy the full SHA
    bb6da73 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4389c70 View commit details
    Browse the repository at this point in the history
  3. Fix copypasta

    Thx @sk1p!
    uellue committed Aug 24, 2022
    Configuration menu
    Copy the full SHA
    06dfcac View commit details
    Browse the repository at this point in the history