Skip to main content

Microservices for KM3NeT

Project description

https://git.km3net.de/km3py/km3services/badges/master/pipeline.svg https://git.km3net.de/km3py/km3services/badges/master/coverage.svg https://examples.pages.km3net.de/km3badges/docs-latest-brightgreen.svg

This Python package provides access to KM3NeT microservices. It’s in an early development stage and the API will likely change any until v1.0.0 is released.

Installation

As usual, install with pip:

pip install km3services

Available Microservices

OscProb

The km3services.oscprob module wraps the OscProb package to calculate neutrino oscillation probabilities. Here is an example how to calculate the transition probabilities from muon to electron neutrino (the API will be polished soon):

import km3services
import numpy as np

n = 1000
energies = np.random.randint(1, 50, n)  # generate `n` energies between 1-50 GeV
cos_zeniths = -np.random.rand(n) / 2
flav_in = 0   # electron neutrino
flav_out = 1  # muon neutrino

probabilities = km3services.oscprob.oscillationprobabilities(flav_in, flav_out, energies, cos_zeniths)
print(probabilities)

The returned probabilities is a numpy array:

[4.20254330e-03 7.46278836e-05 6.18139696e-04 4.03814960e-03
3.38002558e-03 3.33962606e-04 4.53159234e-02 5.03111960e-02
...
2.23391190e-03 2.07540790e-03 6.71385177e-03 3.03348121e-02
1.86633322e-02 4.81416626e-03 4.55362912e-05 3.59935810e-03]

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

km3services-0.2.0.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

km3services-0.2.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file km3services-0.2.0.tar.gz.

File metadata

  • Download URL: km3services-0.2.0.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for km3services-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8b56e9d347d40c11d35cff251ba10c2e1a91829ce16a230f911d493990ffc695
MD5 2b800ab5a40de35207de3aafa5b69f91
BLAKE2b-256 4daf4844214030e98bca04ca7b5ab41795d6395da13bd3d2f57b0a6017ffb0ee

See more details on using hashes here.

File details

Details for the file km3services-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: km3services-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for km3services-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7b514d39be4112b67361304010279cae9970a7e376fe021444ee696ac315df2
MD5 45727dbacc054125fa4e04fa9db9df47
BLAKE2b-256 2789013e139a0dce83f68f389053ae40fd6989756bf4a753546e980b2c2f00c0

See more details on using hashes here.

Supported by

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