XeO2MixingRatioAndPolarizationLossChecker
Xe-O2 Mixing Ratio & Polarization Loss Checker
Utility description: Xe-O2 Mixing Ratio & Polarization Loss Checker
Xe-O2 Mixing Ratio & Polarization Loss Checker — Xe/O2 Mixture Ratio and Polarization Loss Analyzer
ℹ️ Utility balances between safety (O2) and signal quality (Xe):
• Polarization loss percentage during mixing
• Oxygen level (patient safety)
• Paramagnetic quenching factor
⚠️ CRITICAL: Oxygen quickly kills polarization!
But without it, the patient cannot breathe. Precise balance is needed.
Usage:
XeO2MixingRatioAndPolarizationLossChecker.exe → demo mode (console output)
XeO2MixingRatioAndPolarizationLossChecker.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,ProductName,Xe_Percent,O2_Percent,Initial_Pol,Final_Pol,Time_Sec,Max_Loss_Percent,Min_O2_Percent
Example:
MIX-LOSS-2026-001,HP-Xe-129,79,21,30,28,10,10,19
— WHY IS THIS NEEDED?
Mixture optimization is critical for successful HP-MRI procedure:
• Xenon provides signal but displaces oxygen
• Oxygen is necessary for life but is a paramagnet that drastically shortens T1 relaxation time
• During gas mixing and transport to patient, some polarization is inevitably lost due to contact with O2 and walls
• Utility helps find "golden mean": enough O2 for safety, but low enough to preserve signal
• Controls mixing process efficiency without excessive turbulence
⚠️ CRITICAL:
• Polarization loss ≤10% during mixing/delivery
• Oxygen ≥19% (absolute minimum)
• Quenching factor must be controllable
• Remaining polarization must be sufficient for scanning (>5%)
Key features:
• Signal degradation percentage calculation upon oxygen contact
• Breathing mixture safety assessment
• Exposure time monitoring (longer contact with O2 = worse)
• Balancing between physiology and quantum physics
Critical parameters:
• Polarization Loss: ≤10%
• O2 Level: ≥19%
• Quenching Factor: < 2.5
• Remaining Pol: > 5%
💡 Usage tips:
1. Minimize time between mixing and inhalation
2. Use laminar flows to reduce turbulence during mixing
3. For patients with lung diseases, increase O2 share even at cost of signal loss
4. Calibrate polarization sensors before and after mixing node
5. Maintain loss log to optimize transport tubing length
⚠️ Note: This is the only utility that directly links patient life (oxygen) with image quality (polarization). It does not allow sacrificing one for the other, ensuring strict compliance with both parameters.input.csv
BatchNumber,ProductName,Xe_Percent,O2_Percent,Initial_Pol,Final_Pol,Time_Sec,Max_Loss_Percent,Min_O2_Percent MIX-LOSS-2026-001,HP-Xe-129 (21% O2),79,21,30,28,10,10,19 MIX-LOSS-2026-002,HP-Xe-129 (High O2 Risk),70,30,30,20,15,10,19 MIX-LOSS-2026-003,HP-Xe-129 (Safe Mix),60,40,30,29,5,10,19
URS & FS — user requirements and functional specification
URS & FS — User Requirements and Functional Specification
This document defines the controlled interface and behaviour of XeO2MixingRatioAndPolarizationLossChecker for “Xe-O2 Mixing Ratio & Polarization Loss Checker”. Limits from the source description are an initial configuration and shall be reconciled with the approved specification, study protocol, equipment instructions and local SOPs before production use.
Domain constraints and critical parameters
- Polarization Loss: ≤10%
- O2 Level: ≥19%
- Quenching Factor: < 2.5
- Remaining Pol: > 5%
URS — User Requirements Specification
| ID | Requirement | Criticality | Acceptance criterion |
|---|---|---|---|
| URS-001 | The utility shall accept input.csv with the exact headers defined by the data contract. | High | The file is processed without manual header renaming. |
| URS-002 | The utility shall perform a deterministic assessment for “Xe-O2 Mixing Ratio & Polarization Loss Checker”. | High | PASS / WARNING / FAIL is produced for each row. |
| URS-003 | Required fields, types, ranges, units and data consistency shall be validated before domain rules. | High | Schema errors are separated from nonconformities. |
| URS-004 | Critical limits from the description and approved local configuration shall create a critical finding. | High | A critical rule violation results in FAIL. |
| URS-005 | The result shall be written to machine-readable output.json. | High | JSON contains source values, checks, warnings and failures. |
| URS-006 | The conformity decision shall not use machine learning. | Medium | The result is reproducible from explicit rules and inputs. |
| URS-007 | Traceability of batch, source file, rule version and final status shall be retained. | High | QA/QC can reproduce the decision. |
| URS-008 | The utility shall have exactly one primary portal tag: instrumental. | Medium | The other api / instrumental / medical_devices tags are absent. |
| URS-009 | Documentation shall support IQ/OQ/PQ or equivalent CSA/CSV verification. | Medium | The contract, test scenarios and change-control rules are supplied with the utility. |
input.csv data contract
| # | Field | Type | Unit | Sample | Purpose |
|---|---|---|---|---|---|
| 1 | BatchNumber | string | as specified | MIX-LOSS-2026-001 | Batch/lot identifier for traceability. |
| 2 | ProductName | string | as specified | HP-Xe-129 (21% O2) | Name of the controlled product, gas, procedure or equipment. |
| 3 | Xe_Percent | decimal | % | 79 | Xenon parameter: concentration, isotope fraction, activity, volume or purity depending on the field. |
| 4 | O2_Percent | decimal | % | 21 | Oxygen concentration or flow; a breathing-mixture safety and/or polarization-retention parameter. |
| 5 | Initial_Pol | decimal | as specified | 30 | Xe-129 hyperpolarization level, loss or target parameter. |
| 6 | Final_Pol | decimal | as specified | 28 | Xe-129 hyperpolarization level, loss or target parameter. |
| 7 | Time_Sec | decimal | s | 10 | Time parameter for processing, relaxation, pumping or examination. |
| 8 | Max_Loss_Percent | decimal | % | 10 | Controlled input.csv field: Max Loss Percent. |
| 9 | Min_O2_Percent | decimal | % | 19 | Oxygen concentration or flow; a breathing-mixture safety and/or polarization-retention parameter. |
BatchNumber,ProductName,Xe_Percent,O2_Percent,Initial_Pol,Final_Pol,Time_Sec,Max_Loss_Percent,Min_O2_Percent MIX-LOSS-2026-001,HP-Xe-129 (21% O2),79,21,30,28,10,10,19 MIX-LOSS-2026-002,HP-Xe-129 (High O2 Risk),70,30,30,20,15,10,19 MIX-LOSS-2026-003,HP-Xe-129 (Safe Mix),60,40,30,29,5,10,19
FS — Functional Specification
| ID | Function | Implementation |
|---|---|---|
| FS-001 | CLI execution | XeO2MixingRatioAndPolarizationLossChecker.exe supports demo mode and input.csv output.json mode. |
| FS-002 | CSV import | Read UTF-8 CSV and validate header, column count and order. |
| FS-003 | Schema validation | Validate required values, empties, types and basic plausibility. |
| FS-004 | Domain rule engine | Apply explicit rules for “Xe-O2 Mixing Ratio & Polarization Loss Checker” and locally approved limits. |
| FS-005 | Status aggregation | FAIL for a critical finding; WARNING for a non-critical deviation; PASS for conformity. |
| FS-006 | JSON export | Write source values, applied rules, statuses, warnings, failures and configuration version. |
| FS-007 | Audit support | Retain a result structure suitable for review, investigation, IQ/OQ and change control. |
| FS-008 | Integration contract | LIMS/ELN/MES or an instrument wrapper creates CSV; the utility returns JSON. |
output.json example
{
"utilityId": "xe-o2-mixing-ratio-and-polarization-loss-checker",
"primaryTag": "instrumental",
"overallStatus": "PASS|WARNING|FAIL",
"sourceFile": "input.csv",
"checks": [
{
"parameter": "BatchNumber",
"value": "MIX-LOSS-2026-001",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "ProductName",
"value": "HP-Xe-129 (21% O2)",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Xe_Percent",
"value": "79",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "O2_Percent",
"value": "21",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Initial_Pol",
"value": "30",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Final_Pol",
"value": "28",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Time_Sec",
"value": "10",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
},
{
"parameter": "Max_Loss_Percent",
"value": "10",
"status": "PASS|WARNING|FAIL",
"message": "Rule-based check result"
}
],
"warnings": [],
"criticalFindings": []
}
OQ/PQ test scenarios
| ID | Scenario | Expected result |
|---|---|---|
| OQ-001 | Valid example row | PASS or an allowed WARNING under local rules. |
| OQ-002 | Required column missing | Schema error; domain checks do not mask it. |
| OQ-003 | Non-numeric value in numeric field | Type-conversion error. |
| OQ-004 | Critical parameter outside its limit | FAIL and a critical finding. |
| OQ-005 | Boundary value | The result follows the configured ≤ / ≥ / < / > operator. |
| PQ-001 | Real site data | Agreed QA/QC review retaining CSV, JSON, version and checksum. |
QA/QC and change control
- Do not change column names without updating the validator, documentation and test set.
- Retain input.csv, output.json, executable version, rule version and checksums.
- Before production use, verify local limits and execute IQ/OQ/PQ or equivalent CSA.
- Changes affecting patient safety, dosimetry, gas composition, polarization or equipment require documented impact assessment.
Included in packages
Rph Hyperpolarized Xenon Lifecycle QC Suite
29 utilities for the hyperpolarized xenon lifecycle: isotope composition and gas purity, SEOP and polarization, T1/storage/transport, safe blending and delivery, MRI/SPECT QC, dosimetry, scavenging, recovery and recycling.
OpenRPH isotope family: xenon and gas tracers
Xe-127, Xe-129 and Xe-133 for ventilation, hyperpolarized imaging, gas QC and safety.
OpenRPH organ/system: hepatobiliary and GI
HIDA, mebrofenin, gallbladder, gastric emptying, GI transit, bleeding and liver/spleen imaging.
OpenRPH organ/system: pulmonary and ventilation
Lung perfusion, MAA, V/Q, aerosol, xenon ventilation, shunt and pulmonary dosimetry.
OpenRPH use case: xenon, ventilation and medical gases
Xe-129, Xe-133, Xe-127, hyperpolarization, SEOP, T1, mixing, scavenging, transport, recovery and ventilation imaging.
OpenRPH workflow: dosimetry and therapy planning
Activity planning, absorbed dose, organ dose, lung shunt, preplanning and therapy verification.
OpenRPH workflow: imaging QC and quantitative interpretation
Acquisition, uptake, clearance, perfusion, transit, ejection fraction, segmentation and quantitative imaging.
Open