GithubHelp home page GithubHelp logo

mx_importer's Introduction

GUI for Automated puck loading software

Prototype for the puck loading software for the MX beamlines at NSLS-II.

Requirements:

  • Install requirements.txt using pip install --user -r requirements.txt
  • Compatible with LSDC GUI conda environments

Usage:

  • Set up a configuration yaml file (Example configuration file provided in config.yaml)
  • Type python start_importer.py path/to/yaml/config.yaml to run the GUI
  • Change the master list of pucks by editing masterlist.json. Add or remove pucks in the list with the key whitelist or blacklist

Purpose

This software is designed to make the process of importing puck data easier and less error prone by providing validation and exact location of errors in the data.

Rules implemented as of July 2023

Preprocessing

  1. Imported file should contain the following column names, case is ignored

    • puckname
    • position
    • samplename
    • model
    • sequence
    • proposalnum
  2. Only columns with the names above are imported every other column is ignored

  3. All values in the position and proposalnum should be numerical only. Alphabets and characters are automatically removed

  4. All whitespaces are stripped from data

Validation checks

  1. Match puck names against the blacklist and whitelist. Blacklisted pucks highlighted in red and pucks NOT in whitelist highlighted in yellow
  2. Sample names cannot exceed 25 characters and should only contain letters, numbers, dash - and underscore _
  3. Sample names cannot be empty
  4. Sample names cannot be repeated in the same column
  5. Proposal numbers must contain exactly 6 digits no alphabets or special characters
  6. Proposal numbers should all be the same
  7. Combination of puck name and position should be unique (For eg. two rows cannot have Puck-ABC with position 1)

Validation checks happen when the spreadsheet is first imported, manually triggered from the menu and just before submitting the data to the mongo db

Configuration file

The following is an example of the configuration file that the software expects

admin_group: admin
beamline: TLA
database_host: localhost:8000
disable_blacklist: false
disable_whitelist: true
list_path: masterlist.json
  • admin_group : Specifies which user group the admin should belong to, only those part of the admin group can see the settings window
  • beamline : Three letter acronym for the beamline
  • database_host : Address of the amostra and conftrak mongo database
  • disable_whitelist : Choose whether to use or ignore whitelist during validation
  • disable_blacklist : Choose whether to use or ignore blacklist during validation
  • list_path: Path to json file that contains black and white lists

mx_importer's People

Contributors

vshekar 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.