SpyDust


NameSpyDust JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/zzhang0123/SpyDust
SummaryA code for modeling spinning dust radiation
upload_time2025-01-01 23:43:22
maintainerNone
docs_urlNone
authorZheng Zhang
requires_python<4,>=3.7
licenseNone
keywords astrophysics astronomy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SpyDust

[**SpyDust**](https://arxiv.org/abs/2412.03431) is an advanced Python package for modeling spinning dust radiation in astrophysical environments. Building upon previous models (the IDL [**SPDUST**](https://arxiv.org/pdf/1003.4732)), SpyDust offers enhanced capabilities and corrections, making it a valuable tool for researchers in astrophysics and related fields.

---

## Features

- **Comprehensive Grain Shape Modeling**: Considers a wide range of grain geometries, providing corresponding grain dynamics, directional radiation fields, and angular momentum transports.

- **Updated Physical Processes**: Incorporates corrections and extensions, including updated expressions for the effects of electrical dipole radiation back-reaction and plasma drag on angular momentum dissipation.

- **Parallisation**: Functions can be run in parallel (implemented by mpi4py) by simply setting the corresponding keyword to True.

- **SPDUST as is** mode: Provides a submodule, **SPDUST_as_is**, which is exactly the full equivalent of the IDL spdust. Just in case the user wants to stick with the spdust simulation.

- **Example notebooks**: Provide some Jupyter notebooks to help users get started with this software package [paper](https://arxiv.org/abs/2412.03431).

---

## Requirements

SpyDust requires Python 3.7 or higher (up to Python 3.9) and the following dependencies:

**Required**:
- `numpy`
- `scipy`
- `logging`
- `mpi4py`

**Optional**:
- `pandas`: This is not needed for spinning dust spectra, but if free free emission is also desired (using free_free.py), then it is needed.

---

## Installation

You can install SpyDust using pip:

```bash
pip install SpyDust
```

Otherwise, you can directly `git clone' this repo and set up the environment by yourself.

---

# Usage

Import the package in your project and explore its functionalities for modeling spinning dust radiation. Data files required for computations are bundled with the package.

---

## Example usage:

Here is an example of using the `SpyDust.SpyDust' function to generate a spectrum for a sample CNM environment:
```python
CNM_params = {'nh' : 30, 'T': 100., 'Chi': 1, 'xh': 1.2e-3, 'xC': 3e-4, 'y' : 0, 'gamma': 0, 'dipole': 9.3, 'line':7}

The parameters are as follows: 
# 'nH': total hydrogen number density (cm3), 
# 'T': gas temperature (K), 
# 'chi': intensity of the radiation field relative to the average interstellar radiation field, 
# 'xh': hydrogen ionization fraction, 
# 'xC': ionized carbon fractional abundance, 
# 'y': molecular hydrogen fractional abundance, 
# 'gamma': H2 formation efficiency, 
# 'dipole': rms dipole moment for dust grains.

min_freq=1 # in GHz
max_freq=300 # in GHz
n_freq=500

spectrum = SpyDust.SpyDust(CNM_params, min_freq=min_freq, max_freq=max_freq, n_freq=n_freq, single_beta=True)
# Here the boolean keyword `single_beta' means: for any given grain size, consider only one value of the shape parameter beta.
```

Instead of using the SpyDust rotation distribution method described in the paper, you can generate spectra using your own arbitrary distributions of configuration parameters as inputs to the `SpyDust.SED' function.

--- 

# Resources

- **Author**: Zheng Zhang
- **License**: MIT License
- **Paper**: https://arxiv.org/abs/2412.03431 (Z Zhang and J Chluba 2024)

---

## History

- **Version 1.0.0**: Initial release of SpyDust, introducing comprehensive grain shape modeling, updated physical processes, and degeneracy analysis tools.

## TODO (Future Versions)
- Future upgrades will include features such as the SED fitting tool (based on perturbation statistics tools like moment expansion) and improve the treatment of the grain rotation distribution.

---

## Resources

- **Author**: Zheng Zhang
- **License**: MIT License
- **Collaboration**: [SpyDust GitHub Collaboration](https://github.com/SpyDust/SpyDust)
- **Spdust Documentation**: We refer users to the website of [spdust](https://cosmo.nyu.edu/yacine/spdust/spdust.html) for better documentation of environmental parameters 

---

## License

This project is licensed under the MIT License - see the LICENSE file for details.

---

For a detailed understanding of the underlying models and theoretical background, refer to the publication: [SpyDust: an improved and extended implementation for modeling spinning dust radiation](https://arxiv.org/abs/2412.03431).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zzhang0123/SpyDust",
    "name": "SpyDust",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.7",
    "maintainer_email": null,
    "keywords": "astrophysics, astronomy",
    "author": "Zheng Zhang",
    "author_email": "zheng.zhang@manchester.ac.uk",
    "download_url": "https://files.pythonhosted.org/packages/7d/b3/5fa92171016b399d4735905e90c305aab530cb37ee1b7f3d54ae27e856a2/spydust-1.0.1.tar.gz",
    "platform": null,
    "description": "# SpyDust\n\n[**SpyDust**](https://arxiv.org/abs/2412.03431) is an advanced Python package for modeling spinning dust radiation in astrophysical environments. Building upon previous models (the IDL [**SPDUST**](https://arxiv.org/pdf/1003.4732)), SpyDust offers enhanced capabilities and corrections, making it a valuable tool for researchers in astrophysics and related fields.\n\n---\n\n## Features\n\n- **Comprehensive Grain Shape Modeling**: Considers a wide range of grain geometries, providing corresponding grain dynamics, directional radiation fields, and angular momentum transports.\n\n- **Updated Physical Processes**: Incorporates corrections and extensions, including updated expressions for the effects of electrical dipole radiation back-reaction and plasma drag on angular momentum dissipation.\n\n- **Parallisation**: Functions can be run in parallel (implemented by mpi4py) by simply setting the corresponding keyword to True.\n\n- **SPDUST as is** mode: Provides a submodule, **SPDUST_as_is**, which is exactly the full equivalent of the IDL spdust. Just in case the user wants to stick with the spdust simulation.\n\n- **Example notebooks**: Provide some Jupyter notebooks to help users get started with this software package [paper](https://arxiv.org/abs/2412.03431).\n\n---\n\n## Requirements\n\nSpyDust requires Python 3.7 or higher (up to Python 3.9) and the following dependencies:\n\n**Required**:\n- `numpy`\n- `scipy`\n- `logging`\n- `mpi4py`\n\n**Optional**:\n- `pandas`: This is not needed for spinning dust spectra, but if free free emission is also desired (using free_free.py), then it is needed.\n\n---\n\n## Installation\n\nYou can install SpyDust using pip:\n\n```bash\npip install SpyDust\n```\n\nOtherwise, you can directly `git clone' this repo and set up the environment by yourself.\n\n---\n\n# Usage\n\nImport the package in your project and explore its functionalities for modeling spinning dust radiation. Data files required for computations are bundled with the package.\n\n---\n\n## Example usage:\n\nHere is an example of using the `SpyDust.SpyDust' function to generate a spectrum for a sample CNM environment:\n```python\nCNM_params = {'nh' : 30, 'T': 100., 'Chi': 1, 'xh': 1.2e-3, 'xC': 3e-4, 'y' : 0, 'gamma': 0, 'dipole': 9.3, 'line':7}\n\nThe parameters are as follows: \n# 'nH': total hydrogen number density (cm3), \n# 'T': gas temperature (K), \n# 'chi': intensity of the radiation field relative to the average interstellar radiation field, \n# 'xh': hydrogen ionization fraction, \n# 'xC': ionized carbon fractional abundance, \n# 'y': molecular hydrogen fractional abundance, \n# 'gamma': H2 formation efficiency, \n# 'dipole': rms dipole moment for dust grains.\n\nmin_freq=1 # in GHz\nmax_freq=300 # in GHz\nn_freq=500\n\nspectrum = SpyDust.SpyDust(CNM_params, min_freq=min_freq, max_freq=max_freq, n_freq=n_freq, single_beta=True)\n# Here the boolean keyword `single_beta' means: for any given grain size, consider only one value of the shape parameter beta.\n```\n\nInstead of using the SpyDust rotation distribution method described in the paper, you can generate spectra using your own arbitrary distributions of configuration parameters as inputs to the `SpyDust.SED' function.\n\n--- \n\n# Resources\n\n- **Author**: Zheng Zhang\n- **License**: MIT License\n- **Paper**: https://arxiv.org/abs/2412.03431 (Z Zhang and J Chluba 2024)\n\n---\n\n## History\n\n- **Version 1.0.0**: Initial release of SpyDust, introducing comprehensive grain shape modeling, updated physical processes, and degeneracy analysis tools.\n\n## TODO (Future Versions)\n- Future upgrades will include features such as the SED fitting tool (based on perturbation statistics tools like moment expansion) and improve the treatment of the grain rotation distribution.\n\n---\n\n## Resources\n\n- **Author**: Zheng Zhang\n- **License**: MIT License\n- **Collaboration**: [SpyDust GitHub Collaboration](https://github.com/SpyDust/SpyDust)\n- **Spdust Documentation**: We refer users to the website of [spdust](https://cosmo.nyu.edu/yacine/spdust/spdust.html) for better documentation of environmental parameters \n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n---\n\nFor a detailed understanding of the underlying models and theoretical background, refer to the publication: [SpyDust: an improved and extended implementation for modeling spinning dust radiation](https://arxiv.org/abs/2412.03431).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A code for modeling spinning dust radiation",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/zzhang0123/SpyDust"
    },
    "split_keywords": [
        "astrophysics",
        " astronomy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a92bbc9b9189a9fa6004ce64b950bbb73cae054e359c49b331e63d56fefa957",
                "md5": "8ef4a6072564e6d1270e857640edef4a",
                "sha256": "05adbf7c8128de7bc9e2595e2430ce1401e8e452dd179278883e5e49e7c76d4e"
            },
            "downloads": -1,
            "filename": "SpyDust-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8ef4a6072564e6d1270e857640edef4a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.7",
            "size": 1790626,
            "upload_time": "2025-01-01T23:43:18",
            "upload_time_iso_8601": "2025-01-01T23:43:18.976651Z",
            "url": "https://files.pythonhosted.org/packages/7a/92/bbc9b9189a9fa6004ce64b950bbb73cae054e359c49b331e63d56fefa957/SpyDust-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7db35fa92171016b399d4735905e90c305aab530cb37ee1b7f3d54ae27e856a2",
                "md5": "c465ae6cc5a7620bb100913c8e05adbb",
                "sha256": "7315852e3974249dd45d6088ab9f1a8f9e94a9d1b1e7b7d97a043bf53aa5a3d5"
            },
            "downloads": -1,
            "filename": "spydust-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c465ae6cc5a7620bb100913c8e05adbb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.7",
            "size": 1770893,
            "upload_time": "2025-01-01T23:43:22",
            "upload_time_iso_8601": "2025-01-01T23:43:22.343598Z",
            "url": "https://files.pythonhosted.org/packages/7d/b3/5fa92171016b399d4735905e90c305aab530cb37ee1b7f3d54ae27e856a2/spydust-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-01 23:43:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zzhang0123",
    "github_project": "SpyDust",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "spydust"
}
        
Elapsed time: 1.63688s