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 chemicals.

Installation

Install via pip:

pip install fallout

Usage

from fallout import Fallout

# Create an instance
fallout = Fallout()

# List available chemicals
chemicals = fallout.get_radioactive_chemicals()
print(chemicals)

# 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_chemicals(): 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 chemical 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.4.tar.gz (4.9 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.4-py2.py3-none-any.whl (6.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: fallout-0.0.4.tar.gz
  • Upload date:
  • Size: 4.9 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.4.tar.gz
Algorithm Hash digest
SHA256 bbbefdf515dea763565fd759850b4f43de1e0a7588507adc160c7d3836197506
MD5 9d2e941781d2bd36d18ffc70e3d4d2a0
BLAKE2b-256 7f490d7292fe45f30f66de98c945abd0c133f48803f18e0683832f0f24d5795d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fallout-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.6 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.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 666aeb13e559bec23345daa23f0ec3054086d21ec33c50892f91088397ce4eb2
MD5 768d4dab30dd10aeeaf5596995bbe905
BLAKE2b-256 061f2d82111fd715604deab6f8fd49fb7af49791e67ab82e5b262ff0d1369421

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