So as we look to find a function to fit the data, I’ve settled on the sigmoid function as it seems to do a really good job. I modified it a little bit to better fit our purposes, with added parameters to adjust the vertical/horizontal stretch, and the horizontal displacement. The equation for the model I created is as follows:

A adjusts the vertical stretch, b adjusts the displacement, and c adjusts the horizontal stretch. I’m pretty sure this is the appropriate way to incorporate stretches and shifts into the curve shape.

One thing I discovered with the local-background subtraction profiles is that we hit a value of 1 and then stay there, which is different than for the other profiles. This is due, I believe, to the presence of lots of 0 values that I hit in that intensity profile. Since they are all zeros, you’re dividing input by input, and getting 1 throughout. Below is an example:

Regardless, let’s fit a few of these functions with that modified sigmoid profile and see what we get! I use Astropy to generate a custom model, and fit it to the data with the LevMarSQF fitting algorithm. Below are examples for 6 bins:
For the most part, it does a really solid job! I also have the r^2 values plotted, but the general fit to the shape seems pretty good.
I also finished an Acenet run of the local background subtraction. For some strange reason, a row of bins is missing (I’m looking into why – since it appears in both the mean and median extractions it’s definitely in how I specified the bins before running the simulation).
Below are the model matrices for both. The first is using the mean, the second is using the medians.


As for densities, I took 100000 random points and measured the number of galaxies within 251 pixels, and the distance to the 5th nearest neighbor. I saved all of this to a table and am finishing up prep for the simulation code to use locations from a density file.







