nupyosc


Namenupyosc JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryNuPy: A new way to numerically compute neutrino oscillations in matter
upload_time2023-05-22 03:24:16
maintainer
docs_urlNone
authorBaalateja Kataru
requires_python
license
keywords probability neutrino oscillations
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NuPy

We use the recently discovered Eigenvalue-Eigenvector and Adjugate Identities to compute oscillation probabilities with minimal algorithmic steps.

# Usage


## Imports
```Python
import numpy as np
np.set_printoptions(precision=3)

from NuPy.oscprobs import OscProbIdentities
```

## Define your oscillation parameters

```Python
a = 0.2
theta12 = np.radians(33.2)
theta13 = np.radians(4.4)
theta23 = np.radians(46.1)
alpha = 0.026
delta = 50
deltacp = np.pi/6
```

## Compute probabilities
```Python
prob = OscProbIdentities(alpha, a, delta, deltacp, theta12, theta13, theta23)

print(prob.mat_angles_phase()) # prints mixing angles and phase in matter
# (29.988882340423384, 84.48628984963665, 3.5930259417910695, 44.188561816129464)

print(prob.PMNS()) # prints values of PMNS matrix elements
"""
[[ 0.849+0.000e+00j -0.297+0.000e+00j -0.062-4.318e-01j]
 [-0.335+8.346e-02j -0.92 -2.921e-02j -0.184+1.342e-18j]
 [ 0.01 +3.989e-01j  0.214-1.396e-01j -0.881-7.870e-19j]]
"""

print(prob.PMNS() @ prob.PMNS().H) # unitarity check
"""
[[1.000e+00-1.696e-22j 0.000e+00+1.561e-17j 6.939e-18+5.551e-17j]
 [0.000e+00-1.561e-17j 1.000e+00-4.276e-19j 5.551e-17-1.327e-18j]
 [1.388e-17-4.857e-17j 5.551e-17+0.000e+00j 1.000e+00-8.097e-19j]]
"""

print(prob.probabilities()) # prints all 9 probabilities
"""
[[0.97  0.015 0.014]
 [0.014 0.236 0.75 ]
 [0.015 0.749 0.236]]
"""
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "nupyosc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "probability,neutrino,oscillations",
    "author": "Baalateja Kataru",
    "author_email": "<kavesbteja@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/9c/31/9aee1b858b06f884bf0f2de48b5867acd6273c9da4f1154f5564cabb14a0/nupyosc-0.0.2.tar.gz",
    "platform": null,
    "description": "# NuPy\n\nWe use the recently discovered Eigenvalue-Eigenvector and Adjugate Identities to compute oscillation probabilities with minimal algorithmic steps.\n\n# Usage\n\n\n## Imports\n```Python\nimport numpy as np\nnp.set_printoptions(precision=3)\n\nfrom NuPy.oscprobs import OscProbIdentities\n```\n\n## Define your oscillation parameters\n\n```Python\na = 0.2\ntheta12 = np.radians(33.2)\ntheta13 = np.radians(4.4)\ntheta23 = np.radians(46.1)\nalpha = 0.026\ndelta = 50\ndeltacp = np.pi/6\n```\n\n## Compute probabilities\n```Python\nprob = OscProbIdentities(alpha, a, delta, deltacp, theta12, theta13, theta23)\n\nprint(prob.mat_angles_phase()) # prints mixing angles and phase in matter\n# (29.988882340423384, 84.48628984963665, 3.5930259417910695, 44.188561816129464)\n\nprint(prob.PMNS()) # prints values of PMNS matrix elements\n\"\"\"\n[[ 0.849+0.000e+00j -0.297+0.000e+00j -0.062-4.318e-01j]\n [-0.335+8.346e-02j -0.92 -2.921e-02j -0.184+1.342e-18j]\n [ 0.01 +3.989e-01j  0.214-1.396e-01j -0.881-7.870e-19j]]\n\"\"\"\n\nprint(prob.PMNS() @ prob.PMNS().H) # unitarity check\n\"\"\"\n[[1.000e+00-1.696e-22j 0.000e+00+1.561e-17j 6.939e-18+5.551e-17j]\n [0.000e+00-1.561e-17j 1.000e+00-4.276e-19j 5.551e-17-1.327e-18j]\n [1.388e-17-4.857e-17j 5.551e-17+0.000e+00j 1.000e+00-8.097e-19j]]\n\"\"\"\n\nprint(prob.probabilities()) # prints all 9 probabilities\n\"\"\"\n[[0.97  0.015 0.014]\n [0.014 0.236 0.75 ]\n [0.015 0.749 0.236]]\n\"\"\"\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "NuPy: A new way to numerically compute neutrino oscillations in matter",
    "version": "0.0.2",
    "project_urls": null,
    "split_keywords": [
        "probability",
        "neutrino",
        "oscillations"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "67c185c30afb4119933e049842d396e2a59a8873d8fca8e2a3bafa3e4f9862db",
                "md5": "48a8847aa509a3f884fab256dc8ef84f",
                "sha256": "3f3dd26e0d5d9c13cced29a47309829880fbb1dce28a96b6566aa5fab907ce41"
            },
            "downloads": -1,
            "filename": "nupyosc-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48a8847aa509a3f884fab256dc8ef84f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4569,
            "upload_time": "2023-05-22T03:24:14",
            "upload_time_iso_8601": "2023-05-22T03:24:14.173550Z",
            "url": "https://files.pythonhosted.org/packages/67/c1/85c30afb4119933e049842d396e2a59a8873d8fca8e2a3bafa3e4f9862db/nupyosc-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9c319aee1b858b06f884bf0f2de48b5867acd6273c9da4f1154f5564cabb14a0",
                "md5": "63d9c16c2772c9f5b5ba29ee4e1c68ea",
                "sha256": "5b4dbf1ee4d2339c2383071691f95ffba36bc1d54bc4702457dd532c1fe25294"
            },
            "downloads": -1,
            "filename": "nupyosc-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "63d9c16c2772c9f5b5ba29ee4e1c68ea",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4390,
            "upload_time": "2023-05-22T03:24:16",
            "upload_time_iso_8601": "2023-05-22T03:24:16.267670Z",
            "url": "https://files.pythonhosted.org/packages/9c/31/9aee1b858b06f884bf0f2de48b5867acd6273c9da4f1154f5564cabb14a0/nupyosc-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-22 03:24:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nupyosc"
}
        
Elapsed time: 1.72498s