I finally finished coding IPhot.py (previously called InteractivePhot.py, but I got sick of typing it into command line every time). So here's the long-awaited example:
Opening up my Windows command line... (not Python's command line)
C:\>cd [my path here]
C:\[my path here]>IPhot CK00012_snap_20110412.fits -d 0.95 --width=74 -h 60 -s 3
Press enter to exit.
The FITS image will pop up:
Upon clicking, I'll get this:
Notice that I actually have the name of the image on the second figure now =]
Also, users can specify as many or as few of the options as they want in any order they want. So:
C:\[my path here]>IPhot CK00012_snap_20110412.fits -h 60 -s 3 -w 74
Press enter to exit.
will give the exact same thing as the image above. (Note that -d or darkpix has a default value of 0.95)
To reiterate:
-d, --darkpix = darkest x percentage of pixels
-w, --width = width of sub image (xsz variable in my python code)
-h, --height = height of sub image (ysz variable)
-s, --ann_space = annulus spacing, or the space between the aperture and innermost annulus radius (ann_space variable)
I also created a file called IPhotParams.py that is just a list of global variables with default values. A user can then edit the values in that file to quickly set the default values of darkpix, ann_space, etc without having to dig through the actual code.
Learned:
-More about RE
-A bit about setting paths
To-Do:
-Make an option to save the contrast curves
-Allow the program to sequentially load multiple FITS files; another will open once the user presses enter (or some other button)
-Start thinking about making the program mc os compatible.
This is great. Very nice work!
ReplyDelete