Giter VIP home page Giter VIP logo

sardana-limaccd's People

Contributors

jairomoldes avatar jordiandreu avatar ovallcorba avatar reszelaz avatar rhomspuron avatar tiagocoutinho avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sardana-limaccd's Issues

Lima controller "moving" when lima server restarted

Hi,

  1. I start lima device server.
  2. start sardana with a pre-configured lima ctrl and a lima channel
  3. in spock, read the state or status of the lima ctrl or lima channel gives "MOVING"

IMHO, it should be ON.

Empirical timesleep is not enough

I find out that the empirical time sleep value used when preparing the detector saving parameters is not enough and does not guarantee the correct configuration in random circumstances.

Proposal for Lima configuration inside sardana

This is a request for enhancement to be able to use lima inside sardana in a useful way.

Some features of the MG are decoupled from the sardana scan infrastructure.
For example, the ScanDir / ScanFile environment used in scans has no connection with ValueRefPattern in the 2D channel.
We want to propose and agree on a set of tools that close this gap and allow for coherent configuration.

The proposal is just an initial starting point. Every point is fully open for discussion/change/removal.

Lima 2D Controller

  • missing check: ensure that an acquisition can only be performed if valueref == True
  • missing feature: internal-trigger-multi

MS configuration

Before any scan is executed, validation and configuration needs to be made to both active the measurement group and the lima 2d channels enabled.
We propose:

  • a general hook (called lima_hook) should ensure both lima channels and measurement group are properly configured
  • a set of macros to change the lima configuration:
    • a lima_reconfig - ensures the lima system is properly configured (ie, lima_hook is registered as a general hook plus any other config that we find necessary)
    • set_lima_conf - configures the specified detector with the given configuration (ex: set_lima_config xpress3_image prefix XP3_)
    • get_lima_conf - shows the active lima config for the given detector
    • def_lima registers the given detector (ex: def_lima xpress3_image prefix=XP3_ index=05d)

The internal lima configuration structure could look something like this:

{
  "detectors": {
    "xpress3_image": {
      "prefix": "XP3_",
      "suffix": ".h5",
      "index": "05d",
      "scan_sub_dir": "scan_{ScanID:04d}",
      "directory": "xp3"
    },

    "mythen": {
      "prefix": "myth_",
      "suffix": ".edf",
      "index": "04d",
      "scan_sub_dir": "scan_{ScanID:04d}",
      "directory": "mythen"
    },
  }

With the above example in mind, and imagining the ScanDir=/tmp; ScanID=34, before a scan is done, the lima_hook would ensure that:

  • the detectors ValueRefPattern in the measurement group follows :<ScanDir>/<directory>/<scan_sub_dir>/<prefix>{index:<index>}<suffix>. Example /tmp/xp3/scan_0035/XP3_{index:05d}h5
  • ensure ValueRefEnabled=True
  • the above directory exists and is writable
  • any other checks deemed appropriate

Open question:
Where to store the configuration?

  1. sardana settings as they are now
  2. sardana settings with redis backend (see sardana PR 1200)
  3. use a redis db directly

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.