-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
NFWPhysical: | ||
centre_0: | ||
type: Gaussian | ||
mean: 0.0 | ||
sigma: 0.1 | ||
lower_limit: -inf | ||
upper_limit: inf | ||
centre_1: | ||
type: Gaussian | ||
mean: 0.0 | ||
sigma: 0.1 | ||
lower_limit: -inf | ||
upper_limit: inf | ||
ell_comps_0: | ||
type: Gaussian | ||
mean: 0.0 | ||
sigma: 0.3 | ||
lower_limit: -1.0 | ||
upper_limit: 1.0 | ||
ell_comps_1: | ||
type: Gaussian | ||
mean: 0.0 | ||
sigma: 0.3 | ||
lower_limit: -1.0 | ||
upper_limit: 1.0 | ||
log10M: | ||
type: Uniform | ||
lower_limit: 6 | ||
upper_limit: 16 | ||
concentration: | ||
type: Uniform | ||
lower_limit: 1 | ||
upper_limit: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from .nfw import NFW | ||
from .mcr_util import physical_nfw_to_autogalaxy | ||
from autogalaxy.cosmology.lensing import LensingCosmology | ||
from autogalaxy.cosmology.wrap import Planck15 | ||
from typing import Tuple | ||
|
||
|
||
class NFWPhysical(NFW): | ||
''' | ||
An NFW halo, sampled by it's physical parameters (mass, concentration). | ||
This class can interpret any mass definition known by `colossus`, specifed by the | ||
`mdef` argument. By default, this is `200c`, but one could use `200m`, `500c`, `vir`, | ||
etc. | ||
The `centre` and `ell_comps` are interpreted exactly the same as in the `NFW` halo defined | ||
in lensing units. i.e., `centre` is in arcsec. | ||
''' | ||
def __init__( | ||
self, | ||
centre: Tuple[float, float] = (0.0, 0.0), | ||
ell_comps: Tuple[float, float] = (0.0, 0.0), | ||
log10M: float = 12, | ||
concentration: float = 10, | ||
mdef: str = '200c', | ||
redshift_object: float = 0.5, | ||
redshift_source: float = 1.0, | ||
cosmo: LensingCosmology = Planck15(), | ||
): | ||
self.params = { | ||
'log10M': log10M, | ||
'concentration': concentration, | ||
'mdef': mdef, | ||
'redshift_object': redshift_object, | ||
'redshift_source': redshift_source | ||
} | ||
kappa_s, scale_radius, radius_at_100 = physical_nfw_to_autogalaxy( | ||
10**log10M, concentration, | ||
mdef=mdef, redshift_object=redshift_object, redshift_source=redshift_source, | ||
cosmology=cosmo | ||
) | ||
super().__init__( | ||
centre, ell_comps, | ||
kappa_s, scale_radius, | ||
) |