taskGNU Astronomy Utilities - Tasks: task #15245, weight-mean operator in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #15245: weight-mean operator in astarithmetic

Submitter:  Raul Infante-Sainz <infantesainz>
Submitted:  Thu 25 Apr 2019 06:42:20 AM UTC
 
Should Start On:  Thu 25 Apr 2019 12:00:00 AM UTC Should be Finished on:  Thu 25 Apr 2019 12:00:00 AM UTC
Category:  Arithmetic Priority:  * 5 - Normal
Item Group:  New feature Status:  None
Privacy:  Public Percent Complete:  0%
Assigned to:  None Open/Closed:  Open
Effort:  0.00
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Thu 25 Apr 2019 11:26:24 AM UTC, comment #1: 

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 ;-).

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Thu 25 Apr 2019 06:42:20 AM UTC, original submission:  

One of the main operations in data reduction is the stacking of images. There are situations where some images has to be more weighted than others. For example, in a set of images, if some of them has high noise, it would be better to weight less that images. Another situation is when images have different time exposures, those with high time exposure should be weighted higher, while those with low time exposure should be less weighted.

One possible way could be to define `weight-mean' operator that takes as input pairs of images and weights. Something like this:

<textarea>
astarithmetic im1.fits 0.5 im2.fits 0.8 im3.fits 0.1 3 weight-mean --output=stacked.fits
</textarea>

Raul Infante-Sainz <infantesainz>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Posted a comment)
  • -email is unavailable- added by infantesainz (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.9