aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-06 20:54:35 +0800
committerAaron LI <aly@aaronly.me>2017-08-06 20:54:35 +0800
commit57cfa9643c9f4c1b2b8e72d7ade68da23d9693bb (patch)
tree507f1d293e8e713b25d9a69e60bc2917b36eec14
parent7bcebf9daf5157ed249d162a75ff61d60fa98226 (diff)
downloadfg21sim-57cfa9643c9f4c1b2b8e72d7ade68da23d9693bb.tar.bz2
Fix a bug in clusters/halo.py; Add a comment to utils/io/_create_dir()
Signed-off-by: Aaron LI <aly@aaronly.me>
-rw-r--r--fg21sim/extragalactic/clusters/halo.py2
-rw-r--r--fg21sim/utils/io.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index 586c7e0..b4c6388 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -365,7 +365,7 @@ class RadioHalo:
pixelarea = pixelsize ** 2 # [arcsec^2]
if omega < pixelarea:
omega = pixelarea
- logger.warning("Halo sky coverage (%.2f [arcsec^2])" % omega,
+ logger.warning("Halo sky coverage (%.2f [arcsec^2])" % omega +
" < pixel area (%.2f [arcsec^2])" % pixelarea)
flux = self.calc_flux(emissivity)
diff --git a/fg21sim/utils/io.py b/fg21sim/utils/io.py
index 1d30b23..4f05e96 100644
--- a/fg21sim/utils/io.py
+++ b/fg21sim/utils/io.py
@@ -20,6 +20,10 @@ def _create_dir(filepath):
"""
Check the existence of the target directory, and create it if necessary.
+ NOTE
+ ----
+ If the given ``filepath`` is simply the filename without any directory
+ path, then just returns.
"""
dirname = os.path.dirname(filepath)
# ``dirname == ""`` if ``filepath`` does not contain directory path