Code Monkey home page Code Monkey logo

isaraloader's Introduction

ISARA loader

BioMAX beamline sample location and experiment planner

Web application to locate available positions in the BioMAX sample changer and prepare the session in ISPyB for MXCuBE3.

Uses RpiMotorLib for Servo motor functions Uses ISPyB for beamline database information

It is designed to run from a Raspberry Pi 3

Application map

  • Read information from BioMAX ISARA tango device
  • Checks user proposals from ISPyB and shipment contents
  • Assign position in ISARA and saves the information back in ISPyB
  • Provide staff access for remote data collection preparation

Development

Components

The ISARA_loader consists of 3 major components:

  • Web Application
  • ISPyB API
  • Servo motor functions

The Web Application component implements the UI part of the ISARA_loader. It is build on top of Django framework, and serves the web-requests.

The ISPyB API component handles database read/write. User access is grated by MAXIV's Digital User Office

The Servo motor functions are used to control PWM cycles of two orthogonal servo SG90 motors.

Dependencies

The required python package are listed in both environment.yml.

Set-up with conda

Follow steps below to set-up an environments for running ISARA_loader using conda.

  • use you prefered method for installing conda

  • clone this repository

    git clone

  • create conda environment 'ISARAloader'

    conda env create -f /environment.yml

The conda environment 'ISARAloader' will contain all required package for ISARAloader webapp.

Running the Webapp

To run ISARAloader application the Web Application component must be started.

To start Web Application activate 'ISARAloader' environment and run:

./manage.py runserver 0.0.0.0:<port>

Access it from any device connected to the same network. The intented access is from a touchscreen device, such as a Tablet.

Training the laser positions

Open the terminal and SSH to the Raspberry Pi:

python3 /home/pi/ISARA_loader/laser/views/calibration.py

Your terminal will capture keyboard inputs and move the laser in pan-tilt

Shortcuts

Keyboard shortcut Action
arrow up Move 1 degree up
keypad 8 Move 0.1 degree up
arrow down Move 1 degree down
keypad 2 Move 0.1 degree down
arrow right Move 1 degree right
keypad 6 Move 0.1 degree right
arrow left Move 1 degree left
keypad 4 Move 0.1 degree left
n Next basket
p Previous basket
s Save all baskets definitions
spacebar Move laser to stored position for current basket
r Reset angles for the current basket to [90,90]
ESC Quits the program

One or more positions can be updated at any time.

After the definitions are updated, go the iPad, click Settings -> Update Definitions. This will load new values from previously save definition files.

If you need to reset all angular definitions at once, delete the file:

/home/pi/baskets.pickle

Start the calibration again and proceed as described before.

Demo

iPad interface

isaraloader's People

Contributors

gustalima avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

meguiraun

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.