diff --git a/config_template.yml b/config_template.yml index 7d5e8ca..05c9fb5 100644 --- a/config_template.yml +++ b/config_template.yml @@ -16,34 +16,42 @@ devices: unit: mm/min label: Pulling velocity # default: 0 + # comment: your comment for nomad ELN T_ctrl: unit: °C label: Control temperature # default: 0 + # comment: your comment for nomad ELN OP: label: Control operating point # default: 0 + # comment: your comment for nomad ELN pos_top: label: Top axis position # default: 0 + # comment: your comment for nomad ELN rot_crystal: unit: rpm label: Crystal rotation # default: 0 + # comment: your comment for nomad ELN rot_crucible: unit: rpm label: Crucible rotation # default: 0 + # comment: your comment for nomad ELN pressure: unit: bar label: Furnace pressure # default: 1 + # comment: your comment for nomad ELN door: label: Furnace door values: - open - closed # default: open + # comment: your comment for nomad ELN gas: label: Gas atmosphere values: @@ -52,6 +60,7 @@ devices: - nitrogen - vacuum # default: air + # comment: your comment for nomad ELN tag: label: Process status tag values: @@ -60,9 +69,11 @@ devices: - growing - cooling down # default: heating up + # comment: your comment for nomad ELN comment: label: Comment # default: "Multilog measurement" + # comment: your comment for nomad ELN DAQ-6510: serial-interface: port: /dev/ttyr00 @@ -85,21 +96,17 @@ devices: type: temperature sensor-id: TE_1_K position: air 155 mm over crucible + # comment: your comment for nomad ELN 102: type: temperature sensor-id: TE_2_K position: crucible frontside + # comment: your comment for nomad ELN 120: type: temperature sensor-id: TE_2_J position: outside furnace - 201: - type: dcv - tab-name: Current - range: 10 # V (optional) - sensor-id: rogowski_300A - factor: 100 # Ampere / Volt - unit: A + # comment: your comment for nomad ELN 201: type: dcv tab-name: Current @@ -107,6 +114,7 @@ devices: sensor-id: rogowski_chauvin_arnoux_300A factor: 100 # Ampere / Volt unit: A + # comment: your comment for nomad ELN # 201: # type: dcv # tab-name: Current @@ -114,14 +122,17 @@ devices: # sensor-id: rogowski_PEM_300A # factor: 50 # Ampere / Volt # unit: A + # # comment: your comment for nomad ELN # 206: # type: temperature # sensor-id: Pt-100_1 # position: crucible backside + # # comment: your comment for nomad ELN # 207: # type: temperature # sensor-id: Pt-100_2 # position: crucible rightside + # # comment: your comment for nomad ELN # 210: # type: dcv # tab-name: Heatflux @@ -130,6 +141,7 @@ devices: # factor: 1 # TODO # unit: W/m^2 # position: bottom + # # comment: your comment for nomad ELN # 211: # type: dcv # tab-name: Heatflux @@ -138,23 +150,28 @@ devices: # factor: 1 # TODO # unit: W/m^2 # position: left + # # comment: your comment for nomad ELN # 212: # type: dcv # sensor-id: heater-voltage # range: 1 # V (optional) # factor: 1 # TODO + # # comment: your comment for nomad ELN IFM-flowmeter: IP: 172.18.56.199 ports: 1: name: RL_Schwingkreis type: SV-4200 + # comment: your comment for nomad ELN 2: name: RL_Welle type: SV-4200 + # comment: your comment for nomad ELN 3: name: RL_Rezipient type: SV-4200 + # comment: your comment for nomad ELN 4: name: RL_Generator type: SV-4200 @@ -178,14 +195,16 @@ devices: - RL_Spule_1 tolerance: 2.5 # l/min Eurotherm: - serial-interface: - port: /dev/ttyr04 - baudrate: 9600 - bytesize: 7 - stopbits: 1 - parity: E - timeout: 0.1 + # comment: your comment for nomad ELN + serial-interface: + port: /dev/ttyr04 + baudrate: 9600 + bytesize: 7 + stopbits: 1 + parity: E + timeout: 0.1 IGA-6-23-adv: # Pyrometer + # comment: your comment for nomad ELN serial-interface: port: /dev/ttyr02 baudrate: 115200 @@ -208,6 +227,7 @@ devices: 3.0: 8 10.0: 9 IGA-6-23-vis: # Pyrometer + # comment: your comment for nomad ELN serial-interface: port: /dev/ttyUSB1 baudrate: 115200 @@ -230,6 +250,7 @@ devices: 3.0: 8 10.0: 9 IGAR-6-adv: # Ratio pyrometer + # comment: your comment for nomad ELN serial-interface: port: /dev/ttyUSB0 baudrate: 115200 @@ -262,10 +283,12 @@ devices: # head-number: 1 # emissivity: 1.0 # 0.0 < emissivity <= 1.0 # t90: 0.18 # s, has to be a value out of t90-dict (below) + # # comment: your comment for nomad ELN # Pyro_h2: # head-number: 2 # emissivity: 1.0 # 0.0 < emissivity <= 1.0 # t90: 0.18 # s, has to be a value out of t90-dict (below) + # # comment: your comment for nomad ELN # t90-dict: # according to manual, don't modify that # 0.18: 1 # 0.5: 2 @@ -279,6 +302,7 @@ devices: exposure-time: 10.e+3 # µs frame-rate: 32 # device-specific, used for configuration of camera only timeout: 1000 # ms + # comment: your comment for nomad ELN Optris-IP-640: serial-number: 20112117 measurement-range: [0, 250] # [-20, 100], [0, 250], [150 900] @@ -287,3 +311,4 @@ devices: emissivity: 0.95 transmissivity: 1.0 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? + # comment: your comment for nomad ELN diff --git a/multilog/devices/basler_camera.py b/multilog/devices/basler_camera.py index 3d30b0c..a04a8b1 100644 --- a/multilog/devices/basler_camera.py +++ b/multilog/devices/basler_camera.py @@ -117,6 +117,8 @@ def write_nomad_file(self, directory="./"): ) with open(f"{self.base_directory}/{self.name}.archive.yaml", "a") as f: f.write(f" exposure_time: {self.config['exposure-time']}\n") + if "comment" in self.config: + f.write(f" comment: {self.config['comment']}\n") f.write(f" images_list:\n") def save_measurement(self, time_abs, time_rel, sampling): diff --git a/multilog/devices/daq6510.py b/multilog/devices/daq6510.py index a034bef..afee2ad 100644 --- a/multilog/devices/daq6510.py +++ b/multilog/devices/daq6510.py @@ -289,20 +289,19 @@ def write_nomad_file(self, directory="./"): data.update( { sensor_name_nomad: { - # "model": "your_field_here", - "name": sensor_name_nomad, - "sensor_id": sensor_name.split(" ")[0], - "attached_to": " ".join(sensor_name.split(" ")[1:]), - "measured_property": self.config["channels"][channel]["type"], - "type": sensor_name.split("_")[0].split(" ")[0], - # "notes": "TE_1_K air 155 mm over crucible", - # "unit": self.unit[sensor_name], # TODO - # "channel": channel, # TODO + # "model": "your_field_here", currently not in nomad schema + # "name": sensor_name_nomad, currently not in nomad schema + # "sensor_id": sensor_name.split(" ")[0], currently not in nomad schema + # "attached_to": " ".join(sensor_name.split(" ")[1:]), currently not in nomad schema + # "measured_property": self.config["channels"][channel]["type"], currently not in nomad schema + # "type": sensor_name.split("_")[0].split(" ")[0], currently not in nomad schema "value_timestamp_rel": "#/data/value_timestamp_rel", "value_timestamp_abs": "#/data/value_timestamp_abs", } } ) + if "comment" in self.config["channels"][channel]: + data[sensor_name_nomad].update({"comment": self.config["channels"][channel]["comment"]}) sensor_schema = deepcopy(sensor_schema_template) sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][ "tabular" diff --git a/multilog/devices/eurotherm.py b/multilog/devices/eurotherm.py index d56fdee..81b5d0c 100644 --- a/multilog/devices/eurotherm.py +++ b/multilog/devices/eurotherm.py @@ -115,7 +115,7 @@ def write_nomad_file(self, directory="./"): { sensor_name_nomad: { # "model": "your_field_here", - "name": sensor_name_nomad, + # "name": sensor_name_nomad, # "sensor_id": sensor_name.split(" ")[0], # "attached_to": sensor_name, # TODO this information is important! # "measured_property": , @@ -127,6 +127,8 @@ def write_nomad_file(self, directory="./"): } } ) + if "comment" in self.config: + data[sensor_name_nomad].update({"comment": self.config["comment"]}) sensor_schema = deepcopy(sensor_schema_template) sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][ "tabular" diff --git a/multilog/devices/ifm_flowmeter.py b/multilog/devices/ifm_flowmeter.py index 1366e7c..8086250 100644 --- a/multilog/devices/ifm_flowmeter.py +++ b/multilog/devices/ifm_flowmeter.py @@ -196,11 +196,11 @@ def write_nomad_file(self, directory="./"): { sensor_name_nomad: { # "model": "your_field_here", - "name": sensor_name_nomad, + # "name": sensor_name_nomad, # "sensor_id": sensor_name.split(" ")[0], - "attached_to": sensor_name, - "measured_property": property, - "type": sensor_type, + # "attached_to": sensor_name, + # "measured_property": property, + # "type": sensor_type, # "notes": "TE_1_K air 155 mm over crucible", # "unit": self.unit[sensor_name], # TODO # "channel": channel, # TODO @@ -209,6 +209,8 @@ def write_nomad_file(self, directory="./"): } } ) + if "comment" in self.config["ports"][port]: + data[sensor_name_nomad].update({"comment": self.config["ports"][port]["comment"]}) sensor_schema = deepcopy(sensor_schema_template) sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][ "tabular" diff --git a/multilog/devices/optris_ip640.py b/multilog/devices/optris_ip640.py index f9aca65..1b250bd 100644 --- a/multilog/devices/optris_ip640.py +++ b/multilog/devices/optris_ip640.py @@ -154,6 +154,8 @@ def write_nomad_file(self, directory="./"): f.write(f" ambient_temperature: {self.t_ambient}\n") f.write(f" measurement_range: '{self.config['measurement-range']}'\n") f.write(f" extended_temperature_range: {self.config['extended-T-range']}\n") + if "comment" in self.config: + f.write(f" comment: {self.config['comment']}\n") f.write(f" ir_images_list:\n") def save_measurement(self, time_abs, time_rel, sampling): diff --git a/multilog/devices/process_condition_logger.py b/multilog/devices/process_condition_logger.py index 6b9b993..af5335a 100644 --- a/multilog/devices/process_condition_logger.py +++ b/multilog/devices/process_condition_logger.py @@ -97,7 +97,7 @@ def write_nomad_file(self, directory="./"): { sensor_name_nomad: { # "model": "your_field_here", - "name": sensor_name_nomad, + # "name": sensor_name_nomad, # "sensor_id": sensor_name.split(" ")[0], # "attached_to": sensor_name, # TODO this information is important! # "measured_property": , @@ -109,6 +109,8 @@ def write_nomad_file(self, directory="./"): } } ) + if "comment" in self.config[sensor_name]: + data[sensor_name_nomad].update({"comment": self.config[sensor_name]["comment"]}) sensor_schema = deepcopy(sensor_schema_template) sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][ "tabular" diff --git a/multilog/devices/pyrometer_array_lumasense.py b/multilog/devices/pyrometer_array_lumasense.py index 7bfa95c..7b7490c 100644 --- a/multilog/devices/pyrometer_array_lumasense.py +++ b/multilog/devices/pyrometer_array_lumasense.py @@ -31,6 +31,7 @@ def __init__(self, config, name="PyrometerArrayLumasense"): name (str, optional): Device name. """ logger.info(f"Initializing PyrometerArrayLumasense device '{name}'") + self.config = config self.device_id = config["device-id"] self.name = name try: @@ -154,7 +155,7 @@ def write_nomad_file(self, directory="./"): { sensor_name_nomad: { # "model": "your_field_here", - "name": sensor_name_nomad, + # "name": sensor_name_nomad, # "sensor_id": sensor_name.split(" ")[0], # "attached_to": sensor_name, # TODO this information is important! # "measured_property": , @@ -162,12 +163,15 @@ def write_nomad_file(self, directory="./"): # "notes": "TE_1_K air 155 mm over crucible", # "unit": self.unit[sensor_name], # TODO "emissivity": self.emissivities[sensor_name], - "head_id": self.head_numbering[sensor_name], + # "head_id": self.head_numbering[sensor_name], + "t90": self.t90_dict[self.head_numbering[sensor_name]], "value_timestamp_rel": "#/data/value_timestamp_rel", "value_timestamp_abs": "#/data/value_timestamp_abs", } } ) + if "comment" in self.config["sensors"][sensor_name]: + data[sensor_name_nomad].update({"comment": self.config["sensors"][sensor_name]["comment"]}) sensor_schema = deepcopy(sensor_schema_template) sensor_schema["section"]["quantities"]["value_log"]["m_annotations"][ "tabular" diff --git a/multilog/devices/pyrometer_lumasense.py b/multilog/devices/pyrometer_lumasense.py index 48554a3..d7c748c 100644 --- a/multilog/devices/pyrometer_lumasense.py +++ b/multilog/devices/pyrometer_lumasense.py @@ -30,6 +30,7 @@ def __init__(self, config, name="PyrometerLumasense"): name (str, optional): Device name. """ logger.info(f"Initializing PyrometerLumasense device '{name}'") + self.config = config self.device_id = config["device-id"] self.name = name self.t90_dict = config["t90-dict"] @@ -172,7 +173,7 @@ def write_nomad_file(self, directory="./"): { sensor_name_nomad: { # "model": "your_field_here", - "name": sensor_name_nomad, + # "name": sensor_name_nomad, # "sensor_id": sensor_name.split(" ")[0], # "attached_to": sensor_name, # TODO this information is important! # "measured_property": , @@ -187,6 +188,8 @@ def write_nomad_file(self, directory="./"): } } ) + if "comment" in self.config: + data[sensor_name_nomad].update({"comment": self.config["comment"]}) sensor_schema = deepcopy(sensor_schema_template) sensor_schema["section"]["quantities"]["value_log"]["m_annotations"]["tabular"][ "name" diff --git a/multilog/nomad/archive_template_Camera.yml b/multilog/nomad/archive_template_Camera.yml index 2dbcbfd..3010b5b 100644 --- a/multilog/nomad/archive_template_Camera.yml +++ b/multilog/nomad/archive_template_Camera.yml @@ -40,6 +40,12 @@ definitions: exposure_time: type: np.float64 description: Exposure time in micro seconds + comment: + type: str + m_annotations: + eln: + component: StringEditQuantity + description: "Comment, e.g. sensor position" data: m_def: camera # exposure_time: 10.e+3 diff --git a/multilog/nomad/archive_template_IR-Camera.yml b/multilog/nomad/archive_template_IR-Camera.yml index 5180e80..1090a29 100644 --- a/multilog/nomad/archive_template_IR-Camera.yml +++ b/multilog/nomad/archive_template_IR-Camera.yml @@ -60,6 +60,12 @@ definitions: extended_temperature_range: type: int description: "0: off, 1: on" + comment: + type: str + m_annotations: + eln: + component: StringEditQuantity + description: "Comment, e.g. sensor position" data: m_def: IR_camera # emissivity: 1 diff --git a/multilog/nomad/archive_template_sensor.yml b/multilog/nomad/archive_template_sensor.yml index c943655..ebdc317 100644 --- a/multilog/nomad/archive_template_sensor.yml +++ b/multilog/nomad/archive_template_sensor.yml @@ -9,7 +9,7 @@ definitions: - nomad.parsing.tabular.TableData - nomad.datamodel.data.EntryData m_annotations: - plot: [] + plot: [] # will be filled automatically # - label: My test plot label 1 # x: value_timestamp_rel # y: @@ -47,10 +47,11 @@ definitions: This is to timestamp the nominal setpoint or average reading values listed above in the value field. sub_sections: - {} + {} # will be filled with sensor_schema_template data: m_def: Sensors_list - data_file: test.csv + data_file: test.csv # will be replaced + # will be filled further by multilog sensor_schema_template: section: @@ -96,5 +97,11 @@ sensor_schema_template: eln: component: NumberEditQuantity defaultDisplayUnit: second + comment: + type: str + m_annotations: + eln: + component: StringEditQuantity + description: "Comment, e.g. sensor position" # TODO keep listing all the quantities here