Skip to main content

Reusable code developed during my PhD in the Medical Applications of Particle Physics group at the University of Bern.

Project description

mapp-tricks package

Reusable code developed during my PhD in the Medical Applications of Particle Physics (MAPP) group at the University of Bern.

Use at your own risk!

  • Lars Eggimann

Usage of HPGeCalibration

Importing:

from mapp_tricks.spectrometer_calibrations import HPGeCalibration

Basic usage for directly getting the activity at the end of the beam:

calibration = HPGeCalibration(level=1, with_aluminum_foil=True)

A_EoB = calibration.get_activity_for_peak_at_end_of_beam(
    peak_area=...,
    peak_energy=...,
    life_time=...,
    real_time=...,
    cooling_time=...,
    branching_ratio=...,
    half_life=...,
)

print(f"Activity at end of beam: {A_EoB:.3f} Bq")

Or just the efficiency:

efficiency = calibration.evaluate_efficiency_at_energy(
    energy=...
)

print(f"Efficiency: {efficiency:.3f}")

You can also ask for activity of peak at the start of spectra measurement:

A_SoM = calibration.get_activity_for_peak_at_start_of_measurement(
    peak_area=...,
    peak_energy=...,
    life_time=...,
    real_time=...,
    branching_ratio=...,
    half_life=...,
)

print(f"Activity at start of measurement: {A_SoM:.3f} Bq")

You can also show the fit to visually verify the calibration:

calibration.plot_fit()

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

mapp_tricks-0.1.3.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

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

mapp_tricks-0.1.3-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file mapp_tricks-0.1.3.tar.gz.

File metadata

  • Download URL: mapp_tricks-0.1.3.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for mapp_tricks-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c77006737e7045c72f983e36fb5f6aea50833426ff5f22ab35ecce34063be04f
MD5 f2abba41b486c8ea9cf8cfc303be8c45
BLAKE2b-256 2a10bd52047859734ca977a8ff186d5bd22dbf478dae97f55a83557432d93a65

See more details on using hashes here.

File details

Details for the file mapp_tricks-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: mapp_tricks-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for mapp_tricks-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c7236e6f81bbfd1dd0bd9bba845372d59592e3ceccc0a315c72c11c4d78b9add
MD5 3a5a49c1e8380a3333501571b7964476
BLAKE2b-256 85e777d06cbb6476f1330c26071340afc18cbe2102048097657d670a4b4b1352

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