Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
joezuntz authored Nov 21, 2024
1 parent 2463243 commit 3e34b90
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions structure/spk/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "v1.8"
purpose: "A hydrodynamical simulation-based model for the impact of baryon physics on the non-linear matter power spectrum"
url: "https://github.com/jemme07/pyspk/"
interface: "spk_interface.py"
attribution: [Salcido, McCarthy, Kwan, Upadhye, Font]
attribution: [Jaime Salcido, Ian McCarthy, Juliana Kwan, Amol Upadhye, Andreea Font]
rules:
Please cite the papers below if you use this code in your research"
cite:
Expand All @@ -18,7 +18,7 @@ explanation:
py-SP(k) (Salcido et al. 2023) is a python package aimed at predicting the suppression of the
total matter power spectrum due to baryonic physics as a function of the baryon fraction of haloes and redshift.

py-SP(k) is not restrictive to a particular shape of the baryon fraction - halo mass relation.
py-SP(k) is not restricted to a particular shape of the baryon fraction - halo mass relation.
In order to provide flexibility to the user, there are 4 different methods to provide py-SP(k)
with the required fb-Mhalo relation.

Expand All @@ -31,15 +31,14 @@ explanation:
https://github.com/jemme07/pyspk/blob/main/examples/pySPk_Examples.ipynb

WARNING - if the combination of parameters and your choice for the functional form of the
baryon fraction - halo mass relation goes outwith the SP(k) fitting limits, pyspk returns Nan values.
baryon fraction - halo mass relation goes outside the SP(k) fitting limits, pyspk returns NaN values.
This can happen easily at high-z and high-k will return an error to cosmosis. This SP(k) parameter combination will
then be given a likelihood of zero, thus creating a theoretical prior that you should be aware of.


# List of parameters that can go in the params.ini file in the section for this module
params:
SO:
meaning: The spherical overdensity where pyspk only accepts 200 or 500. The halo mass then corresponds to the
meaning: The spherical overdensity, which must be 200 or 500. The halo mass then corresponds to the
mass with a radius where the mean density is 200 or 500 times the critical density of the Universe.
type: int
default: 500
Expand All @@ -48,15 +47,14 @@ params:
type: bool
default: False
fb_table:
meaning: Optional for method 4. Name of the file containing the baryon fraction as a function of halo mass and redshift
meaning: Optional for method 4. Name of a file containing the baryon fraction as a function of halo mass and redshift
Format - Redshift, Halo mass [M_odot], Baryon fraction (normalised by the Universal baryon fraction)
The file BAHAMAS_fb_M200.csv provides this data from the BAHAMAS simulations (McCarthy et al. 2017).
If this is not provided one of other three of methods will be used to determine the fb-Mhalo relationship
If this is not provided one of the other three of methods will be used to determine the fb-Mhalo relationship
type: str
default:


#Inputs for a given choice of a parameter, from the values.ini or from other modules
inputs:
fb_a:
meaning: method 1 power law constant. Do not set for method 2 or 3.
Expand Down Expand Up @@ -90,6 +88,16 @@ inputs:
meaning: method 2 or 3 power law exponent to sets the redshift dependence. Do not set for method 1.
type: float
default:
matter_power_nl:
z:
meaning: Redshifts of samples.
type: real 1d
k_h:
meaning: Wavenumbers k of samples in Mpc/h.
type: real 1d
P_k:
meaning: Non-linear power spectrum at samples in (Mpc/h)^-3, before SP(k) baryon correction.
type: real 2d


outputs:
Expand Down

1 comment on commit 3e34b90

@cheymans
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes I forgot that the P_nl is both input and output! Good catch.

Please sign in to comment.