Git Product home page Git Product logo

Comments (2)

rosesyrett avatar rosesyrett commented on August 29, 2024

I've now looked into this, and discovered the source of the problem.

When we ran the I22 experiment in november, we discovered that if we tried to set num=0 into all detectors, that the detectors would understand they need to take images forever. This turned out to not be the case for the Pilatus, so we modified the definition of a Pilatus (https://github.com/bluesky/ophyd-async/blob/main/src/ophyd_async/epics/areadetector/controllers/pilatus_controller.py) so that it set the number of triggers to 999,999.

The behaviour then was, we create the Flyer and prepare it, which means we arm all the detector controllers:

self._arm_statuses = await gather_list(
controller.arm(
trigger=trigger_info.trigger, exposure=trigger_info.livetime
)
for controller in self._controllers
)

By default, in the above code snippet, num=0 would be passed to all the detector controllers for this process. The tetramm in the directory_provider branch of dodal would raise an Exception if it ever got something that wasn't num=0: https://github.com/DiamondLightSource/dodal/blob/directory_provider/src/dodal/devices/tetramm.py#L130-L131

Now, we have changed the logic such that the number of frames comes from the plan, and such that num=0 is no longer passed. This was done in #96, however we failed to consider that the Tetramm would now raise this exception, as now a num was being passed to it.

A PR has been raised for the dodal repository, where this issue really ought to belong. But at the time of testing this out on Tuesday, it seemed like an ophyd_async issue.

Perhaps we ought to reconsider, at a higher level, if the PR I've proposed is the right thing to do (i.e. get the tetramm to ignore num or if we need to rethink how controllers work. Maybe we need a new subclass of controllers, e.g. ContinuousControllers which don't care about number of frames and DiscreteControllers which do? Also, we should probably remove this condition: https://github.com/bluesky/ophyd-async/blob/main/src/ophyd_async/epics/areadetector/controllers/pilatus_controller.py#L41.

from ophyd-async.

rosesyrett avatar rosesyrett commented on August 29, 2024

As an aside, we also need to consider the changes needed to the linkam plan in the i22-bluesky repository, now that the number of frames actually come from the plan (and is not assumed to be 0). I'm hoping that the changes are minimal but this needs further discussion.

from ophyd-async.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.