Welcome to iraf.net Friday, April 19 2024 @ 02:31 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 listing pixels in a circular aperture
   
nk
 01/16/2015 12:57PM (Read 1084 times)  
+----
Newbie

Status: offline


Registered: 01/05/2015
Posts: 1
Hello

Is there any way in iraf to list pixels in a circular aperture (defined by its radius) ?

(as far as I know, "listpix" in iraf allows to list pixels either for the whole image or for a rectangular area)

Thank you

 
Profile Email
 Quote
fitz
 01/16/2015 04:38PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
As far as I know it can't be done directly, but could be scripted easily. The steps would be as follows:

- Create a mask of the circular aperture desired
- Apply the mask to the image, setting pixels outside the mask to some known constant
- Run LISTPIX on the entire image but filter out the known constant

For example

PHP Formatted Code

cl> type expr.dat
circle(256.,256.,10.) ? 1 : 0
cl> mskregions expr.dat mask.pl dev$pix
cl> imexpr "(a ? b : 99999)" new.fits a=mask.pl b=dev$pix
cl> listpix new.fits | match 99999 STDIN stop+
 


This should list only the pixels in a 10 pixel radius around (256,256) of the dev$pix image.

 
Profile Email
 Quote
   
Content generated in: 0.13 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