🛠️ToolsShed

Radioactivity Converter

Convert between radioactivity units like Becquerel, Curie, and radiation dose units.

Radioactivity (Activity)

Radiation Dose

RadioactivityConverter.notes

RadioactivityConverter.noteActivity

RadioactivityConverter.noteDose

RadioactivityConverter.noteConversion

Preguntas Frecuentes

Implementación de Código

# Radioactivity unit conversions
ACTIVITY_TO_BQ = {
    "Bq":  1,
    "kBq": 1e3,
    "MBq": 1e6,
    "GBq": 1e9,
    "Ci":  3.7e10,
    "mCi": 3.7e7,
    "uCi": 3.7e4,
    "nCi": 3.7e1,
    "pCi": 3.7e-2,
    "dpm": 1 / 60,
}

DOSE_TO_GY = {
    "Gy":  1,
    "mGy": 1e-3,
    "uGy": 1e-6,
    "rad": 1e-2,
    "Sv":  1,       # For low-LET radiation, 1 Sv ≈ 1 Gy
    "mSv": 1e-3,
    "uSv": 1e-6,
    "rem": 1e-2,
    "mrem": 1e-5,
}

def convert_activity(value: float, from_unit: str, to_unit: str) -> float:
    bq = value * ACTIVITY_TO_BQ[from_unit]
    return bq / ACTIVITY_TO_BQ[to_unit]

def convert_dose(value: float, from_unit: str, to_unit: str) -> float:
    gy = value * DOSE_TO_GY[from_unit]
    return gy / DOSE_TO_GY[to_unit]

# Examples
print(f"1 Ci = {convert_activity(1, 'Ci', 'GBq'):.2f} GBq")
print(f"1 Sv = {convert_dose(1, 'Sv', 'rem'):.1f} rem")
print(f"100 mSv = {convert_dose(100, 'mSv', 'mGy'):.1f} mGy")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.