https://github.com/astro-informatics/stringgen
Scattering based cosmic string emulation
https://github.com/astro-informatics/stringgen
cosmic-strings cosmology emulation scattering-transform statistics wavelet-transform
Last synced: about 2 months ago
JSON representation
Scattering based cosmic string emulation
- Host: GitHub
- URL: https://github.com/astro-informatics/stringgen
- Owner: astro-informatics
- License: mit
- Created: 2022-08-18T12:45:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-10T13:27:51.000Z (over 1 year ago)
- Last Synced: 2025-01-27T22:42:49.766Z (4 months ago)
- Topics: cosmic-strings, cosmology, emulation, scattering-transform, statistics, wavelet-transform
- Language: Python
- Homepage:
- Size: 41.7 MB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://opensource.org/licenses/MIT)
[](https://arxiv.org/abs/2307.04798)
[](#contributors-)
[](https://github.com/psf/black)# Scattering based cosmic string emulation
`stringgen` is a tool for creating emulations of cosmic string maps with statistics similar to those of a single (or small ensemble) of reference simulations. It uses wavelet phase harmonics to calculate a compressed representation of these reference simulations, which may then be used to synthesize new realisations with accurate statistical properties, e.g. 2 and 3 point correlations, skewness, kurtosis, and Minkowski functionals.
## Install from source :computer:
One may install the code from source by cloning and installing manually:```
git clone https://github.com/astro-informatics/stringgen.git
cd stringgen
bash build_stringgen.sh
```## Usage :rocket:
To generate your own cosmic string maps `stringgen` is as simple follows:
``` python
from stringgen import CosmicStringEmulator# Configure the emulator
emulator = CosmicStringEmulator(
emulation_shape=(1024, 1024), # Shape of image
J=9, # Number of wavelet scales
L=9 # Number of directions
)# Load latent data-bank
features = emulator.get_features()# Generate n_emulation=1 synthetic cosmic string maps
emulation = emulator.emulate(features, n_emulations=1)
```## Contributors ✨
Thanks goes to these wonderful people ([emoji
key](https://allcontributors.org/docs/en/emoji-key)):
Matt Price
💻 👀 🤔
Matthijs Mars
💻 👀 🤔
Auggie Marignier
💻
Alessio Spurio Mancini
💻
Jason McEwen
💻 👀 🤔
Matthew Docherty
💻
## Attribution :books:
Should this code be used in any way, we kindly request that the following article is
referenced. A BibTeX entry for this reference may look like:```
@article{price:stringgen,
author = "Matthew A. Price, Matthijs Mars, Matthew M. Docherty, Alessio Spurio Mancini, Augustin Marignier, Jason. D. McEwen",
title = "Fast emulation of anisotropies induced in the cosmic microwave background by cosmic strings",
year = "2023",
journal = "The Open Journal of Astrophysics,
doi = "10.21105/astro.2307.04798",
eprint = "arXiv:2307.04798"
}
```## License :memo:
We provide this code under an MIT open-source licence with the hope that
it will be of use to a wider community.Copyright 2023 Matthijs Mars, Matthew Price, Jason McEwen and contributors.
`stringgen` is free software made available under the MIT License. For
details see the LICENSE file.