[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 54d46e0 2/2: WCS pixel scale prints warning in
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 54d46e0 2/2: WCS pixel scale prints warning instead of aborting |
Date: |
Tue, 14 Nov 2017 11:47:50 -0500 (EST) |
branch: master
commit 54d46e0c8d50968ba8eefbe9a3639e0e9576d0c2
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
WCS pixel scale prints warning instead of aborting
When the pixel scale finding algorithm of `gal_wcs_pixel_scale' can't find
the proper order of the pixels, until now it would abort with an error. But
now, it prints a warning to `stderr' instead of aborting. Just to let the
user know that there may be problem. In some cases it may not be a problem
for the user.
This issue was brought up by Alejandro Serrano Borlaff.
---
doc/announce-acknowledge.txt | 1 +
lib/wcs.c | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 9a22b81..f7b8299 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -6,5 +6,6 @@ Nicolas Bouché
Aurélien Jarno
Takashi Ichikawa
Alan Lefor
+Alejandro Serrano Borlaff
Ole Streicher
David Valls-Gabaud
diff --git a/lib/wcs.c b/lib/wcs.c
index 38f5734..6af8716 100644
--- a/lib/wcs.c
+++ b/lib/wcs.c
@@ -433,7 +433,6 @@ gal_wcs_angular_distance_deg(double r1, double d1, double
r2, double d2)
/* Return the pixel scale of the dataset in units of the WCS. */
-/* Return the pixel scale of the dataset in units of the WCS. */
double *
gal_wcs_pixel_scale(struct wcsprm *wcs)
{
@@ -541,8 +540,8 @@ gal_wcs_pixel_scale(struct wcsprm *wcs)
{
/* Only works when each row only has one non-zero value. */
if(permute_set)
- error(EXIT_FAILURE, 0, "%s: not able to find the proper "
- "permutation for given rotation matrix", __func__);
+ fprintf(stderr, "%s: (WARNING) not able to find the proper "
+ "permutation for given rotation matrix.\n", __func__);
else
{
permutation[i]=j;