Skip to content

Commit 02b0f93

Browse files
committed
adds mockup beamline configured with YAML files
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
1 parent 497e127 commit 02b0f93

File tree

113 files changed

+4815851
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+4815851
-0
lines changed

demo.yaml/aperture.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%YAML 1.2
2+
---
3+
class: ApertureMockup.ApertureMockup
4+
configuration:
5+
diameter_size_list: '[10, 20, 50, 100, 150]'

demo.yaml/beam.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
%YAML 1.2
2+
---
3+
class: BeamMockup.BeamMockup
4+
configuration:
5+
beam_divergence_horizontal: 12.0
6+
beam_divergence_vertical: 12.0
7+
definer_type: aperture
8+
username: beam
9+
objects:
10+
aperture: aperture.yaml
11+
slits: slits.yaml

demo.yaml/beamline_actions.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
%YAML 1.2
2+
---
3+
class: BeamlineActionsMockup.BeamlineActionsMockup
4+
configuration:
5+
commands: "
6+
[
7+
{'type': 'controller', 'name': 'Centre Beam',
8+
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.SimulatedAction'},
9+
{'type': 'controller', 'name': 'Quick Realign',
10+
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.LongSimulatedAction'},
11+
{'type': 'controller', 'name': 'Anneal',
12+
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.SimulatedActionError'},
13+
{'type': 'annotated',
14+
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.Anneal2'},
15+
{'type': 'annotated',
16+
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.QuickRealign2'},
17+
{'type': 'annotated',
18+
'command': 'HardwareObjects.mockup.BeamlineActionsMockup.ComboTest2'},
19+
]"

demo.yaml/beamline_config.yml

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
%YAML 1.2
2+
---
3+
4+
# The class to initialise, and init parameters
5+
class:
6+
mxcubecore.HardwareObjects.Beamline.Beamline
7+
8+
# objects
9+
#
10+
# NBNB some objects that do not currently have their own config files
11+
# would need those added (e.g. the centring methods)
12+
#
13+
objects:
14+
# The !!omap and the lines starting with '- ' give you an *ordered* dictionary
15+
# And thus a reproducible loading order
16+
!!omap
17+
# The values are the file paths to the configuration file for the
18+
# object, relative to the configuration file path(s)
19+
#
20+
# NB - the order is *NOT* arbitrary, as signal connections are set
21+
# on one object that require the other to be already loaded.
22+
#
23+
# Hardware:
24+
- session: session.yaml
25+
- data_publisher: data_publisher.yaml
26+
- machine_info: machine_info.yaml
27+
- detector: detector.yaml
28+
- beam: beam.yaml
29+
- transmission: transmission.yaml
30+
- flux: flux.yaml
31+
- cryo: cryo.yaml
32+
- energy: energy.yaml
33+
- resolution: resolution.yaml
34+
- safety_shutter: safety_shutter.yaml
35+
- fast_shutter: fast_shutter.yaml
36+
- sample_changer: sample_changer.yaml
37+
- sample_changer_maintenance: sample_changer_maint.yaml
38+
39+
# The 2 lines up have to be used for SC and the 2 line below for the plate manipulator
40+
# - sample_changer: plate_manipulator.xml
41+
# - sample_changer_maintenance: plate_manipulator_maint.xml
42+
43+
# - harvester: harvester.xml
44+
# - harvester_maintenance: harvester_maintenance.xml
45+
46+
- diffractometer: minidiff.yaml
47+
- lims: lims.yaml
48+
- sample_view: sample_view.yaml
49+
- queue_manager: queue_manager.yaml
50+
- queue_model: queue_model.yaml
51+
52+
# Procedures:
53+
- beamline_actions: beamline_actions.yaml
54+
- workflow: ednaparams.yaml
55+
- collect: mxcollect.yaml
56+
- xrf_spectrum: xrf.yaml
57+
- energy_scan: energy_scan.yaml
58+
- gphl_connection: gphl/gphl-setup.yaml
59+
- gphl_workflow: gphl/gphl-workflow.yaml
60+
- xray_centring: xray_centring2.yaml
61+
- xml_rpc_server: xml_rpc_server.yaml
62+
63+
# Analysis:
64+
- offline_processing: auto_processing.yaml
65+
- online_processing: parallel_processing.yaml
66+
- characterisation: characterisation.yaml
67+
68+
configuration:
69+
advanced_methods:
70+
- MeshScan
71+
- XrayCentering
72+
73+
tunable_wavelength: true
74+
disable_num_passes: true
75+
run_processing_parallel: true
76+
run_number: 1
77+
click_centring_num_clicks: 3
78+
79+
mesh_result_format: PNG
80+
use_native_mesh: true
81+
enable_2d_points: true
82+
83+
default_acquisition_parameters:
84+
default:
85+
# Default values, also used for standard acquisition.
86+
# Values not given in other dictionaries are taken from here
87+
exp_time: 0.02 # exposure time
88+
osc_start: 0.0 # Only used if no current angle can be found
89+
osc_range: 0.1
90+
num_passes: 1
91+
first_image: 1
92+
overlap: 0
93+
num_images: 1
94+
detector_mode: 1 # Remove as not in practice used ?
95+
inverse_beam: false
96+
take_dark_current: true
97+
skip_existing_images: true
98+
take_snapshots: true
99+
sub_wedge_size: 10
100+
# NB 'compression' not added as apparently never used
101+
102+
helical:
103+
# Defaults for helical scan. Missing values are taken from default
104+
number_of_images: 100
105+
106+
characterisation:
107+
# Defaults for characterisation. Missing values are taken from default
108+
exp_time: 0.05 # exposure time
109+
osc_range: 1
110+
overlap: -89
111+
num_images: 4
112+
shutterless: false
113+
114+
mesh:
115+
# Defaults for 'advanced' acquisition. Missing values are taken from default
116+
exp_time: 10 # exposure time
117+
range: 10
118+
num_images: 100
119+
cell_counting: zig-zag
120+
cell_spacing: vertical, horizontal
121+
mesh_center: top-left
122+
123+
gphlworkflow:
124+
{}
125+
# Apparently this must be here, but we use all values same as default
126+
127+
acquisition_limit_values:
128+
exposure_time:
129+
- 0.02
130+
- 1000
131+
osc_range:
132+
- -10000
133+
- 10000
134+
number_of_images:
135+
- 1
136+
- 99999
137+
kappa:
138+
- -5.0
139+
- 240.0
140+
141+
available_methods:
142+
datacollection: true
143+
characterisation: true
144+
helical: true
145+
xrf_spectrum: true
146+
energy_scan: true
147+
mesh: true
148+
ssx_chip_collection: true
149+
gphlworkflow: true
150+
test_collection: true
151+
152+
undulators:
153+
- type: PPU35C_GAP
154+
device_uri: //orion:10000/id/id/30
155+
156+
- type: PPU35D_GAP
157+
device_uri: //orion:10000/id/id/30

demo.yaml/beamstop.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
%YAML 1.2
2+
---
3+
class: ExporterNStateMockup.ExporterNStateMockup
4+
configuration:
5+
use_hwstate: true
6+
username: beamstop
7+
values: '{"OUT": "OFF", "IN": "BEAM"}'

demo.yaml/beamstop_alignment_x.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
%YAML 1.2
2+
---
3+
class: MotorMockup.MotorMockup
4+
configuration:
5+
GUIstep: 0.1
6+
exporter_address: 130.235.94.124:9001
7+
motor_name: BeamstopAlignmentX
8+
unit: 0.001
9+
username: Beamstop Alignemnt X

demo.yaml/capillary.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
%YAML 1.2
2+
---
3+
class: ExporterNStateMockup.ExporterNStateMockup
4+
configuration:
5+
use_hwstate: true
6+
username: capillary
7+
values: '{"IN": "BEAM", "OUT": "OFF"}'

demo.yaml/characterisation.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
%YAML 1.2
2+
---
3+
class: EDNACharacterisationMockup.EDNACharacterisationMockup
4+
configuration:
5+
edna_command: /users/blissadm/local/bin/edna_script_bes.py
6+
edna_default_file: edna_defaults.xml

demo.yaml/chip_definition.json

+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"current": "SMALL_FOIL",
3+
"available": {
4+
"OXFORD_CHIP": {
5+
"head_type": "CHIP",
6+
"holder_type": "KNOWN_GEOMETRY",
7+
"holder_brand": "Oxford Chip",
8+
"holder_size": [
9+
30.0,
10+
30.0
11+
],
12+
"sections": [
13+
{
14+
"section_offset": [
15+
0,
16+
0
17+
],
18+
"block_size": [
19+
30.0,
20+
30.0
21+
],
22+
"block_spacing": [
23+
15.0,
24+
15.0
25+
],
26+
"block_shape": "RECTANGULAR",
27+
"number_of_rows": 8,
28+
"number_of_collumns": 8,
29+
"row_labels": [
30+
"1",
31+
"2",
32+
"3",
33+
"4",
34+
"5",
35+
"6",
36+
"7",
37+
"8"
38+
],
39+
"column_lables": [
40+
"A",
41+
"B",
42+
"C",
43+
"D",
44+
"E",
45+
"F",
46+
"G",
47+
"H"
48+
],
49+
"targets_per_block": [
50+
20,
51+
20
52+
]
53+
}
54+
],
55+
"calibration_data": {
56+
"top_left": [
57+
0.0,
58+
0.0,
59+
0.0
60+
],
61+
"top_right": [
62+
0.0,
63+
0.0,
64+
0.0
65+
],
66+
"bottom_left": [
67+
0.0,
68+
0.0,
69+
0.0
70+
]
71+
}
72+
},
73+
"SMALL_FOIL": {
74+
"head_type": "CHIP",
75+
"holder_type": "FREE_GEOMETRY",
76+
"holder_brand": "FOIL",
77+
"holder_size": [
78+
100.0,
79+
100.0
80+
],
81+
"sections": [],
82+
"calibration_data": {
83+
"top_left": [
84+
18.0,
85+
15.8,
86+
-0.17
87+
],
88+
"top_right": [
89+
22.0,
90+
15.8,
91+
-0.17
92+
],
93+
"bottom_left": [
94+
18.0,
95+
24.0,
96+
-0.17
97+
]
98+
}
99+
},
100+
"BIG_FOIL": {
101+
"head_type": "CHIP",
102+
"holder_type": "FREE_GEOMETRY",
103+
"holder_brand": "FOIL",
104+
"holder_size": [
105+
100.0,
106+
100.0
107+
],
108+
"sections": [],
109+
"calibration_data": {
110+
"top_left": [
111+
7.0,
112+
3.0,
113+
0.08
114+
],
115+
"top_right": [
116+
32.0,
117+
3.0,
118+
0.08
119+
],
120+
"bottom_left": [
121+
7.0,
122+
28.0,
123+
0.08
124+
]
125+
}
126+
},
127+
"CUSTOM_FOIL": {
128+
"head_type": "CHIP",
129+
"holder_type": "FREE_GEOMETRY",
130+
"holder_brand": "FOIL",
131+
"holder_size": [
132+
100.0,
133+
100.0
134+
],
135+
"sections": [],
136+
"calibration_data": {
137+
"top_left": [
138+
15.0,
139+
16.0,
140+
-0.008
141+
],
142+
"top_right": [
143+
23.0,
144+
16.0,
145+
-0.008
146+
],
147+
"bottom_left": [
148+
15.0,
149+
24.0,
150+
-0.008
151+
]
152+
}
153+
}
154+
}
155+
}

demo.yaml/cryo.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
%YAML 1.2
2+
---
3+
class: ActuatorMockup.ActuatorMockup
4+
configuration:
5+
actuator_name: Cryo
6+
default_value: 200
7+
read_only: true
8+
username: Cryo

demo.yaml/data_publisher.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
%YAML 1.2
2+
---
3+
class: DataPublisher.DataPublisher
4+
configuration: {}

0 commit comments

Comments
 (0)