Giter Club home page Giter Club logo

2bm-ops's Introduction

energy-cli

energy-cli is commad-line-interface to set and tune beamline 2bm mode changes between mono, pink and white beam

Installation

$ git clone https://github.com/xray-imaging/2bm-ops.git
$ cd 2bm-ops
$ python setup.py install

in a prepared virtualenv or as root for system-wide installation.

Warning

If your python installation is in a location different from #!/usr/bin/env python please edit the first line of the bin/tomopy file to match yours.

Usage

Set energy

To set the beamline energy to 20 keV:

$ energy set --energy-value 20

to list of all available options:

$ energy -h
  usage: energy [-h] [--config FILE] [--version]  ...

  optional arguments:
    -h, --help     show this help message and exit
    --config FILE  File name of configuration file
    --version      show program's version number and exit

Commands:

  init         Create configuration file
  set          Set energy
  save         Associate the current beamline positions to an energy value
               and save in a config file
  status       Show status

Configuration File

The beamline status is stored in ops2bm.conf. You can create a template with:

$ energy init

osp2bm.conf is constantly updated to keep track of the last stored parameters, as initalized by init or modified by setting a new option value. For example to set the beamline to the last energy configuration

$ energy set

to list of all energy save options:

$ energy save -h

If the beamline has been manually optimized after setting a preset energy configuration, you can save the current beamline status in a custom config file with:

$ energy save --energy-value 27

The config file name is named ops2bm_mono_27.0.conf. You can restore the beamline positions for the optimized energy configuration with:

$ energy set --config ops2bm_mono_27.0.conf

Testing mode

In testing mode, the motor positions are printed but not actual motor motion occurs. To enable testing mode set:

TESTING = True

in epics_move file, then re-install with:

$ cd 2bm-ops
$ python setup.py install

2bm-ops's People

Contributors

decarlof avatar nikitinvv avatar xray-imaging avatar

Watchers

 avatar

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.