[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 075ade9: CosmicCalculator: warning printed for
[gnuastro-commits] master 075ade9: CosmicCalculator: warning printed for very low redshifts
Tue, 13 Jul 2021 09:34:16 -0400 (EDT)
Author: Mohammad Akhlaghi <email@example.com>
Commit: Mohammad Akhlaghi <firstname.lastname@example.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
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
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
@@ -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.
+ - 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.
- 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
@@ -29,7 +29,7 @@
# 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
@@ -283,4 +283,18 @@ cosmiccal(struct cosmiccalparams *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",
diff --git a/bin/cosmiccal/main.h b/bin/cosmiccal/main.h
index a1f6344..3bcf22b 100644
@@ -33,8 +33,12 @@ along with Gnuastro. If not, see
#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
@@ -4,6 +4,7 @@ Mark Calabretta
Juan Molina Tobar
|[Prev in Thread]
||[Next in Thread]|
- [gnuastro-commits] master 075ade9: CosmicCalculator: warning printed for very low redshifts,
Mohammad Akhlaghi <=