Skip to content

Commit fca5aee

Browse files
updated README for comments; updated environment.yml for numpy version control; updated notebook for compatibility
1 parent e0c06b0 commit fca5aee

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,31 @@ Code for producing fast simulations of the SZ effect for galaxy halos of varying
77
The code is structured as depicted here: ![DeepSZSim workflow](paper/figures/DeepSZSim_Workflow.png)
88
The CMB simulations are handled by [DeepCMBSim](https://www.github.com/deepskies/deepcmbsim), based on [CAMB](https://camb.info), and further by [pixell](https://github.com/simonsobs/pixell). The SZ cluster simluations are done in `make_sz_cluster.py` and instrumental effects are added in `filters.py` and `noise.py`.
99

10+
Documentation is available via [readthedocs](https://deepszsim.readthedocs.io/en/latest/).
11+
1012
## Quickstart
1113

1214
### Installation
1315

14-
We provide an environment specification file for `conda` or `mamba` users at `environment.yml`, which will produce a new virtual environment called `szsims` with appropriate versions of major python packages. With `conda`, this environment is created by `conda env create -f environment.yml`. With `micromamba` the `env` is omitted and a new environment is instead created with `micromamba create -f environment.yml`.
16+
#### From `pypi`
1517

16-
The simulated CMB signal relies on `camb` and `pixell`, cosmology relies on `colossus`, and utilities for saving rely on `h5py`. These are specified in the `pyproject.toml` file.
18+
The simplest way to install `deepszsim` is via PyPI, using
19+
```commandline
20+
pip install deepszsim
21+
```
22+
The project history and source files are available on PyPI [here](https://pypi.org/project/deepszsim/).
1723

18-
From the top-level directory, you can do `pip install .` to install the package.
24+
#### From Source
25+
26+
We provide an environment specification file for `conda` or `mamba` users at `environment.yml`, which will produce a new virtual environment called `szsims` with appropriate versions of major python packages, after which you can install with `pip`. With `conda`, the workflow to create the environment, activate it, and install the package is
27+
```
28+
conda env create -f environment.yml
29+
conda activate szsims
30+
pip install .
31+
```
32+
(With `micromamba` the `env` is omitted and a new environment is instead created with `micromamba create -f environment.yml`)
33+
34+
The simulated CMB signal relies on `camb` and `pixell`, cosmology relies on `colossus`, and utilities for saving rely on `h5py`. These are specified in the `pyproject.toml` file.
1935

2036
### Usage
2137

@@ -25,6 +41,10 @@ A full list of potential inputs is documented in `settings/config.yaml` and you
2541

2642
`dm_halo_dist.py` generates an array of mass and redshift. The functions in `make_sz_cluster.py` create pressure profiles, Compton-y, and SZ signal maps for a halo of a given mass and redshift, and produces the final simulated submaps. These submaps contain simulated CMB and simple instrument beam convolution from `simtools.py` and white noise from `noise.py`. Plotting tools are provided in `visualization.py`. Simulations of a large suite of clusters can be achieved easily with `simclusters.py`.
2743

44+
### Tests
45+
46+
Tests are provided in the `tests` directory. They are automatically run via CircleCI on pushes to the repository. Users can verify tests with `python -m pytest tests/*`.
47+
2848
### Example
2949

3050
Let's say you wanted to produce 100 mock halos distributed across the redshift range 0.2<z<0.4 and with masses in the range 1e14<M200<1e15. To generate these halos and produce their simulated maps with SZ signal (along with CMB signal and noise parameters as specified in `Settings/inputdata.yaml`) you would call
@@ -47,7 +67,7 @@ If you use this code in your research, please cite this GitHub repo and our JOSS
4767

4868
## Contributing
4969

50-
If you would like to contribute, please open a new [issue](https://github.com/deepskies/deepszsim/issues), and/or be in touch with the [authors](#contact)
70+
If you would like to contribute, you find a bug, or you have a feature request, please open a new [issue](https://github.com/deepskies/deepszsim/issues), and/or be in touch with the [authors](#contact).
5171

5272
## Contact
5373

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: szsims
22
dependencies:
33
- python < 3.12
4-
- numpy
4+
- numpy < 2
55
- pandas
66
- astropy
77
- scipy

notebooks/demo_full_pipeline_SDMnotes25Mar23.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@
10121012
"name": "python",
10131013
"nbconvert_exporter": "python",
10141014
"pygments_lexer": "ipython3",
1015-
"version": "3.11.10"
1015+
"version": "3.12.8"
10161016
}
10171017
},
10181018
"nbformat": 4,

0 commit comments

Comments
 (0)