Skip to content

Commit

Permalink
adds mockup beamline configured with YAML files
Browse files Browse the repository at this point in the history
Adding an example of the mockup beamline, where all HWOBJs are
configured with YAML files.

To start MXCuBE with this version of beamline, use '--repository'
command line argument. For example:

   ./mxcubeweb-server --repository demo.yaml
  • Loading branch information
elmjag committed Oct 28, 2024
1 parent 497e127 commit 02b0f93
Show file tree
Hide file tree
Showing 113 changed files with 4,815,851 additions and 0 deletions.
5 changes: 5 additions & 0 deletions demo.yaml/aperture.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%YAML 1.2
---
class: ApertureMockup.ApertureMockup
configuration:
diameter_size_list: '[10, 20, 50, 100, 150]'
11 changes: 11 additions & 0 deletions demo.yaml/beam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
%YAML 1.2
---
class: BeamMockup.BeamMockup
configuration:
beam_divergence_horizontal: 12.0
beam_divergence_vertical: 12.0
definer_type: aperture
username: beam
objects:
aperture: aperture.yaml
slits: slits.yaml
19 changes: 19 additions & 0 deletions demo.yaml/beamline_actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
%YAML 1.2
---
class: BeamlineActionsMockup.BeamlineActionsMockup
configuration:
commands: "
[
{'type': 'controller', 'name': 'Centre Beam',
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.SimulatedAction'},
{'type': 'controller', 'name': 'Quick Realign',
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.LongSimulatedAction'},
{'type': 'controller', 'name': 'Anneal',
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.SimulatedActionError'},
{'type': 'annotated',
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.Anneal2'},
{'type': 'annotated',
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.QuickRealign2'},
{'type': 'annotated',
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.ComboTest2'},
]"
157 changes: 157 additions & 0 deletions demo.yaml/beamline_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
%YAML 1.2
---

# The class to initialise, and init parameters
class:
mxcubecore.HardwareObjects.Beamline.Beamline

# objects
#
# NBNB some objects that do not currently have their own config files
# would need those added (e.g. the centring methods)
#
objects:
# The !!omap and the lines starting with '- ' give you an *ordered* dictionary
# And thus a reproducible loading order
!!omap
# The values are the file paths to the configuration file for the
# object, relative to the configuration file path(s)
#
# NB - the order is *NOT* arbitrary, as signal connections are set
# on one object that require the other to be already loaded.
#
# Hardware:
- session: session.yaml
- data_publisher: data_publisher.yaml
- machine_info: machine_info.yaml
- detector: detector.yaml
- beam: beam.yaml
- transmission: transmission.yaml
- flux: flux.yaml
- cryo: cryo.yaml
- energy: energy.yaml
- resolution: resolution.yaml
- safety_shutter: safety_shutter.yaml
- fast_shutter: fast_shutter.yaml
- sample_changer: sample_changer.yaml
- sample_changer_maintenance: sample_changer_maint.yaml

# The 2 lines up have to be used for SC and the 2 line below for the plate manipulator
# - sample_changer: plate_manipulator.xml
# - sample_changer_maintenance: plate_manipulator_maint.xml

# - harvester: harvester.xml
# - harvester_maintenance: harvester_maintenance.xml

- diffractometer: minidiff.yaml
- lims: lims.yaml
- sample_view: sample_view.yaml
- queue_manager: queue_manager.yaml
- queue_model: queue_model.yaml

# Procedures:
- beamline_actions: beamline_actions.yaml
- workflow: ednaparams.yaml
- collect: mxcollect.yaml
- xrf_spectrum: xrf.yaml
- energy_scan: energy_scan.yaml
- gphl_connection: gphl/gphl-setup.yaml
- gphl_workflow: gphl/gphl-workflow.yaml
- xray_centring: xray_centring2.yaml
- xml_rpc_server: xml_rpc_server.yaml

# Analysis:
- offline_processing: auto_processing.yaml
- online_processing: parallel_processing.yaml
- characterisation: characterisation.yaml

configuration:
advanced_methods:
- MeshScan
- XrayCentering

tunable_wavelength: true
disable_num_passes: true
run_processing_parallel: true
run_number: 1
click_centring_num_clicks: 3

mesh_result_format: PNG
use_native_mesh: true
enable_2d_points: true

default_acquisition_parameters:
default:
# Default values, also used for standard acquisition.
# Values not given in other dictionaries are taken from here
exp_time: 0.02 # exposure time
osc_start: 0.0 # Only used if no current angle can be found
osc_range: 0.1
num_passes: 1
first_image: 1
overlap: 0
num_images: 1
detector_mode: 1 # Remove as not in practice used ?
inverse_beam: false
take_dark_current: true
skip_existing_images: true
take_snapshots: true
sub_wedge_size: 10
# NB 'compression' not added as apparently never used

helical:
# Defaults for helical scan. Missing values are taken from default
number_of_images: 100

characterisation:
# Defaults for characterisation. Missing values are taken from default
exp_time: 0.05 # exposure time
osc_range: 1
overlap: -89
num_images: 4
shutterless: false

mesh:
# Defaults for 'advanced' acquisition. Missing values are taken from default
exp_time: 10 # exposure time
range: 10
num_images: 100
cell_counting: zig-zag
cell_spacing: vertical, horizontal
mesh_center: top-left

gphlworkflow:
{}
# Apparently this must be here, but we use all values same as default

acquisition_limit_values:
exposure_time:
- 0.02
- 1000
osc_range:
- -10000
- 10000
number_of_images:
- 1
- 99999
kappa:
- -5.0
- 240.0

available_methods:
datacollection: true
characterisation: true
helical: true
xrf_spectrum: true
energy_scan: true
mesh: true
ssx_chip_collection: true
gphlworkflow: true
test_collection: true

undulators:
- type: PPU35C_GAP
device_uri: //orion:10000/id/id/30

- type: PPU35D_GAP
device_uri: //orion:10000/id/id/30
7 changes: 7 additions & 0 deletions demo.yaml/beamstop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
%YAML 1.2
---
class: ExporterNStateMockup.ExporterNStateMockup
configuration:
use_hwstate: true
username: beamstop
values: '{"OUT": "OFF", "IN": "BEAM"}'
9 changes: 9 additions & 0 deletions demo.yaml/beamstop_alignment_x.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
%YAML 1.2
---
class: MotorMockup.MotorMockup
configuration:
GUIstep: 0.1
exporter_address: 130.235.94.124:9001
motor_name: BeamstopAlignmentX
unit: 0.001
username: Beamstop Alignemnt X
7 changes: 7 additions & 0 deletions demo.yaml/capillary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
%YAML 1.2
---
class: ExporterNStateMockup.ExporterNStateMockup
configuration:
use_hwstate: true
username: capillary
values: '{"IN": "BEAM", "OUT": "OFF"}'
6 changes: 6 additions & 0 deletions demo.yaml/characterisation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
%YAML 1.2
---
class: EDNACharacterisationMockup.EDNACharacterisationMockup
configuration:
edna_command: /users/blissadm/local/bin/edna_script_bes.py
edna_default_file: edna_defaults.xml
155 changes: 155 additions & 0 deletions demo.yaml/chip_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"current": "SMALL_FOIL",
"available": {
"OXFORD_CHIP": {
"head_type": "CHIP",
"holder_type": "KNOWN_GEOMETRY",
"holder_brand": "Oxford Chip",
"holder_size": [
30.0,
30.0
],
"sections": [
{
"section_offset": [
0,
0
],
"block_size": [
30.0,
30.0
],
"block_spacing": [
15.0,
15.0
],
"block_shape": "RECTANGULAR",
"number_of_rows": 8,
"number_of_collumns": 8,
"row_labels": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8"
],
"column_lables": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H"
],
"targets_per_block": [
20,
20
]
}
],
"calibration_data": {
"top_left": [
0.0,
0.0,
0.0
],
"top_right": [
0.0,
0.0,
0.0
],
"bottom_left": [
0.0,
0.0,
0.0
]
}
},
"SMALL_FOIL": {
"head_type": "CHIP",
"holder_type": "FREE_GEOMETRY",
"holder_brand": "FOIL",
"holder_size": [
100.0,
100.0
],
"sections": [],
"calibration_data": {
"top_left": [
18.0,
15.8,
-0.17
],
"top_right": [
22.0,
15.8,
-0.17
],
"bottom_left": [
18.0,
24.0,
-0.17
]
}
},
"BIG_FOIL": {
"head_type": "CHIP",
"holder_type": "FREE_GEOMETRY",
"holder_brand": "FOIL",
"holder_size": [
100.0,
100.0
],
"sections": [],
"calibration_data": {
"top_left": [
7.0,
3.0,
0.08
],
"top_right": [
32.0,
3.0,
0.08
],
"bottom_left": [
7.0,
28.0,
0.08
]
}
},
"CUSTOM_FOIL": {
"head_type": "CHIP",
"holder_type": "FREE_GEOMETRY",
"holder_brand": "FOIL",
"holder_size": [
100.0,
100.0
],
"sections": [],
"calibration_data": {
"top_left": [
15.0,
16.0,
-0.008
],
"top_right": [
23.0,
16.0,
-0.008
],
"bottom_left": [
15.0,
24.0,
-0.008
]
}
}
}
}
8 changes: 8 additions & 0 deletions demo.yaml/cryo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%YAML 1.2
---
class: ActuatorMockup.ActuatorMockup
configuration:
actuator_name: Cryo
default_value: 200
read_only: true
username: Cryo
4 changes: 4 additions & 0 deletions demo.yaml/data_publisher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
%YAML 1.2
---
class: DataPublisher.DataPublisher
configuration: {}
Loading

0 comments on commit 02b0f93

Please sign in to comment.