Skip to content

Commit ced0a32

Browse files
committed
Add comment section for all sensors / devices
Fixes #13
1 parent 0ac8a72 commit ced0a32

12 files changed

+95
-35
lines changed

config_template.yml

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,42 @@ devices:
1616
unit: mm/min
1717
label: Pulling velocity
1818
# default: 0
19+
# comment: your comment for nomad ELN
1920
T_ctrl:
2021
unit: °C
2122
label: Control temperature
2223
# default: 0
24+
# comment: your comment for nomad ELN
2325
OP:
2426
label: Control operating point
2527
# default: 0
28+
# comment: your comment for nomad ELN
2629
pos_top:
2730
label: Top axis position
2831
# default: 0
32+
# comment: your comment for nomad ELN
2933
rot_crystal:
3034
unit: rpm
3135
label: Crystal rotation
3236
# default: 0
37+
# comment: your comment for nomad ELN
3338
rot_crucible:
3439
unit: rpm
3540
label: Crucible rotation
3641
# default: 0
42+
# comment: your comment for nomad ELN
3743
pressure:
3844
unit: bar
3945
label: Furnace pressure
4046
# default: 1
47+
# comment: your comment for nomad ELN
4148
door:
4249
label: Furnace door
4350
values:
4451
- open
4552
- closed
4653
# default: open
54+
# comment: your comment for nomad ELN
4755
gas:
4856
label: Gas atmosphere
4957
values:
@@ -52,6 +60,7 @@ devices:
5260
- nitrogen
5361
- vacuum
5462
# default: air
63+
# comment: your comment for nomad ELN
5564
tag:
5665
label: Process status tag
5766
values:
@@ -60,9 +69,11 @@ devices:
6069
- growing
6170
- cooling down
6271
# default: heating up
72+
# comment: your comment for nomad ELN
6373
comment:
6474
label: Comment
6575
# default: "Multilog measurement"
76+
# comment: your comment for nomad ELN
6677
DAQ-6510:
6778
serial-interface:
6879
port: /dev/ttyr00
@@ -85,43 +96,43 @@ devices:
8596
type: temperature
8697
sensor-id: TE_1_K
8798
position: air 155 mm over crucible
99+
# comment: your comment for nomad ELN
88100
102:
89101
type: temperature
90102
sensor-id: TE_2_K
91103
position: crucible frontside
104+
# comment: your comment for nomad ELN
92105
120:
93106
type: temperature
94107
sensor-id: TE_2_J
95108
position: outside furnace
96-
201:
97-
type: dcv
98-
tab-name: Current
99-
range: 10 # V (optional)
100-
sensor-id: rogowski_300A
101-
factor: 100 # Ampere / Volt
102-
unit: A
109+
# comment: your comment for nomad ELN
103110
201:
104111
type: dcv
105112
tab-name: Current
106113
range: 10 # V (optional)
107114
sensor-id: rogowski_chauvin_arnoux_300A
108115
factor: 100 # Ampere / Volt
109116
unit: A
117+
# comment: your comment for nomad ELN
110118
# 201:
111119
# type: dcv
112120
# tab-name: Current
113121
# range: 10 # V (optional)
114122
# sensor-id: rogowski_PEM_300A
115123
# factor: 50 # Ampere / Volt
116124
# unit: A
125+
# # comment: your comment for nomad ELN
117126
# 206:
118127
# type: temperature
119128
# sensor-id: Pt-100_1
120129
# position: crucible backside
130+
# # comment: your comment for nomad ELN
121131
# 207:
122132
# type: temperature
123133
# sensor-id: Pt-100_2
124134
# position: crucible rightside
135+
# # comment: your comment for nomad ELN
125136
# 210:
126137
# type: dcv
127138
# tab-name: Heatflux
@@ -130,6 +141,7 @@ devices:
130141
# factor: 1 # TODO
131142
# unit: W/m^2
132143
# position: bottom
144+
# # comment: your comment for nomad ELN
133145
# 211:
134146
# type: dcv
135147
# tab-name: Heatflux
@@ -138,23 +150,28 @@ devices:
138150
# factor: 1 # TODO
139151
# unit: W/m^2
140152
# position: left
153+
# # comment: your comment for nomad ELN
141154
# 212:
142155
# type: dcv
143156
# sensor-id: heater-voltage
144157
# range: 1 # V (optional)
145158
# factor: 1 # TODO
159+
# # comment: your comment for nomad ELN
146160
IFM-flowmeter:
147161
IP: 172.18.56.199
148162
ports:
149163
1:
150164
name: RL_Schwingkreis
151165
type: SV-4200
166+
# comment: your comment for nomad ELN
152167
2:
153168
name: RL_Welle
154169
type: SV-4200
170+
# comment: your comment for nomad ELN
155171
3:
156172
name: RL_Rezipient
157173
type: SV-4200
174+
# comment: your comment for nomad ELN
158175
4:
159176
name: RL_Generator
160177
type: SV-4200
@@ -178,14 +195,16 @@ devices:
178195
- RL_Spule_1
179196
tolerance: 2.5 # l/min
180197
Eurotherm:
181-
serial-interface:
182-
port: /dev/ttyr04
183-
baudrate: 9600
184-
bytesize: 7
185-
stopbits: 1
186-
parity: E
187-
timeout: 0.1
198+
# comment: your comment for nomad ELN
199+
serial-interface:
200+
port: /dev/ttyr04
201+
baudrate: 9600
202+
bytesize: 7
203+
stopbits: 1
204+
parity: E
205+
timeout: 0.1
188206
IGA-6-23-adv: # Pyrometer
207+
# comment: your comment for nomad ELN
189208
serial-interface:
190209
port: /dev/ttyr02
191210
baudrate: 115200
@@ -208,6 +227,7 @@ devices:
208227
3.0: 8
209228
10.0: 9
210229
IGA-6-23-vis: # Pyrometer
230+
# comment: your comment for nomad ELN
211231
serial-interface:
212232
port: /dev/ttyUSB1
213233
baudrate: 115200
@@ -230,6 +250,7 @@ devices:
230250
3.0: 8
231251
10.0: 9
232252
IGAR-6-adv: # Ratio pyrometer
253+
# comment: your comment for nomad ELN
233254
serial-interface:
234255
port: /dev/ttyUSB0
235256
baudrate: 115200
@@ -262,10 +283,12 @@ devices:
262283
# head-number: 1
263284
# emissivity: 1.0 # 0.0 < emissivity <= 1.0
264285
# t90: 0.18 # s, has to be a value out of t90-dict (below)
286+
# # comment: your comment for nomad ELN
265287
# Pyro_h2:
266288
# head-number: 2
267289
# emissivity: 1.0 # 0.0 < emissivity <= 1.0
268290
# t90: 0.18 # s, has to be a value out of t90-dict (below)
291+
# # comment: your comment for nomad ELN
269292
# t90-dict: # according to manual, don't modify that
270293
# 0.18: 1
271294
# 0.5: 2
@@ -279,6 +302,7 @@ devices:
279302
exposure-time: 10.e+3 # µs
280303
frame-rate: 32 # device-specific, used for configuration of camera only
281304
timeout: 1000 # ms
305+
# comment: your comment for nomad ELN
282306
Optris-IP-640:
283307
serial-number: 20112117
284308
measurement-range: [0, 250] # [-20, 100], [0, 250], [150 900]
@@ -287,3 +311,4 @@ devices:
287311
emissivity: 0.95
288312
transmissivity: 1.0
289313
T-ambient: -1000 # Ambient temperature, setting invalid values (below -273,15 degrees) forces the library to take its own measurement values. # TODO what does that mean?
314+
# comment: your comment for nomad ELN

