gnuastro-devel
[Top][All Lists]
Advanced

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

[gnuastro-devel] [task #15245] weight-mean operator in astarithmetic


From: Mohammad Akhlaghi
Subject: [gnuastro-devel] [task #15245] weight-mean operator in astarithmetic
Date: Thu, 25 Apr 2019 07:26:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Follow-up Comment #1, task #15245 (project gnuastro):

This is a great suggestion! Thanks.

In fact, based on how Gnuastro's Arithmetic is designed, the weights can be
numbers (like your example) or an actual image (giving a weight for each
pixel).

This is very easy to implement in Arithmetic. I just don't have the time right
now. I hope a volunteer can be found to implement it before I do ;-).

One crude approximation until then would be to simply call an image with more
weight, more than once and increase the total number of inputs. For example in
the command bellow, I am giving the first image a weight of 4, the second
image a weight of 1 and the third image a weight of 2. I am using the `set-'
operator to avoid reading each file into memory more than once.


astarithmetic im1.fits set-a im2.fits set-b im3.fits set-c a a a a b c c 7
mean --output=stacked.fits


But while this avoids reading the images into memory more than once, it
consumes much more memory than the raw inputs and corresponding weights. So
its just a very crude/rough fast implementation, for cases where the weights
don't need much accuracy, until this feature is added. 

Thanks again ;-).

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/task/?15245>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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