Translating Mangle Masks Into Data Units

-Eli & Eduardo

Here we report on our work translating the (pixelized) mangle masks, which give the 2" aperture limiting magnitude on a fine scale, into limiting magnitudes in the data.

The Problem

The mangle mask characterizes the depth on a very fine scale (great!) but for a 2" aperture (not as great). The advantage is that this is easy to predict from the individual image noise data; the disadvantage is that we don't measure galaxies using aperture magnitudes, but rather MODEL, AUTO, etc. Plus, these maps don't know about the seeing and other systematics that may affect the depth beyond the simple sky noise, including reddening corrections and SLR corrections.

Eduardo and I have started developing a simple procedure to deal with this, which is detailed below.

In brief, we first measure the limiting magnitude in pixels on the sky (using the quoted magnitude error) for various magnitudes: MAG_APER_4, MAG_AUTO, MAG_MODEL, and MAG_DETMODEL (for griz bands). This is useful because these quantities can be accurately measured. However, the main disadvantage is that we can only calculate this on a relatively coarse pixelization, where we lose information about stars, chip gaps and overlaps, etc. Thus, our fitting procedure uses (a) a coarsely averaged mangle map with the same pixel scale; (b) Boris Leistedts' systematics maps ; (c) the SFD98 dust map; (d) Bob Armstrong's SLR maps which were used to correct the photometry from the catalog.

Each of these maps can be swapped out of course based on (E.g.) our final decision on SLR corrections for SVA1.

The Fitting Procedure

Measuring the Limiting Magnitude

