[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 0b2227a: Arithmetic reports each new input FIT
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 0b2227a: Arithmetic reports each new input FITS image |
Date: |
Tue, 20 Sep 2016 17:42:25 +0000 (UTC) |
branch: master
commit 0b2227a3ad69067e9f20486e20bff85aefee522c
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Arithmetic reports each new input FITS image
In large operations (where a large number of input images are needed), it
will be helpful if Arithmetic reports each image that it reads in. So by
default it does this now. This behavior can be suppressed with the
`--quiet' (`-q') option.
In the Arithmetic documentation, a blank lines was put before and after
theq first example for the `where' operator to make it more readable in
info format (like the second example).
---
doc/gnuastro.texi | 4 +++-
src/arithmetic/arithmetic.c | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 91f22bc..6d98d2f 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -7064,9 +7064,11 @@ Change the input (pixel) value `where' a certain
condition holds. The
conditional operators above can be used to define the condition. Three
operands are required for @command{where}. The input format is demonstrated
in this simplified example:
+
@example
-astarithmetic in.fits condition.fits new.fits where
+$ astarithmetic in.fits condition.fits new.fits where
@end example
+
The third and second popped operands (@file{in.fits} and
@file{condition.fits} above, see @ref{Reverse polish notation}) have to be
images or all three operands have to be numbers. In the former case (when
diff --git a/src/arithmetic/arithmetic.c b/src/arithmetic/arithmetic.c
index c51dc60..8632eb7 100644
--- a/src/arithmetic/arithmetic.c
+++ b/src/arithmetic/arithmetic.c
@@ -157,6 +157,9 @@ pop_operand(struct imgarithparams *p, double *number,
double **array,
/* Add to the number of popped FITS images: */
++p->popcounter;
+
+ /* Report the read image if desired: */
+ if(p->cp.verb) printf("%s is read.\n", filename);
}
else
*array=operands->array;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 0b2227a: Arithmetic reports each new input FITS image,
Mohammad Akhlaghi <=