Skip to content

Commit

Permalink
Changed input (put back log) and add tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielaBreitman committed Sep 19, 2023
1 parent 761a1bd commit e1bd699
Show file tree
Hide file tree
Showing 7 changed files with 380 additions and 45 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To learn more, see the `Contributor Guide <https://github.com/21cmFAST/21cmEMU/b
Citation
========

If you use ``21cmEMU`` in your research please cite: (in prep.)
If you use ``21cmEMU`` in your research please cite `this paper <https://arxiv.org/abs/2309.05697>`_.

License
=======
Expand Down
130 changes: 94 additions & 36 deletions docs/tutorials/Tutorial_2.ipynb

Large diffs are not rendered by default.

279 changes: 279 additions & 0 deletions docs/tutorials/Tutorial_3.ipynb

Large diffs are not rendered by default.

Binary file added docs/tutorials/lightcone_example.npz
Binary file not shown.
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/py21cmemu/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ def normalize(self, theta: np.ndarray) -> np.ndarray:
"""
theta_woutdims = theta.copy()
theta_woutdims[:, 7] /= 1000
theta_woutdims[:, [0, 2, 4, 6]] = np.log10(theta_woutdims[:, [0, 2, 4, 6]])
theta_woutdims -= properties.limits[:, 0]
theta_woutdims /= properties.limits[:, 1] - properties.limits[:, 0]
return theta_woutdims
Expand Down
3 changes: 1 addition & 2 deletions src/py21cmemu/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def get_renormalized(self) -> EmulatorOutput:
-------
EmulatorOutput
The emulator output with normalized quantities re-normalized back to
physical units.
physical units. Nothing is in log except UV LFs.
"""
# Restore dimensions
# Renormalize stuff that needs renormalization
Expand Down Expand Up @@ -230,6 +230,5 @@ def get_renormalized(self) -> EmulatorOutput:
out["PS"] = 10 ** out["PS"]
out["Ts"] = 10 ** out["Ts"]
out["tau"] = 10 ** out["tau"]
out["UVLFs"] = 10 ** out["UVLFs"]

return EmulatorOutput(**out).squeeze()

0 comments on commit e1bd699

Please sign in to comment.