Wednesday, August 3, 2011

IPhot Changes

I successfully linked the two functions together in IPhot's createfigure(...) today after working on it for the past two days.

def createfigure(x,y): Creates a figure with a cropped image centering on the clicked point source by using phot3.plotptsmarking(...). If there are no other point sources in the cropped image, this function will plot a contrast curve using phot3.plotcontrastcurve(...), and the cropped image will be an inset on the top right corner of the contrast curve. Both of these functions were described in the previous post. x,y are the x and y coordinates of the mouse click. The cropped image specifications are specified by what the user enters in the command line and the mouse click, which indicates which point to center on. 


Example: (Using command line)


C:\[Your path here]>IPhot CK00012_snap_20110412.fits -s 2
CK00012_snap_20110412.fits
Press Q/q to quit, or any other key to load next image.


Clicking on the center point source at around (94,72), we get this:
Detected point source: (94, 76)

Clicking on the point source at around (22,100), we get this:

q
Quitting program...


C:\[Your path here]>


Note that I used an annulus spacing of 2. This shows up in both of the cropped images. The inner circle around the point source represents the aperture radius. The larger circle around the point source indicates the innermost annulus radius, or where the program will begin to sample the contrast between the point source and the background around it. 

In the first cropped image, there is also a smaller circle (with a fixed radius of 1) that indicates where other point sources are in the image.

Learned:
-How to create inset graphs (in two ways actually!). I can either use the axes(...) function from pylab or the inset_axes(...) function from mpl_toolkits
To-Do:
-Test my program and debug it. There are probably still some minor problems or aesthetic issues I still need to fix. 

No comments:

Post a Comment