Giter Club home page Giter Club logo

meshbest's Introduction

meshbest

This is Mesh Best software module.

-------Tasks-------

MeshBest performs recognition of the crystal samples based on a mesh scan (or 2D X-ray diffraction scan routine). It says how many crystals are in the scanned 2D area, how well they diffract and also reports their dispositions and size approximations.

-------Input-------

MeshResults.json dictionary file containing:

  • Numbers of columns and rows of the mesh scan (col, row)

  • X-ray wavelength used, Detector distance, Centre coordinates of the beam (in detector px), Beam dimensions (mm), detector pixel size (mm) and a list of available aperture sizes (in microns) to predict aperture choice

  • Lists of detected spot coordinates and for each image of the mesh scan: in detector coordinates, in base64 string format

  • Overall diffraction score for each image

MeshBest uses .json file containing all experiment parameters (of a mesh scan) and output given by Dozor pre- analysis. The output from Dozor should contain diffraction score evaluation for every image of the mesh scan and as well a list of detected diffraction spot coordinates in base64 string format.

-------Output-------

MeshBest produces a 2D colour map indicating different crystal zones found in the sample area. This map appears under the name CrystalMesh.png in the MeshBest working directory. Most of MeshBest output can be found in MeshResults.json file, in ['MeshBest'] partition of the dictionary. The dictionary is also returned by simple() method function.

Best Positions

For multicrystal MeshAndCollect experiment pipeline MeshBest does pre-analysis where estimates positions and appropriate beam sizes (depends on the available aperture sizes on the beamline) for collecting small wedges of data.The output array is returned in ['MeshBest']['BestPositions'] dictionary partition in base64 string format. The structure of the output array is the following:

  • column 0: X coordinate of the centre
  • column 1: Y coordinate of the centre
  • column 2: Suggested aperture size
  • column 3: Integral diffraction quality

Every row represents a particular position/crystal for data collection. "Result_BestPositions.txt" is the text file with an output array.

Elliptic Fit

For X-ray Centering pipeline MeshBest does crystal approximations on the map to elliptic shapes.

If elliptic approximations have been made to crystal areas, the output dictionary contains ellipse parameters in ['MeshBest']['EllipseArray'] in base64 string format.

The output also gives a text file with parameters of ellipses - "Result_Ellipses.txt", where the architecture is similar:

  • column 0: X coordinate of the centre
  • column 1: Y coordinate of the centre
  • column 2: Ellipse long axis
  • column 3: Ellipse short axis
  • column 4: Angle between the long axis and mesh scan X-axis
  • column 5: Integral diffraction quality

-------Usage-------

To proceed with the simple algorithm where returned is only a crystal map one should call the function simple() imported from meshbest.algorithms. One should pass the json file to the function with all experiment parameters and pre-analysis by Dozor. If working directory is not specified as a second argument to simple(), MeshBest will work in the CWD and produce related output files there.

meshbest's People

Contributors

neoswing avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kuntaro0524

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.