For an aperture magnitude (which doesn't depend on object size) the MAG_ERR vs MAG relation can be simply parametrized as a function of two numbers: the effective exposure time (given a fixed zeropoint) and the sky noise within the aperture. Equivalently, this can be parametrized using the effective exposure time and the 10sigma limiting magnitude. I developed my code for accurate generation of errors for simulated sky survey galaxies (Busha et al, in prep). By fitting the full curve (rather than simply taking the mean/median of all objects with err~0.1086 mag) we can get more robust results that aren't sensitive to the exact initial galaxy selection.

As an example, here are the mag_err vs mag plots for MAG_APER_4, MAG_AUTO, and MAG_DETMODEL in a pixel of relatively uniform depth (I've used healpix NSIDE=1024, so each pixel is 11.8 arcmin^2).


For the MAG_APER_4 case, the model is an excellent fit. It doesn't work quite as well for the other magnitudes, especially at the bright end where the object size is bigger and hence the noise characteristics are different. However, I am satisfied that things work reasonably well. Note that the typical error for the limiting magnitude parameter (estimated via bootstrap resampling) for MAG_APER_4 is very small (.003 mag); for MAG_AUTO is 0.02 mag; for MAG_MODEL is 0.025 mag; and MAG_DETMODEL is 0.01 mag.

Choosing Pixels

The illustrations above show the case when the pixel has a relatively uniform depth. This is not always the case! This shows up as many outlier galaxies for the MAG_APER_4 case, often with two distinct tracks of different depth. For these map tests I have chosen pixels with:

  1. In SPTE, with dec > -60 (to avoid the problems in the LMC region)
  2. All 16 daughter pixels for the NSIDE=1024 pixelization have mangle measurements (in Aurelien's nside=4096 mangle pixelization, which is itself an approximation of the molygon map)
  3. The rms of the 6 daughter pixels is <0.2 (relatively uniform)
  4. There are at least 50 galaxies with MAGERR_AUTO < 0.1 in the pixel
  5. There are fewer than 30% outlier pixels in the MAG_APER_4 fit (somewhat arbitrarily defined).

In all, there are 23000 11.8 arcmin^2 pixels that meet these criteria.

The Simple Model

After deresing the mangle maps and Boris' systematics maps to my resolution, I simply fit a model where:

\delta_measured = \Sum a_k \delta_map_k

where \delta_x = (x - <x>)/<x>, the normalized deviation of the map from the mean for that map. Thus, we are fitting the fluctuations in each map rather than the overall scale.

Once again, the goal is to be able to measure these parameters from the training pixels, and then apply these using the high resolution mangle maps to get a high resolution depth map appropriate for a given band and magnitude type.

We randomly sample 70% of the clean pixels as a training set, and then minimize the rms of our linear model to determine the a_k coefficients. We then apply these coefficients to the validation pixels to look at the residuals between the "model" limiting magnitude and the measured depth maps.

In addition to the full model fit, we repeat the same procedure using only the a_0 coefficient for the mangle mask, which I call the "scaled" limiting magnitude (as opposed to the full "model"). This allows us to test how well the mangle map can predict the depth map after taking into account magnitude offsets (e.g., most of these magnitudes should have a shallower depth simply because they are using smaller apertures.)


Pixel-by-pixel residuals

Here are some example residuals for i-band. r band looks very similar, and I haven't run g and z yet. I start with the 2 arcsec aperture limiting magnitude. If all is working properly, the mangle mask should work directly (modulo the reddening map) with no offset.

Raw mangle map. Red shows the model histogram (left) for comparison "Scaled" mangle map "Model" map

As expected, the mangle map accurately predicts the 2arcsec aperture limiting magnitude, with no scaling required. However, there is still a 0.03 mag scatter, which at least partly can be attributed to pixelization noise.

Next, MAG_MODEL limits:

Raw mangle map. Red shows the model histogram (left) for comparison "Scaled" mangle map "Model" map

Here you can see that using the full systematics model improves the residuals, reducing the scatter from 11% to 6.5%. The most significant systematic map is the FWHM (average coadd seeing) map, which isn't surprising: the model magnitude depth depends strongly on both the 2arcsec aperture magnitude and the seeing.

Finally, MAG_AUTO limits:

Raw mangle map. Red shows the model histogram (left) for comparison "Scaled" mangle map "Model" map

This is very interesting. First, there is a slope in the raw residuals as a function of mangle depth. The scaling procedure takes care of this (great!). However, there is no additional information from the seeing (or other systematics) maps beyond the straight scaling. Either MAG_AUTO is somehow very robust, or alternatively it is biased by the seeing in a way that we aren't quantifying. The scatter in the residuals on the right is 7%, similar to that from the full model of the MAG_MODEL depth.

Pretty Map Pictures

Here is what the maps look like. Note that the depth map is lower resolution! Please ignore everything south of dec=-60. Strange things happen in the LMC region that are not getting picked up by any of the models. I need to add residual plots

First, MAG_APER_4:

Mangle map Depth Map Model depth map

These all look very similar. And the residuals, at high resolution (just a rebinning of the depth map; no interpolation):

Mangle - Depth residuals Model - Depth residuals

The residuals look like noise. This is what's expected. However, there is some horizontal striping. A zoomed plot shows what's going on here:

Mangle - Depth (zoomed)

These are the chip gap overlaps that have been pixelized. These effects can be smoothed with an average version of the pixelized mangle map (which Aurelien is working on).


Mangle map Depth Map Model depth map
Mangle - Depth residuals Model - Depth residuals

The most significant change is the region in the NW which has low sky noise (deep 2arcsec imaging) but relatively bad seeing. So the model depth map matches the measured depth map much better than the mangle map in this region.

Note that the amplitude of the scale of the two residual plots is the same, but the center point has been moved to account for the DC component of the offset.

Finally, MAG_AUTO:

Mangle map Depth Map Model depth map
Mangle - Depth residuals Model - Depth residuals

Something strange is going on in LMC with MAG_AUTO. Something to be aware of. Also interesting is that the model does yield better residuals than the straight mangle map. This is because the model removes the slope in the depth_auto vs mangle relation (see above). Thus, to prevent unintended biases we should not use the mangle map with a simple offset to predict the mag_auto depth.

Data Products

Very soon I will have "renormalized" mangle maps for each of the bands/magnitude types available to download.