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 group at the University of Bern.

  • Lars Eggimann

Usage of HPGeCalibration

You will need the following packages (example with pip):

pip install numpy pandas uncertainties scipy matplotlib

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.2.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.2-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mapp_tricks-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5ddc764790b7a97ded3b5b62e088395932baacb9127886c695df43cb8064c15e
MD5 1e1cd5ec50164e37f9ee0354133e1149
BLAKE2b-256 77e823f40bfd51edc757c60639acdb854e0239efd0dac7bd7434c7100b337be5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mapp_tricks-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 02d9a68b4d6b88cd5b704dd744b3e391eb6d6f0db677410a289df35b54044a21
MD5 5b4713895a1778e0ab4433ed74661a26
BLAKE2b-256 4da09427c37e4d5dc2fdfa9be928a1a94ddb6a635418a7fc018fd928233cc42a

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