diff --git a/src/allotropy/parsers/tecan_magellan/tecan_magellan_structure.py b/src/allotropy/parsers/tecan_magellan/tecan_magellan_structure.py index 9efedcc5e0..7b84522a82 100644 --- a/src/allotropy/parsers/tecan_magellan/tecan_magellan_structure.py +++ b/src/allotropy/parsers/tecan_magellan/tecan_magellan_structure.py @@ -4,6 +4,7 @@ from io import StringIO from pathlib import Path import re +from typing import Any from allotropy.allotrope.schema_mappers.adm.plate_reader.rec._2024._06.plate_reader import ( ErrorDocument, @@ -45,6 +46,7 @@ class MeasurementSettings: number_of_averages: float plate_identifier: str temperature: float + custom_info: dict[str, Any] @staticmethod def create(settings_lines: list[str], temperature: float) -> MeasurementSettings: @@ -52,6 +54,8 @@ def create(settings_lines: list[str], temperature: float) -> MeasurementSettings raw_wavelength = settings[str, "Measurement wavelength"].split()[0] measurement_mode = settings[str, "Measurement mode"] + settings.mark_read("Unit") + return MeasurementSettings( measurement_mode=measurement_mode, measurement_type=get_measurement_type(measurement_mode), @@ -59,6 +63,7 @@ def create(settings_lines: list[str], temperature: float) -> MeasurementSettings number_of_averages=settings[float, "Number of flashes"], plate_identifier=settings[str, "Plate definition file"].split(".")[0], temperature=temperature, + custom_info=settings.get_unread(), ) @@ -158,6 +163,11 @@ def create_metadata(data: MagellanMetadata, file_path: str) -> Metadata: def create_measurement_groups( data: SeriesData, metadata: MagellanMetadata, well_count: float ) -> MeasurementGroup: + + # The last two columns contain no data + column_names = data.series.index.to_list() + data.mark_read(set(column_names[-2:])) + measurements = [] for measurement_label, settings in metadata.measurements_settings.items(): @@ -187,6 +197,7 @@ def create_measurement_groups( number_of_averages=settings.number_of_averages, detector_wavelength_setting=settings.wavelength_setting, error_document=errors, + device_control_custom_info=settings.custom_info, ) ) @@ -197,4 +208,5 @@ def create_measurement_groups( analyst=metadata.analyst, analytical_method_identifier=metadata.analytical_method_identifier, experimental_data_identifier=metadata.experimental_data_identifier, + custom_info=data.get_unread(), ) diff --git a/tests/parsers/tecan_magellan/testdata/SLA01P01_OD.json b/tests/parsers/tecan_magellan/testdata/SLA01P01_OD.json index 9fa1dd1284..52aea827f7 100644 --- a/tests/parsers/tecan_magellan/testdata/SLA01P01_OD.json +++ b/tests/parsers/tecan_magellan/testdata/SLA01P01_OD.json @@ -18,6 +18,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -65,6 +68,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -112,6 +118,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -159,6 +168,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -206,6 +218,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -253,6 +268,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -300,6 +318,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -347,6 +368,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -394,6 +418,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -441,6 +468,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -488,6 +518,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -535,6 +568,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -582,6 +618,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -629,6 +668,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -676,6 +718,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -723,6 +768,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -770,6 +818,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -817,6 +868,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -864,6 +918,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -911,6 +968,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -958,6 +1018,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1005,6 +1068,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1052,6 +1118,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1099,6 +1168,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1146,6 +1218,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1193,6 +1268,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1240,6 +1318,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1287,6 +1368,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1334,6 +1418,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1381,6 +1468,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1428,6 +1518,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1475,6 +1568,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1522,6 +1618,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1569,6 +1668,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1616,6 +1718,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1663,6 +1768,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1710,6 +1818,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1757,6 +1868,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1804,6 +1918,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1851,6 +1968,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1898,6 +2018,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1945,6 +2068,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -1992,6 +2118,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2039,6 +2168,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2086,6 +2218,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2133,6 +2268,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2180,6 +2318,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2227,6 +2368,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2274,6 +2418,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2321,6 +2468,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2368,6 +2518,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2415,6 +2568,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2462,6 +2618,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2509,6 +2668,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2556,6 +2718,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2603,6 +2768,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2650,6 +2818,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2697,6 +2868,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2744,6 +2918,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2791,6 +2968,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2838,6 +3018,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2885,6 +3068,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2932,6 +3118,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -2979,6 +3168,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3026,6 +3218,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3073,6 +3268,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3120,6 +3318,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3167,6 +3368,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3214,6 +3418,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3261,6 +3468,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3308,6 +3518,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3355,6 +3568,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3402,6 +3618,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3449,6 +3668,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3496,6 +3718,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3543,6 +3768,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3590,6 +3818,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3637,6 +3868,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3684,6 +3918,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3731,6 +3968,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3778,6 +4018,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3825,6 +4068,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3872,6 +4118,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3919,6 +4168,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -3966,6 +4218,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4013,6 +4268,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4060,6 +4318,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4107,6 +4368,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4154,6 +4418,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4201,6 +4468,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4248,6 +4518,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4295,6 +4568,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4342,6 +4618,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4389,6 +4668,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4436,6 +4718,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4483,6 +4768,9 @@ "detector wavelength setting": { "value": 595.0, "unit": "nm" + }, + "custom information document": { + "Shake duration (Linear High)": "10 s" } } ] @@ -4521,7 +4809,7 @@ "file name": "SLA01P01_OD.xlsx", "UNC path": "tests/parsers/tecan_magellan/testdata/SLA01P01_OD.xlsx", "ASM converter name": "allotropy_tecan_magellan", - "ASM converter version": "0.1.65", + "ASM converter version": "0.1.105", "software name": "Magellan" }, "device system document": {