# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
"""Recover fractions in the Davis (1992) Table 2 spiked mixture."""

import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).parents[1] / "reference"))
from rir import spiked_fractions

standard = 0.2144
zincite, calcite = spiked_fractions([4661, 2298], [4.35, 2.98], [1, 1], 631, 1, standard)
print(f"Spiked mixture: ZnO {zincite:.4f}, calcite {calcite:.4f}")
print(f"Unassigned mass in spiked mixture: {1 - standard - zincite - calcite:.4f}")
