aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/pointsources/psparams.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-19 11:44:36 +0800
committerAaron LI <aly@aaronly.me>2019-01-19 11:44:36 +0800
commit6d5ad484a25e3371a68ac45dd179c56a03fb1caa (patch)
tree879c10522dba1c2131be77a6c997edf38e971192 /fg21sim/extragalactic/pointsources/psparams.py
parentfc3ebe7d8fea03bbd35961e11427af6291ee46f8 (diff)
downloadfg21sim-6d5ad484a25e3371a68ac45dd179c56a03fb1caa.tar.bz2
Purge obsolete pointsources
Diffstat (limited to 'fg21sim/extragalactic/pointsources/psparams.py')
-rw-r--r--fg21sim/extragalactic/pointsources/psparams.py79
1 files changed, 0 insertions, 79 deletions
diff --git a/fg21sim/extragalactic/pointsources/psparams.py b/fg21sim/extragalactic/pointsources/psparams.py
deleted file mode 100644
index 823af72..0000000
--- a/fg21sim/extragalactic/pointsources/psparams.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright (c) 2016 Zhixian MA <zxma_sjtu@qq.com>
-# MIT license
-
-"""
-Basic parameters to be used in point sources simulation.
-
-References
-----------
-[1] Angular diameter distance,
- https://en.wikipedia.org/wiki/Angular_diameter_distance
-[2] FlatLambdaCDM,
- {http://docs.astropy.org/en/stable/api/astropy.cosmology.
- FlatLambdaCDM.html#astropy.cosmology.FlatLambdaCDM}
-"""
-
-from astropy.cosmology import FlatLambdaCDM
-
-
-class PixelParams():
- """
- A class to transform cosmology distance to angles or pixels.
-
- Parameters
- ------------
- H0: float
- The hubble constant at z = 0, whose unit is km/s/Mpc
- Om0: float
- The total matter density.
- ang_res: float
- Angular resolution, i.e. degree per pixel. (May be useless)
- ang_total: list
- Total angles of the simulated sky region, whose unit is degree
- z : float
- Redshift
- scale: float
- The real object scale.
-
- Example
- ------------
- >>> PixelParams = PixelParams(img_size=(1024,1024),ang_total=(5,5))
- """
-
- # Hubble constant at z = 0
- H0 = 71.0
- # Omega0, total matter density
- Om0 = 0.27
- # Redshift
- z = 0.0
- # Cosmology calculator
- cosmo = 0.0
- # angular diameter distance, [Mpc]
- dA = 0.0
- # angular resolution
- ang_res = 0.0
-
- def __init__(self, z=0.0):
- self.z = z
- self.cosmo = FlatLambdaCDM(H0=self.H0, Om0=self.Om0)
-
- # angular diameter distance, [Mpc]
- self.dA = self.cosmo.angular_diameter_distance(self.z).value
-
- def get_angle(self, scale=1.0):
- """
- Input real object scale, and output the respect observed
- angle, and pixels.
- """
- ang = scale / self.dA # [rac]
-
- return ang
-
- def get_scale(self, ang=1.0):
- """
- Input real observed scale, and output the respect
- real object scale, and pixels.
- """
- scale = ang * self.dA # [Mpc]
-
- return scale