Skip to main content

The Fallout library provides simple methods for calculating decay times, remaining mass, and radiation dose (siverts) for a set of predefined radioactive chemicals.

Project description

Fallout Library

The Fallout library provides simple methods for calculating decay times, remaining mass, and radiation dose (siverts) for a set of predefined radioactive substances.

Installation

Install via pip:

pip install fallout

Usage

from fallout import Fallout

# Create an instance
fallout = Fallout()

# List available substances
substances = fallout.get_radioactive_substances()
print(substances)

# Calculate remaining grams after a number of half-lives
remaining = fallout.calculate_remaining_gram(gram=10, number_of_halflifes=2)
print(remaining)

# Determine risk based on amount of radioactive material
risk, siverts = fallout.calculate_risk("Uranium-235", 5)
print(risk, siverts)

Methods Overview

  • get_radioactive_substances(): Returns the dictionary of radioisotopes and their properties.
  • calculate_decay_time(type, number_of_halflifes): Returns the realistic decay time based on half-lives and isotope data.
  • calculate_remaining_gram(gram, number_of_halflifes): Computes how much mass remains after a certain number of half-lives.
  • calculate_siverts(type, gram): Calculates the radiation dose in siverts based on mass.
  • calculate_risk(type, gram): Gives a risk assessment and dose in siverts.

Example CLI Usage

If you run the fallout.py file directly:

python fallout.py

It will prompt for substance type, amount in grams, and number of half-lives to compute safety and decay information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fallout-0.0.5.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fallout-0.0.5-py2.py3-none-any.whl (6.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file fallout-0.0.5.tar.gz.

File metadata

  • Download URL: fallout-0.0.5.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for fallout-0.0.5.tar.gz
Algorithm Hash digest
SHA256 9a2384431549f63abb324f10cddaf75c884664cf634369ae5a55650943829c54
MD5 6ee12ece1f092c6b7f257c942604c2a6
BLAKE2b-256 2560458a0943b3fa5b8ccd83d7afd3fe3324dfbe364d57297b0b4220358deae4

See more details on using hashes here.

File details

Details for the file fallout-0.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: fallout-0.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for fallout-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a9319995f997f1bc00d0e8ac0b54b764edc8c717c7a982291207c55bbb5dfc34
MD5 9b2ff61188c6f51b56afebf4b9da0ac0
BLAKE2b-256 f82b362decf2feb3f13fd043da3086c1dd6cad8a83f6b6606edc829d025333e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page