Architecture Overview

digraph D {
    compound=true
    subgraph cluster_apis {
        node [style=filled,color=white];
        style=filled;
        color=lightgrey;
        servers -> mongo_db [dir=both];
    }

  lsdc_server [shape=box, label="LSDC Server"]
  lsdc_gui [shape=box, label="LSDC GUI"]
  epics_ca [label="EPICS CA"]
  servers [label="amostra\nconftrak\nanalysisstore"]
  mongo_db [label="MongoDB"]
  mx_tools [shape=box, label="MX Tools"]
  
  lsdc_gui -> epics_ca [color=black, label="send_to_server()\naux_send_to_server()"]
  epics_ca-> lsdc_server [color=black, label="PV = \n command_s \n immediate_command_s"]
  lsdc_gui -> servers [dir=both]
  lsdc_server -> servers [dir=both]
  lsdc_server -> mx_tools
}

Overview of the LSDC system

LSDC consists of a number of components. These include:

LSDC GUI

The graphical user interface that allows a users or staff to interact with all the systems involved with the data acquisition systems

LSDC Server

The server script that runs on specific machines that co-ordinates with the GUI and other systems.

Microservices

A set of microservices that support LSDC with sample management (Amostra) and configuration management (Conftrak)

Microservices

Amostra
digraph D {
    node [shape=record]
    //add legend box. put in current revision/file that this applies to
    subgraph cluster_0 { a; label="container"; color=blue}
    a [label="content"] //container 
   
    subgraph cluster_1 { b -> c; label="request"; color=blue;}
    b [label="project"] //request
    c [label="sample"]

    subgraph cluster_2 { d -> e; label="sample"; color=blue}
    d [label="project"] //sample
    e [label="container"]

    subgraph cluster_3 { f -> g; label="sample2"; color=blue}
    f [label="project"] //sample
    g [label="container"]

    c -> d
    c -> e
    a -> d
    a -> f
}

Amostra Schema

Amostra is sample management web app that connects to a MongoDB instance. The server is a thin tornado instance that associates requests made by LSDC to existing projects. For more documentation, see amostra docs

Conftrak

Configuration management tool for beamlines based on Amostra. For more information, see conftrak docs

Analysisstore

Used to store analysis results. For example, raster results and Chooch (energy scan) results go in here. For more information, see analysisstore docs

LSDC Server

The LSDC server is a continuously running process in a server node that reads specific EPICs command PVs and runs them. Currently, the server script is started using daq_main2.py

digraph D {
    node [shape=record]

    a [label="PyQT GUI"]
    b [label="EPICS Soft IOC (Middleware)"]
    c [label="database\nlib"]
    d [label="Control\nMain Shell"]
    e [label="Amostra\nAnalysisStore\nConfTrak"]
    f [label="ISPyB"]
    g [label="SynchWeb Web\nInterface"]
    h [label="Auto Process"]
    i [label="goniometer\nlib"]
    j [label="detector\nlib"]
    k [label="beamline\nlib"]
    l [label="robot\nlib"]
    m [label="areaDetector\nEPICS"]
    n [label="Ophyd\nBlueSky"]
    o [label="EMBL\nJLIB"]
    p [label="Delta Tau"]

    a -> b [label="channel access"]
    b -> a
    d -> c [color="red"]
    c -> e [color="red"]
    e -> c
    b -> d [label="channel access"]
    d -> b

    d -> f [label="Inserts", color="red"]
    f -> g
    d -> h
    h -> d [color="red"]

    d -> i
    d -> j
    j -> m
    d -> k
    k -> n
    n -> p
    d -> l
    l -> o
}

MX Processing

digraph D {
    node [shape=record]
    //add legend box. put in current revision/file that this applies to
    a [label="ccp4"]
    b [label="phenix"]
    c [label="xds"]
    d [label="eiger2cbf"]
    e [label="fast DP"]

    f [label="dozor"]
    g [label="dials"]
   
    h [label="hdf5"]
    i [label="cbflib"]
    a -> e
    b -> e
    c -> e
    d -> e

    d -> g

    h -> f
    i -> d
    h -> d
}
Edna

Details of Edna here…

FastDP

Details of Fast DP here…

mxtools

mxtools

This library contains scripts that are to be shared between AMX and FMX, but are not common with NYX, which has its own nyxtools. Scripts initially developed for the Jupyter notebooks can be brought into mxtools then made available in both Jupyter notebooks and LSDC. The other main use case is for defining Ophyd objects and Bluesky scan objects that are different between AMX/FMX and NYX due to hardware differences. This library is made available by adding it to the PYTHONPATH when starting up LSDC. By adding mxtools in front of LSDC in PYTHONPATH, scripts and definitions defined in mxtools have priority over the default ones in LSDC.

ISPyB