mass-weighted Sobolev/HSML column values

Ken suggested I revisit the particles per grid-cell comparison - i.e. Grid vs. Sob, Sob vs. HSML, and Grid vs. HSML. In order to do this so that each grid corresponds to one value, I have to take the mass-weighted average of the Sobolev/HSML values within a given grid-cell:
\begin{equation*} <\Sigma_{\rm{Sob}}>_{\rm{MW}} = \Sigma_\rm{((Sob,or,HSML)}\times \rm{mass})/\Sigma_\rm{mass} \end{equation*}

I then have a single \(\Sigma\) value per grid-cell and can make a direct comparison:

sobolevpixels
(plot made with gal_reduction/tools/sigmacompare.py via PIXELPLOT==1)

In an ideal situation, each line would lie on the one-to-one dotted black line. Unfortunately both Sobolev and HSML values under estimate the grid values. The good news is that there isn’t much difference due to the resolution. We might have to examine more galaxies within our sims in a similar fashion to see if this under prediction takes place at the same surface densities; if that is the case we can easily incorporate some sort of correction factor. But that leads to the question - how many galaxies do we have to look at?

In making this plot I learned how to stick the legend outside of the plot. It’s as simple as passing bbox_to_anchor to the legend() call:
legend(bbox_to_anchor=(0.1,1.05),loc=3,shadow=True,fancybox=True)
this is a tiny bit tricky in that the anchor is attached to the loc. So if loc=3 then the anchor for the box is attached to the bottom left corner of the legend box. Also the x,y coordinates are in absolute figure positions. This is thanks to matplotlib and stack overflow.

Next up was Ken’s concern about the histograms I was sending him. Further inspection showed that simply passing ‘bins=50’ is not necessarily the best idea to properly represent the data. By default hist() takes the min & max of the data then splits it into N bins. The problem here is that if you’re comparing two different datasets then if they span a different range then the binsizes will differ. To circumvent this issues I simply specified the binsize manually via altering my histo() function call a tiny bit:
def histoit(values,COLOR,LABEL,HLS,BINSIZE=0.1):
indexes = where(values>0)[0] ##prevents -inf
vals = log10(values[indexes])
binner = arange(min(vals),max(vals),BINSIZE)
hist(vals,color=COLOR,log=True,
bins=binner,
label=LABEL,histtype='step',lw=1.5,ls=HLS)
With this quick fix the data looks much more comparable, here’s the before and after:

[table] Before,After [/table] better right? hello?


And last but not least, I’ve plotted the gas particle positions for this galaxy at all three resolutions for visual inspection:
ledisks
we go from slightly compressed cloud, to fluffy pancake, to regular pancake!


Comparing Sigma

The new HI gradient stuff finished down to z=3.  Turns out it does make a small difference in the calculated Sobolev values of this particular galaxy.  At the same time however, we find now calculate the HI surface density via the grid calculation and drop that along with it, so the difference between grid & sobolev remains about ~1dex:sigmaHIcompare(plot made via gal_reduction/tools/sigmacompare.py)

Sigma_HSML however remains a front-runner here as it’s separation is only about ~0.5dex or less depending on if we account for the spread.  2xSigma_HSML overshoots the grid calculation by a tiny bit.  In comparing these two galaxies I’ve also found that the Sigma_HI results in slightly less stellar and gas content:

[table]
label,dir,eff epsilon [kpc/h],#of nested grids, pcount, galaxy number, RS halo number, Mgas, Mstar
superlowres,run14,3.13,0,128^3,101,915,2.09e9,1.73e9
lowres,run11,1.56,1,256^3,13,143,8.98e8,1.81e9
hires,run12,0.78,2,512^3,24,995,5.31e8,1.85e9
hires(HIgrad),run16,0.78,2,512^3,25,1024,4.77e8,1.81e9
[/table]

It’s not entirely clear where to go from this point or which option is the best option to estimate the surface density within these SPH sims…

As a side not the KS-relation changed a tiny bit between these two as well:

Is this thing on?

Today I’m running run16_ken_fixedgradient so I can compare with our old method of doing things. Previously I was calculating the density gradient of the entire particle and using that for h:

\begin{equation*} h=\frac{\rho}{|\nabla \rho|} \end{equation*}

but now It’s changing to:

\begin{equation*} h=\frac{\rho_{\rm{HI}}}{|\nabla \rho_{\rm{HI}}|} \end{equation*}

which may not make much a difference at all, but will be nice to compare.  Run is currently at $$z\sim4.8$$.

Have a SPLOTCH picture!