gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 075ade9: CosmicCalculator: warning printed for


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 075ade9: CosmicCalculator: warning printed for very low redshifts
Date: Tue, 13 Jul 2021 09:34:16 -0400 (EDT)

branch: master
commit 075ade946d44076542b6f8f168c9124dfe1abb28
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    CosmicCalculator: warning printed for very low redshifts
    
    Until now, the cosmology calculations would be simply printed on the output
    for a certain redshift. However, when the distance is less than about 30
    Mpc, the pecular velocity of the object may be significant compared to the
    hubble flow, making the reported measurements invalid.
    
    With this commit, in such cases a warning will be printed, letting the user
    know about the problem and that they should be careful when interpretting
    the results.
    
    In parallel, I also noticed that we were giving old (arXiv-based) ADS URL
    for the Plank 2018 Cosmology Parameters papers. That has also been
    corrected with the ADS link that includes the finally published status of
    the paper.
    
    This was suggested by Ignacio Trujillo.
---
 NEWS                            |  7 +++++++
 bin/cosmiccal/astcosmiccal.conf |  2 +-
 bin/cosmiccal/cosmiccal.c       | 14 ++++++++++++++
 bin/cosmiccal/main.h            |  4 ++++
 doc/announce-acknowledge.txt    |  1 +
 5 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index c0998da..26403c4 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,13 @@ See the end of the file for license conditions.
    - New operands (also available in Table's column arithmetic):
      - box-around-ellipse: width and height of the box covering an ellipse.
 
+  CosmicCalculator:
+   - A warning is printed if the requested redshift is lower than 0.007
+     (corresponding to ~30Mpc in Plank 2018 cosmology). Because at these
+     scales the peculiar velocity of galaxies may be significant compared
+     to the Hubble flow (which is the basis of the calculations here). The
+     warning can be suppressed with the '--quiet' option.
+
   Match:
    - When called with '--notmatched --outcols=AAA,BBB', Match will append
      non-matching rows of second table into first table's rows (for columns
diff --git a/bin/cosmiccal/astcosmiccal.conf b/bin/cosmiccal/astcosmiccal.conf
index 6b040c8..fe4a42e 100644
--- a/bin/cosmiccal/astcosmiccal.conf
+++ b/bin/cosmiccal/astcosmiccal.conf
@@ -29,7 +29,7 @@
 #
 # https://arxiv.org/abs/1807.06209
 # or
-# http://adsabs.harvard.edu/cgi-bin/bib_query?arXiv:1807.06209
+# https://ui.adsabs.harvard.edu/abs/2020A%26A...641A...6P
 #
 # IMPORTANT NOTES: If you change these system-wide default values, please
 # change this comment and cite the source.
diff --git a/bin/cosmiccal/cosmiccal.c b/bin/cosmiccal/cosmiccal.c
index 15efffe..08662c6 100644
--- a/bin/cosmiccal/cosmiccal.c
+++ b/bin/cosmiccal/cosmiccal.c
@@ -283,4 +283,18 @@ cosmiccal(struct cosmiccalparams *p)
     }
   else
     cosmiccal_printall(p);
+
+  /* Print a warning if the redshift is too close for the hubble flow to be
+     significant. This is done at the end because it is important and may
+     be missed at the start of the program (before the outputs are
+     printed). */
+  if(p->redshift<MAIN_REDSHIFT_SIG_HUBBLE_FLOW && p->cp.quiet==0)
+    error(EXIT_SUCCESS, 0, "WARNING: at very low redshifts "
+          "(approximately below %g), the peculiar velocity of the "
+          "particular galaxy may be more significant than hubble's "
+          "law (which is the basis of the measurements here). This "
+          "gets worse as the redshift decreases. Therefore the "
+          "results above may not be accurate on a per-object basis. "
+          "You can supress this warning with the '--quiet' option",
+          MAIN_REDSHIFT_SIG_HUBBLE_FLOW);
 }
diff --git a/bin/cosmiccal/main.h b/bin/cosmiccal/main.h
index a1f6344..3bcf22b 100644
--- a/bin/cosmiccal/main.h
+++ b/bin/cosmiccal/main.h
@@ -33,8 +33,12 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #define PROGRAM_EXEC   "astcosmiccal"     /* Program executable name. */
 #define PROGRAM_STRING PROGRAM_NAME" (" PACKAGE_NAME ") " PACKAGE_VERSION
 
+/* To avoid crashing the integration program. */
 #define MAIN_REDSHIFT_ZERO 1e-20
 
+/* The z~0.007 corresponds to about 30Mpc in Plank 2018 cosmology. */
+#define MAIN_REDSHIFT_SIG_HUBBLE_FLOW 0.007
+
 
 
 
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 90c6cdf..89a4c5d 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -4,6 +4,7 @@ Mark Calabretta
 Leslie Hunt
 Juan Molina Tobar
 Zahra Sharbaf
+Ignacio Trujillo
 Aaron Watkins
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]