multilog/devices/basler_camera.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ def write_nomad_file(self, directory="./"):
117117
)
118118
with open(f"{self.base_directory}/{self.name}.archive.yaml", "a") as f:
119119
f.write(f" exposure_time: {self.config['exposure-time']}\n")
120+
if "comment" in self.config:
121+
f.write(f" comment: {self.config['comment']}\n")
120122
f.write(f" images_list:\n")
121123

122124
def save_measurement(self, time_abs, time_rel, sampling):

multilog/devices/daq6510.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -289,20 +289,19 @@ def write_nomad_file(self, directory="./"):
289289
data.update(
290290
{
291291
sensor_name_nomad: {
292-
# "model": "your_field_here",
293-
"name": sensor_name_nomad,
294-
"sensor_id": sensor_name.split(" ")[0],
295-
"attached_to": " ".join(sensor_name.split(" ")[1:]),
296-
"measured_property": self.config["channels"][channel]["type"],
297-
"type": sensor_name.split("_")[0].split(" ")[0],
298-
# "notes": "TE_1_K air 155 mm over crucible",
299-
# "unit": self.unit[sensor_name], # TODO
300-
# "channel": channel, # TODO
292+
# "model": "your_field_here", currently not in nomad schema
293+
# "name": sensor_name_nomad, currently not in nomad schema
294+
# "sensor_id": sensor_name.split(" ")[0], currently not in nomad schema
295+
# "attached_to": " ".join(sensor_name.split(" ")[1:]), currently not in nomad schema
296+
# "measured_property": self.config["channels"][channel]["type"], currently not in nomad schema
297+
# "type": sensor_name.split("_")[0].split(" ")[0], currently not in nomad schema
301298
"value_timestamp_rel": "#/data/value_timestamp_rel",
302299
"value_timestamp_abs": "#/data/value_timestamp_abs",
303300
}
304301
}
305302
)
303+
if "comment" in self.config["channels"][channel]:
304+
data[sensor_name_nomad].update({"comment": self.config["channels"][channel]["comment"]})
306305
sensor_schema = deepcopy(sensor_schema_template)
307306
sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][
308307
"tabular"

multilog/devices/eurotherm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def write_nomad_file(self, directory="./"):
115115
{
116116
sensor_name_nomad: {
117117
# "model": "your_field_here",
118-
"name": sensor_name_nomad,
118+
# "name": sensor_name_nomad,
119119
# "sensor_id": sensor_name.split(" ")[0],
120120
# "attached_to": sensor_name, # TODO this information is important!
121121
# "measured_property": ,
@@ -127,6 +127,8 @@ def write_nomad_file(self, directory="./"):
127127
}
128128
}
129129
)
130+
if "comment" in self.config:
131+
data[sensor_name_nomad].update({"comment": self.config["comment"]})
130132
sensor_schema = deepcopy(sensor_schema_template)
131133
sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][
132134
"tabular"

multilog/devices/ifm_flowmeter.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ def write_nomad_file(self, directory="./"):
196196
{
197197
sensor_name_nomad: {
198198
# "model": "your_field_here",
199-
"name": sensor_name_nomad,
199+
# "name": sensor_name_nomad,
200200
# "sensor_id": sensor_name.split(" ")[0],
201-
"attached_to": sensor_name,
202-
"measured_property": property,
203-
"type": sensor_type,
201+
# "attached_to": sensor_name,
202+
# "measured_property": property,
203+
# "type": sensor_type,
204204
# "notes": "TE_1_K air 155 mm over crucible",
205205
# "unit": self.unit[sensor_name], # TODO
206206
# "channel": channel, # TODO
@@ -209,6 +209,8 @@ def write_nomad_file(self, directory="./"):
209209
}
210210
}
211211
)
212+
if "comment" in self.config["ports"][port]:
213+
data[sensor_name_nomad].update({"comment": self.config["ports"][port]["comment"]})
212214
sensor_schema = deepcopy(sensor_schema_template)
213215
sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][
214216
"tabular"

multilog/devices/optris_ip640.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ def write_nomad_file(self, directory="./"):
154154
f.write(f" ambient_temperature: {self.t_ambient}\n")
155155
f.write(f" measurement_range: '{self.config['measurement-range']}'\n")
156156
f.write(f" extended_temperature_range: {self.config['extended-T-range']}\n")
157+
if "comment" in self.config:
158+
f.write(f" comment: {self.config['comment']}\n")
157159
f.write(f" ir_images_list:\n")
158160

159161
def save_measurement(self, time_abs, time_rel, sampling):

multilog/devices/process_condition_logger.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def write_nomad_file(self, directory="./"):
9797
{
9898
sensor_name_nomad: {
9999
# "model": "your_field_here",
100-
"name": sensor_name_nomad,
100+
# "name": sensor_name_nomad,
101101
# "sensor_id": sensor_name.split(" ")[0],
102102
# "attached_to": sensor_name, # TODO this information is important!
103103
# "measured_property": ,
@@ -109,6 +109,8 @@ def write_nomad_file(self, directory="./"):
109109
}
110110
}
111111
)
112+
if "comment" in self.config[sensor_name]:
113+
data[sensor_name_nomad].update({"comment": self.config[sensor_name]["comment"]})
112114
sensor_schema = deepcopy(sensor_schema_template)
113115
sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][
114116
"tabular"

multilog/devices/pyrometer_array_lumasense.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def __init__(self, config, name="PyrometerArrayLumasense"):
3131
name (str, optional): Device name.
3232
"""
3333
logger.info(f"Initializing PyrometerArrayLumasense device '{name}'")
34+
self.config = config
3435
self.device_id = config["device-id"]
3536
self.name = name
3637
try:
@@ -154,20 +155,23 @@ def write_nomad_file(self, directory="./"):
154155
{
155156
sensor_name_nomad: {
156157
# "model": "your_field_here",
157-
"name": sensor_name_nomad,
158+
# "name": sensor_name_nomad,
158159
# "sensor_id": sensor_name.split(" ")[0],
159160
# "attached_to": sensor_name, # TODO this information is important!
160161
# "measured_property": ,
161162
# "type": sensor_type,
162163
# "notes": "TE_1_K air 155 mm over crucible",
163164
# "unit": self.unit[sensor_name], # TODO
164165
"emissivity": self.emissivities[sensor_name],
165-
"head_id": self.head_numbering[sensor_name],
166+
# "head_id": self.head_numbering[sensor_name],
167+
"t90": self.t90_dict[self.head_numbering[sensor_name]],
166168
"value_timestamp_rel": "#/data/value_timestamp_rel",
167169
"value_timestamp_abs": "#/data/value_timestamp_abs",
168170
}
169171
}
170172
)
173+
if "comment" in self.config["sensors"][sensor_name]:
174+
data[sensor_name_nomad].update({"comment": self.config["sensors"][sensor_name]["comment"]})
171175
sensor_schema = deepcopy(sensor_schema_template)
172176
sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][
173177
"tabular"

multilog/devices/pyrometer_lumasense.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def __init__(self, config, name="PyrometerLumasense"):
3030
name (str, optional): Device name.
3131
"""
3232
logger.info(f"Initializing PyrometerLumasense device '{name}'")
33+
self.config = config
3334
self.device_id = config["device-id"]
3435
self.name = name
3536
self.t90_dict = config["t90-dict"]
@@ -172,7 +173,7 @@ def write_nomad_file(self, directory="./"):
172173
{
173174
sensor_name_nomad: {
174175
# "model": "your_field_here",
175-
"name": sensor_name_nomad,
176+
# "name": sensor_name_nomad,
176177
# "sensor_id": sensor_name.split(" ")[0],
177178
# "attached_to": sensor_name, # TODO this information is important!
178179
# "measured_property": ,
@@ -187,6 +188,8 @@ def write_nomad_file(self, directory="./"):
187188
}
188189
}
189190
)
191+
if "comment" in self.config:
192+
data[sensor_name_nomad].update({"comment": self.config["comment"]})
190193
sensor_schema = deepcopy(sensor_schema_template)
191194
sensor_schema["section"]["quantities"]["value_log"]["m_annotations"]["tabular"][
192195
"name"

multilog/nomad/archive_template_Camera.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ definitions:
4040
exposure_time:
4141
type: np.float64
4242
description: Exposure time in micro seconds
43+
comment:
44+
type: str
45+
m_annotations:
46+
eln:
47+
component: StringEditQuantity
48+
description: "Comment, e.g. sensor position"
4349
data:
4450
m_def: camera
4551
# exposure_time: 10.e+3

0 commit comments

Comments
 (0)