[Top][All Lists]

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

[gnuastro-commits] master 8d5b1dc 2/2: ImageWarp's --align can now work

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 8d5b1dc 2/2: ImageWarp's --align can now work with CDi_ja keywords
Date: Mon, 17 Oct 2016 13:21:12 +0000 (UTC)

branch: master
commit 8d5b1dc845330b28f07450c3c47f8090d6764377
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    ImageWarp's --align can now work with CDi_ja keywords
    ImageWarp's `--align' option would only work with the `PCi_ja' matrix
    structures until now. Now it can also work with the `CDi_ja' format too.
 bin/imgwarp/ui.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/bin/imgwarp/ui.c b/bin/imgwarp/ui.c
index 865fc98..fa4bc25 100644
--- a/bin/imgwarp/ui.c
+++ b/bin/imgwarp/ui.c
@@ -334,16 +334,23 @@ makealignmatrix(struct imgwarpparams *p)
   /* Depending on the type of data, make the input matrix. Note that
      wcs->altlin is actually bit flags, not integers, so we have to compare
      with powers of two. */
-  if(p->wcs->altlin==1)
+  if(p->wcs->altlin |= 1)
+  if(p->wcs->altlin |= 2)
+    {
+      w[0]=p->wcs->cd[0];
+      w[1]=p->wcs->cd[1];
+      w[2]=p->wcs->cd[2];
+      w[3]=p->wcs->cd[3];
+    }
     error(EXIT_FAILURE, 0, "currently the `--align' option only recognizes "
-          "PCi_j keywords, not any others");
+          "PCi_ja and CDi_ja keywords, not any others");
   /* Find the pixel scale along the two dimensions. Note that we will be
      using the scale along the image X axis for both values. */

reply via email to

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