An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

[![image](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![image](http://img.shields.io/badge/arXiv-2307.04798-orange.svg?style=flat)](https://arxiv.org/abs/2307.04798)
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](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
Matt Price

💻 👀 🤔
Matthijs Mars
Matthijs Mars

💻 👀 🤔
Auggie Marignier
Auggie Marignier

💻
Alessio Spurio Mancini
Alessio Spurio Mancini

💻
Jason McEwen
Jason McEwen

💻 👀 🤔
Matthew Docherty
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.