Welcome to iraf.net Tuesday, May 21 2024 @ 10:07 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 total counts in image section
   
smp
 06/09/2010 11:42AM (Read 3171 times)  
++++-
Regular Member

Status: offline


Registered: 07/27/2008
Posts: 70
hi,I have an image section [x1Angry2, y1:y2].
I want to calculate total counts in these (x2-x1) x (y2-y1) pixels.
Any help is appreciated.Regards,
smp

 
Profile Email
 Quote
fitz
 06/09/2010 11:42AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Try something like[code:1:62c5608009]
cl> listpix dev$pix[1:10,1:10] verb- | fields STDIN 3 | average STDIN
[/code:1:62c5608009]The sum of the pixels in the section will be in the 'sum' parameter of the AVERAGE task or you can multiple the average times the number of samples that appear on the output.

 
Profile Email
 Quote
smp
 06/09/2010 11:42AM  
++++-
Regular Member

Status: offline


Registered: 07/27/2008
Posts: 70
Thanks.
'sum' parameter of 'average' task shows sum of pixel values.[code:1:a71bcd4384]cl> listpix dev$pix[1:10,1:10] verb- | fields STDIN 3 | average STDIN [/code:1:a71bcd4384]But I did not get following meanings:what is 'dev$pix' ?
verb- says do not list the pixel values ?
what is ' | fields STDIN 3' ? especially number 3?regards,
smp

 
Profile Email
 Quote
fitz
 06/09/2010 11:42AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:341fcd4baf]what is 'dev$pix' ?[/quote:341fcd4baf]The standard test image distributed with the system.[quote:341fcd4baf]verb- says do not list the pixel values ?[/quote:341fcd4baf]See the help page, it just supresses the title line not the pixels.[quote:341fcd4baf]what is ' | fields STDIN 3' ? especially number 3?[/quote:341fcd4baf]The example pipes the output of LISTPIX to the FIELDS task where column 3 is selected, that then gets piped to the AVERAGE task to do the sum.

 
Profile Email
 Quote
jcadien1
 06/09/2010 11:42AM  
++---
Junior

Status: offline


Registered: 11/28/2006
Posts: 21
SMP,
If you do an imstat file.fits[x1Angry2,y1:y2]. it will print the number of pixels and the average. Multiply the two and you will have the sum of counts in all those pixels.
N.B. the number of pixels in x1Angry2 is NOT x2-x1. Eg. 1:10 is 10 pixels,
10-1=9.Jim

 
Profile Email
 Quote
smp
 06/09/2010 11:42AM  
++++-
Regular Member

Status: offline


Registered: 07/27/2008
Posts: 70
Thanks, fitz and jcadien1.Regards,
smp

 
Profile Email
 Quote
   
Content generated in: 0.21 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login