[Top][All Lists]

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

[gnuastro-commits] master cdcd77e: Arithmetic: no checking of size at re

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master cdcd77e: Arithmetic: no checking of size at read-time
Date: Sun, 26 May 2019 15:09:04 -0400 (EDT)

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

    Arithmetic: no checking of size at read-time
    Until now, when Arithmetic read a new dataset, it would check its size with
    the reference dataset's size. However, because of operators like
    `collapse-*', the size of the dataset may change. Therefore, if we read a
    dataset that we want to change it size later, Arithmetic will complain and
    All operators that work on more than one dataset check the sizes of the
    inputs. Therefore, with this commit, we leave it to the operators to check
    their inputs size and we won't check the size at read-time of the dataset.
 bin/arithmetic/operands.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/bin/arithmetic/operands.c b/bin/arithmetic/operands.c
index a5071f7..577fd93 100644
--- a/bin/arithmetic/operands.c
+++ b/bin/arithmetic/operands.c
@@ -362,15 +362,7 @@ operands_pop(struct arithmeticparams *p, char *operator)
          means that this is not the first image read. So, write its basic
          information into the reference data structure for future
          checks. */
-      if(p->refdata.ndim)
-        {
-          if( gal_dimension_is_different(&p->refdata, data) )
-            error(EXIT_FAILURE, 0, "%s (hdu=%s): has a different size "
-                  "compared to previous images. All the images must be "
-                  "the same size in order for Arithmetic to work",
-                  filename, hdu);
-        }
-      else
+      if(p->refdata.ndim==0)
           /* Set the dimensionality. */

reply via email to

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