Skip to content

Commit 6a8ca20

Browse files
fix: Agilent Gen5 - fix spectrum data cube label (#1014)
1 parent d34062b commit 6a8ca20

4 files changed

Lines changed: 22 additions & 7 deletions

File tree

src/allotropy/parsers/agilent_gen5/agilent_gen5_structure.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,8 +1182,23 @@ def create_spectrum_results(
11821182
excitation_bandwidth_setting = 20.0
11831183

11841184
for well_position, well_absorbance_data in wells_data.items():
1185+
if measurement_type == MeasurementType.ULTRAVIOLET_ABSORBANCE_CUBE_SPECTRUM:
1186+
label = "absorbance-spectrum"
1187+
elif measurement_type in (
1188+
MeasurementType.EMISSION_FLUORESCENCE_CUBE_SPECTRUM,
1189+
MeasurementType.EXCITATION_FLUORESCENCE_CUBE_SPECTRUM,
1190+
):
1191+
label = "fluorescence-spectrum"
1192+
elif measurement_type in (
1193+
MeasurementType.EMISSION_LUMINESCENCE_CUBE_SPECTRUM,
1194+
MeasurementType.EXCITATION_LUMINESCENCE_CUBE_SPECTRUM,
1195+
):
1196+
label = "luminescence-spectrum"
1197+
else:
1198+
label = "spectrum"
1199+
11851200
spectrum_data_cube = DataCube(
1186-
label="absorbance-spectrum",
1201+
label=label,
11871202
structure_dimensions=[
11881203
DataCubeComponent(
11891204
concept="wavelength",

tests/parsers/agilent_gen5/testdata/fluorescence/spectrum_emission_data.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
]
5353
},
5454
"fluorescence emission spectrum data cube": {
55-
"label": "absorbance-spectrum",
55+
"label": "fluorescence-spectrum",
5656
"cube-structure": {
5757
"dimensions": [
5858
{
@@ -117,7 +117,7 @@
117117
"UNC path": "tests/parsers/agilent_gen5/testdata/fluorescence/spectrum_emission_data.txt",
118118
"file name": "spectrum_emission_data.txt",
119119
"ASM converter name": "allotropy_agilent_gen5",
120-
"ASM converter version": "0.1.90",
120+
"ASM converter version": "0.1.93",
121121
"software name": "Gen5",
122122
"software version": "3.12.08"
123123
},

tests/parsers/agilent_gen5/testdata/fluorescence/spectrum_excitation_data.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
]
5353
},
5454
"fluorescence excitation spectrum data cube": {
55-
"label": "absorbance-spectrum",
55+
"label": "fluorescence-spectrum",
5656
"cube-structure": {
5757
"dimensions": [
5858
{
@@ -116,7 +116,7 @@
116116
"UNC path": "tests/parsers/agilent_gen5/testdata/fluorescence/spectrum_excitation_data.txt",
117117
"file name": "spectrum_excitation_data.txt",
118118
"ASM converter name": "allotropy_agilent_gen5",
119-
"ASM converter version": "0.1.90",
119+
"ASM converter version": "0.1.93",
120120
"software name": "Gen5",
121121
"software version": "3.12.08"
122122
},

tests/parsers/agilent_gen5/testdata/luminescence/spectral_scan.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
]
4545
},
4646
"fluorescence emission spectrum data cube": {
47-
"label": "absorbance-spectrum",
47+
"label": "luminescence-spectrum",
4848
"cube-structure": {
4949
"dimensions": [
5050
{
@@ -88,7 +88,7 @@
8888
"UNC path": "tests/parsers/agilent_gen5/testdata/luminescence/spectral_scan.txt",
8989
"file name": "spectral_scan.txt",
9090
"ASM converter name": "allotropy_agilent_gen5",
91-
"ASM converter version": "0.1.90",
91+
"ASM converter version": "0.1.93",
9292
"software name": "Gen5",
9393
"software version": "3.12.08"
9494
},

0 commit comments

Comments
 (0)