Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Want to build a dedicated BPM maker

 
Post new topic   Reply to topic    iraf.net Forum Index -> Misc
View previous topic :: View next topic  
Author Message
Jason Quinn
IRAF Guru


Joined: 07 Apr 2006
Posts: 151

PostPosted: Sat Aug 15, 2009 12:32 am    Post subject: Want to build a dedicated BPM maker Reply with quote

Hi, guys. I'm considering to develop a dedicated bad pixel mask generator. I'd like it to be as cross platform as possible. The basic functionality and operation of the program will be the following:

1) display a FITS image
2) use the mouse to click and toggle pixels as flagged/not flagged
3) use the mouse to draw regions to toggle pixels
4) a menu bar with obvious operations to flag pixels
5) save the flagged pixels as a FITS image

The problem is that my GUI programming experience is extremely limited and mostly limited to small Java and TCL applications, and none of them have had functionality that displays and interacts with an image.

Is there any advice you can offer as to which language and toolkits could be most appropriate to my endeavor? Or even alert to me a program that does this already if I'm unaware of it.

Jason
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Fri Aug 21, 2009 5:12 pm    Post subject: Reply with quote

Hi Jason,

There may be some functionality in the DS9 'regions' menu that can be of use, but answers depend on what you mean by 'cross platform'.

Basic image display and interaction could be done within a script with standard tasks like DISPLAY and TVMARK, perhaps reading the CL 'imcur' parameter to read image cursors to implement commands to flag pixels or set region types. This would also allow you to use e.g. IMEXPR to create mask values given a threshold value, or some of the many other tasks to deal with masks (see "cl> references mask" for a list). This is of course a script and perhaps a bit clunky, but a PyRAF script might let you add some GUI elements using Tk.

The Client-Display Library (CDL) in X11IRAF is a C library that lets you display and mark images on XImtool/DS9, this could be used from a TCL app or wrapped with JNI if you wanted to use Java, but then you're left to implement a lot of the mask making/writing functionality yourself.

This sounds like an interesting app and Frank may have some other ideas, if you want to keep things in IRAF then you might consider a number of smaller tasks to do specific things e.g. automate the masking of saturated stars but allow interactive toggling of individual pixels. Hope this helps.

Cheers,
-Mike
Back to top
View user's profile Send private message
Jason Quinn
IRAF Guru


Joined: 07 Apr 2006
Posts: 151

PostPosted: Fri Aug 21, 2009 7:00 pm    Post subject: Reply with quote

fitz wrote:
Hi Jason,

There may be some functionality in the DS9 'regions' menu that can be of use, but answers depend on what you mean by 'cross platform'.

Basic image display and interaction could be done within a script with standard tasks like DISPLAY and TVMARK, perhaps reading the CL 'imcur' parameter to read image cursors to implement commands to flag pixels or set region types. This would also allow you to use e.g. IMEXPR to create mask values given a threshold value, or some of the many other tasks to deal with masks (see "cl> references mask" for a list). This is of course a script and perhaps a bit clunky, but a PyRAF script might let you add some GUI elements using Tk.

The Client-Display Library (CDL) in X11IRAF is a C library that lets you display and mark images on XImtool/DS9, this could be used from a TCL app or wrapped with JNI if you wanted to use Java, but then you're left to implement a lot of the mask making/writing functionality yourself.

This sounds like an interesting app and Frank may have some other ideas, if you want to keep things in IRAF then you might consider a number of smaller tasks to do specific things e.g. automate the masking of saturated stars but allow interactive toggling of individual pixels. Hope this helps.

Cheers,
-Mike


Thanks for the feedback.

I've tried various scenarios in IRAF and always found them too time-consuming. (Could just be the methods I know are inefficient. I will take a closer look at CDL though because I don't know what it is fully capable of.) I am considering situations where it is desired to create hand-generated BPMs for hundreds of images on a weekly basis, and to do so with only a couple hours a pop with minimal stress. I think that sort of production rate is possible with a dedicated, well-designed single purpose program.

I'd had this idea in mind for quite some time. The complexity of the program is actually quite low except for the display of the fits image. The GUI design is on my whiteboard but, unfortunately, I never gained proficiency with a GUI toolkit to quickly turn my ideas into a reality. As it stands, I'm learning as I go, which usually results in a project that has to be re-written a few times before it's "made right".

I started with the FLTK toolkit and I've made from minor progress. I still have yet to write a FITS display class, which will be the hard part, and I'm just using the native JPG class to get a skeleton program working. I might hop over to Qt or GTK if FLTK can't do what I need.

A co-worker also pointed out the existence of a very interesting set of python bindings for ds9 and xpa ( http://code.google.com/p/python-sao/ ). This may or may not be of direct use to me for this purpose but was good to know about in any case.

Enjoy your weekend,
Jason
Back to top
View user's profile Send private message
valdes
IRAF Guru


Joined: 11 Nov 2005
Posts: 676

PostPosted: Mon Sep 14, 2009 4:30 pm    Post subject: Reply with quote

Creating BPM masks interactively is like a paint program. A nice specialized task like that would be nice. Maybe some interface between a real paint program and creating the mask would be useful.

My solution was to make a slightly more specialized version of the older imedit called bpmedit. It was added fairly recently. You should look at it and consider the specializations I found useful. Some of the specializations were actually added to imedit (now called ximedit) such as painting vectors and mask above or below some level.

So I would certainly welcome a super convenient BPM painting program but I think bpmedit is reasonable for what I do.

Frank Valdes
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Misc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.11 seconds