Please do not use faperture; instead use faperture2. The former uses global common block variables, which create no end of headaches.
Figure out the background subtraction algorithm (none, clipped ring average). Default to no background subtraction.
Figure out the radius; use the "radius" keyword if specified. If not, use the "frac" keyword as a multiplier on ims.fwx and ims.fwy. If "frac" isn't specified, assume frac=1.
Pass the image and the size, along with some header information (welldepth, sky noise) off to external routine "apercent" in "apercent.so".
If apercent.so returns an error for a given object, set the following fields of that object to 0: x, y, aper, naper, ex, ey, eaper.
Otherwise, set fields aper, naper, and eaper. If /norec was not specified, also set x, y, ex, and ey. Do not change cmx and cmy.
Ignore the "weight" keyword for now. A better implementation of that sort of thing is coming.
NOTES: Don't necessarily trust ex and ey, the errors on the positions. I'm not sure if they're any good, but this should be looked into further. aper has the aperture photometry value. eaper should be a good error estimate on aper, under the assumption that the gain of the image is one (i.e. one count = one photoelectron).