Hi John,
Actually, computation of accurate local background models is one of the reasons that explain why our AperturePhotometry script works so well and is so robust.
The local background model is just the residual layer of a multiscale median transform. Open the MultiscaleMedianTransform, select the desired number of layers, and disable all layers except the last one (the residual layer, labeled 'R'). Apply the process to a duplicate of your image to generate the local background model. The only critical parameter here is the number of layers. The more layers, the larger the scale of the generated background model. The MMT algorithm is outstandingly efficient to isolate structures, which makes it an ideal tool for these modeling tasks. I use it also internally in the LocalNormalization process with a similar purpose: to separate the additive (background) and multiplicative (scale, or slope) components of a linear function to model the difference between two images.