Skip to content

Commit cdfa4c9

Browse files
feat: Agilent OpenLab CDS - add peak area percentage and peak height (#1083)
Co-authored-by: james-leinas <157071641+james-leinas@users.noreply.github.com>
1 parent 1619638 commit cdfa4c9

2 files changed

Lines changed: 1984 additions & 302 deletions

File tree

src/allotropy/parsers/agilent_openlab_cds/agilent_openlab_cds_structure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def create_peak(peak_structure: list[dict[str, Any]]) -> list[Peak]:
117117
else "mAU.s"
118118
if "Area" in peak and peak["Area"].get("@unit")
119119
else None,
120+
relative_area=try_float_or_none(peak.get("AreaPercent", {}).get("@val")),
120121
height=try_float_or_none(peak.get("Height", {}).get("@val"))
121122
if try_float_or_none(peak.get("Height", {}).get("@val")) is not None
122123
else None,
@@ -125,6 +126,9 @@ def create_peak(peak_structure: list[dict[str, Any]]) -> list[Peak]:
125126
else "mAU"
126127
if "Height" in peak and peak["Height"].get("@unit")
127128
else None,
129+
relative_height=try_float_or_none(
130+
peak.get("HeightPercent", {}).get("@val")
131+
),
128132
written_name=peak["Peak Metadata"].get("CompoundName"),
129133
retention_time=float(peak["RetentionTime"]["@val"]) * 60
130134
if peak.get("RetentionTime")

0 commit comments

Comments
 (0)