sntools


Namesntools JSON
Version 1.4 PyPI version JSON
download
home_pageNone
SummaryEvent generator for supernova burst neutrinos
upload_time2024-05-03 15:52:19
maintainerNone
docs_urlNone
authorJost Migenda, sntools Contributors
requires_python>=3.8
licenseNone
keywords astrophysics supernova neutrino event generator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sntools
sntools is a Monte Carlo event generator for supernova neutrino interactions.

It is a command line application that uses detailed time- and energy-dependent neutrino fluxes (provided by various supernova models) to generate interactions within the detector volume and write them to event files that can be used as an input for a full detector simulation.
sntools was originally developed for Hyper-Kamiokande and later extended to support different detectors and detector materials.

Additionally, sntools can be used as a Python library that implements neutrino cross sections.

This README file should give a brief overview over sntools and help you get started. For more information, see the [full documentation for each release on GitHub](https://github.com/SNEWS2/sntools/releases).

## Getting Started
### Installation Instructions
First, make sure you have Python 3.8 or higher installed on your computer.
Then, in a terminal, run
```
pip install sntools
```
to install the latest version of sntools and all dependencies.

Finally, run
```
python -c 'import sntools; sntools.setup()'
```
to check whether sntools is working and to download the sample input file for the usage examples below.

### Example Usage

To generate your first supernova neutrino events with sntools, open a terminal window and type in the following command:
```
sntools fluxes/intp2001.data --format nakazato --endtime 50
```
This generates events for the first 50 ms of a supernova based on the neutrino flux given in the input file `fluxes/intp2001.data` (which is in the `nakazato` format) and writes them to a file named `outfile.kin` in the current directory.
(This sample input file is included in the sntools repository. See [this web page](http://asphwww.ph.noda.tus.ac.jp/snn/index.html) for more information.)

A more realistic usage that demonstrates more of sntools’ capabilities looks like this:
```
sntools fluxes/intp2001.data --format nakazato --channel es --detector SuperK --distance 20 --verbose --output intp2001es.kin
```
This uses the neutrino flux given in the same input file to generate neutrino-electron elastic scattering events in Super-Kamiokande for a supernova at 20 kpc distance. It also produces more verbose output, which lets you see that sntools generates events separately for different neutrino flavours (which have different fluxes and cross sections), before merging them into an output file named `intp2001es.kin`.

You can also run
```
sntools -h
```
to get an overview over all of sntools’ options.


## Input
Text file(s) containing information about neutrino fluxes produced by the supernova.
sntools distinguishes between three flavours: nu_e, anti-nu_e and nu_x (where nu_x stands for nu_mu or nu_tau or their respective antineutrinos).
The following input formats are supported.

#### Nakazato format
Used by recent simulations by the Nakazato group. Fluxes for 13 and 20 solar mass progenitors are included as `fluxes/intp1301.data` and `fluxes/intp2001.data`. [A description of the format and fluxes for more progenitors are available online.](http://asphwww.ph.noda.tus.ac.jp/snn/index.html)
If you use these included models in your work, please cite [Nakazato et al., ApJ Supp. 205 (2013) 2](https://arxiv.org/abs/1210.6841).

#### Gamma format
Text file containing time, mean energy, mean squared energy and luminosity. These parameters describe a Gamma distribution, [which is a good fit to the true spectrum](https://arxiv.org/abs/1211.3920). See `fluxes/sample-gamma.txt` for an unphysical sample file.

#### Warren2020 format
Similar to the Gamma format, but in an HDF5 file instead of plain text. Data [available online](https://zenodo.org/record/3952926).

#### Princeton format
Used in [recent simulations](https://arxiv.org/abs/1804.00689) by the Princeton group.

#### Totani format
Used in [historical simulation by Totani et al.](https://arxiv.org/abs/astro-ph/9710203), which is the baseline model in the [Hyper-Kamiokande Design Report](https://arxiv.org/abs/1805.04163).


## Interaction Channels
sntools supports the main interaction channels in water and liquid scintillator.

For water Cherenkov detectors, like Hyper-Kamiokande, these are inverse beta decay, elastic scattering on electrons and charged-current interactions of nu_e and anti-nu_e on oxygen-16 nuclei.

For liquid scintillator detectors, these are inverse beta decay, elastic scattering on electrons, charged-current interactions of nu_e and anti-nu_e on carbon-12 nuclei and neutral-current interactions on carbon-12 nuclei.

Water-based liquid scintillator, a mixture of the two materials, is also supported.


## Output
A text file in the NUANCE format (used by the `/mygen/vecfile` options in WCSim) or the RATPAC format.

## Support and Contributing
To report problems or ask for help, [open an issue on GitHub](https://github.com/SNEWS2/sntools/issues) or email the [lead developer](https://github.com/JostMigenda/).

Contributions to sntools are welcome! See instructions in the [full documentation](https://github.com/SNEWS2/sntools/releases) for help on common ways to extend sntools (e. g. by adding a new detector, input format or interaction channel) and please submit a pull request with your contributions!

Please note that this project is released with a Contributor Code of Conduct (see `CODE_OF_CONDUCT.md`). By participating in this project you agree to abide by its terms.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sntools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "astrophysics, supernova, neutrino, event generator",
    "author": "Jost Migenda, sntools Contributors",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/94/63/7ec802b2a9cbbb126cdad34f142b8957e7aa336bead16a51968f7338aee6/sntools-1.4.tar.gz",
    "platform": null,
    "description": "# sntools\nsntools is a Monte Carlo event generator for supernova neutrino interactions.\n\nIt is a command line application that uses detailed time- and energy-dependent neutrino fluxes (provided by various supernova models) to generate interactions within the detector volume and write them to event files that can be used as an input for a full detector simulation.\nsntools was originally developed for Hyper-Kamiokande and later extended to support different detectors and detector materials.\n\nAdditionally, sntools can be used as a Python library that implements neutrino cross sections.\n\nThis README file should give a brief overview over sntools and help you get started. For more information, see the [full documentation for each release on GitHub](https://github.com/SNEWS2/sntools/releases).\n\n## Getting Started\n### Installation Instructions\nFirst, make sure you have Python 3.8 or higher installed on your computer.\nThen, in a terminal, run\n```\npip install sntools\n```\nto install the latest version of sntools and all dependencies.\n\nFinally, run\n```\npython -c 'import sntools; sntools.setup()'\n```\nto check whether sntools is working and to download the sample input file for the usage examples below.\n\n### Example Usage\n\nTo generate your first supernova neutrino events with sntools, open a terminal window and type in the following command:\n```\nsntools fluxes/intp2001.data --format nakazato --endtime 50\n```\nThis generates events for the first 50 ms of a supernova based on the neutrino flux given in the input file `fluxes/intp2001.data` (which is in the `nakazato` format) and writes them to a file named `outfile.kin` in the current directory.\n(This sample input file is included in the sntools repository. See [this web page](http://asphwww.ph.noda.tus.ac.jp/snn/index.html) for more information.)\n\nA more realistic usage that demonstrates more of sntools\u2019 capabilities looks like this:\n```\nsntools fluxes/intp2001.data --format nakazato --channel es --detector SuperK --distance 20 --verbose --output intp2001es.kin\n```\nThis uses the neutrino flux given in the same input file to generate neutrino-electron elastic scattering events in Super-Kamiokande for a supernova at 20 kpc distance. It also produces more verbose output, which lets you see that sntools generates events separately for different neutrino flavours (which have different fluxes and cross sections), before merging them into an output file named `intp2001es.kin`.\n\nYou can also run\n```\nsntools -h\n```\nto get an overview over all of sntools\u2019 options.\n\n\n## Input\nText file(s) containing information about neutrino fluxes produced by the supernova.\nsntools distinguishes between three flavours: nu_e, anti-nu_e and nu_x (where nu_x stands for nu_mu or nu_tau or their respective antineutrinos).\nThe following input formats are supported.\n\n#### Nakazato format\nUsed by recent simulations by the Nakazato group. Fluxes for 13 and 20 solar mass progenitors are included as `fluxes/intp1301.data` and `fluxes/intp2001.data`. [A description of the format and fluxes for more progenitors are available online.](http://asphwww.ph.noda.tus.ac.jp/snn/index.html)\nIf you use these included models in your work, please cite [Nakazato et al., ApJ Supp. 205 (2013) 2](https://arxiv.org/abs/1210.6841).\n\n#### Gamma format\nText file containing time, mean energy, mean squared energy and luminosity. These parameters describe a Gamma distribution, [which is a good fit to the true spectrum](https://arxiv.org/abs/1211.3920). See `fluxes/sample-gamma.txt` for an unphysical sample file.\n\n#### Warren2020 format\nSimilar to the Gamma format, but in an HDF5 file instead of plain text. Data [available online](https://zenodo.org/record/3952926).\n\n#### Princeton format\nUsed in [recent simulations](https://arxiv.org/abs/1804.00689) by the Princeton group.\n\n#### Totani format\nUsed in [historical simulation by Totani et al.](https://arxiv.org/abs/astro-ph/9710203), which is the baseline model in the [Hyper-Kamiokande Design Report](https://arxiv.org/abs/1805.04163).\n\n\n## Interaction Channels\nsntools supports the main interaction channels in water and liquid scintillator.\n\nFor water Cherenkov detectors, like Hyper-Kamiokande, these are inverse beta decay, elastic scattering on electrons and charged-current interactions of nu_e and anti-nu_e on oxygen-16 nuclei.\n\nFor liquid scintillator detectors, these are inverse beta decay, elastic scattering on electrons, charged-current interactions of nu_e and anti-nu_e on carbon-12 nuclei and neutral-current interactions on carbon-12 nuclei.\n\nWater-based liquid scintillator, a mixture of the two materials, is also supported.\n\n\n## Output\nA text file in the NUANCE format (used by the `/mygen/vecfile` options in WCSim) or the RATPAC format.\n\n## Support and Contributing\nTo report problems or ask for help, [open an issue on GitHub](https://github.com/SNEWS2/sntools/issues) or email the [lead developer](https://github.com/JostMigenda/).\n\nContributions to sntools are welcome! See instructions in the [full documentation](https://github.com/SNEWS2/sntools/releases) for help on common ways to extend sntools (e.\u202fg. by adding a new detector, input format or interaction channel) and please submit a pull request with your contributions!\n\nPlease note that this project is released with a Contributor Code of Conduct (see `CODE_OF_CONDUCT.md`). By participating in this project you agree to abide by its terms.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Event generator for supernova burst neutrinos",
    "version": "1.4",
    "project_urls": {
        "Bug Tracker": "https://github.com/SNEWS2/sntools/issues",
        "Homepage": "https://github.com/SNEWS2/sntools"
    },
    "split_keywords": [
        "astrophysics",
        " supernova",
        " neutrino",
        " event generator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b8de95eb8e539d116cbcaf45c9399e5f2619740da2b7b0048bfe7aab3712497a",
                "md5": "527a65441bd2846e6313ec4a378005cd",
                "sha256": "39902ab13304e046452d858bf9eba857b7d792d572416bbea49baa431e4058a2"
            },
            "downloads": -1,
            "filename": "sntools-1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "527a65441bd2846e6313ec4a378005cd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 46917,
            "upload_time": "2024-05-03T15:52:17",
            "upload_time_iso_8601": "2024-05-03T15:52:17.327412Z",
            "url": "https://files.pythonhosted.org/packages/b8/de/95eb8e539d116cbcaf45c9399e5f2619740da2b7b0048bfe7aab3712497a/sntools-1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94637ec802b2a9cbbb126cdad34f142b8957e7aa336bead16a51968f7338aee6",
                "md5": "3c88b8ae5dec7a14cd96e6efad0d94fc",
                "sha256": "ce5f26d1d9754d59f46cbd9fd11eb27ecb1ce7a84b57300973942a8bbf569ce9"
            },
            "downloads": -1,
            "filename": "sntools-1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "3c88b8ae5dec7a14cd96e6efad0d94fc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 39081,
            "upload_time": "2024-05-03T15:52:19",
            "upload_time_iso_8601": "2024-05-03T15:52:19.028267Z",
            "url": "https://files.pythonhosted.org/packages/94/63/7ec802b2a9cbbb126cdad34f142b8957e7aa336bead16a51968f7338aee6/sntools-1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 15:52:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SNEWS2",
    "github_project": "sntools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sntools"
}
        
Elapsed time: 0.22427s