Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/yadg/extractors/fusion/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,30 @@ def chromdata(jsdata: dict, uts: float) -> Dataset:
else:
species.add(peak["label"])
if "height" in peak:
if peak["height"] is None:
continue
raw["height"][peak["label"]] = (float(peak["height"]), 1.0)
if "area" in peak:
if peak["area"] is None:
continue
raw["area"][peak["label"]] = (float(peak["area"]), 0.01)
if "concentration" in peak:
if peak["concentration"] is None:
continue
raw["concentration"][peak["label"]] = (
float(peak["concentration"]),
float(peak["concentration"]) * 1e-3,
)
if "normalizedConcentration" in peak:
if peak["normalizedConcentration"] is None:
continue
raw["xout"][peak["label"]] = (
float(peak["normalizedConcentration"]),
float(peak["normalizedConcentration"]) * 1e-3,
)
if "top" in peak:
if peak["top"] is None:
continue
raw["retention time"][peak["label"]] = (float(peak["top"]), 0.01)

valve = jsdata.get("annotations", {}).get("valcoPosition", None)
Expand Down
1 change: 1 addition & 0 deletions tests/test_x_fusion_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"AgPTFE28_100mA_NaS_01 - Aug 13 2021, 17;56.fusion-data",
"AgPTFE28_100mA_NaS_01 - Aug 13 2021, 18;18.fusion-data",
"issue_198.fusion-data",
"issue_213.fusion-data",
],
)
def test_fusion_json(infile, datadir):
Expand Down
1 change: 1 addition & 0 deletions tests/test_x_fusion_json/issue_213.fusion-data

Large diffs are not rendered by default.

Binary file not shown.