gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master df52a93: Library (wcs.h): WCS linear matrix co


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master df52a93: Library (wcs.h): WCS linear matrix converted at start
Date: Tue, 6 Apr 2021 20:24:33 -0400 (EDT)

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

    Library (wcs.h): WCS linear matrix converted at start
    
    Until now, the recent change where we allow the user was given the ability
    to select the linear matrix (Commit 20f1d41d) had an un-expected
    side-effect: when the input had a CD matrix, the output would also have a
    CD matrix even when '--wcscoordsys' was set to 'pc'.
    
    With this commit, the relevent 'else' has been added to correct this missed
    point.
    
    This issue was found with the help of Zahra Sharbaf.
---
 lib/wcs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/wcs.c b/lib/wcs.c
index 77d711b..0b2b33a 100644
--- a/lib/wcs.c
+++ b/lib/wcs.c
@@ -353,8 +353,10 @@ gal_wcs_read_fitsptr(fitsfile *fptr, int linearmatrix, 
size_t hstartwcs,
         }
     }
 
-  /* If the user wants a CD linear matrix, do the conversion here. */
+  /* If the user wants a CD linear matrix, do the conversion here,
+     otherwise, make sure the PC matrix is used. */
   if(linearmatrix==GAL_WCS_LINEAR_MATRIX_CD) gal_wcs_to_cd(wcs);
+  else                          gal_wcs_decompose_pc_cdelt(wcs);
 
   /* Clean up and return. */
   status=0;



reply via email to

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