meeting 2026 03 11 gw - JacobPilawa/TriaxSchwarzschild_wiki_6 GitHub Wiki

Context

  • Playing around with single schecter fits for the GSMF to see if things are a bit easier to deal with.

Diagnostics

Single Schecter Fits

  • The following cases in this section are various attempts at fitting the GSMF with a single schecter fit. In broad terms, these tests went over quite well! In fact, we're able to quite nicely reproduce the z=0 mass function down to about 1e10 solar masses.

    • The results seem relatively insensitive to the exact sampling of galaxies I choose.
    • I also tried a "faux-continuous" approximation of the Leja prescription, where I fit for the GSMF as a function of redshift by simply dividing up the data into bins.
  • After getting a handle on the z=0, discrete GSMF calculations, I tried to move more in the direction of Leja's approach.

    • In this case, we don't fit for the parameters of the GSMF, but we allow the parameters of the GSMF to vary (I have a linear and a quadratic model below), and we fit for the coefficients of the evolution (as well as the z=0 parameters).
    • The linear model shouldn't be taken as anything more than a proof of concept, but I do have a bunch of tests for the quadratic case.
    • What's really encouraging is that the results from the quadratic model seem to be generally in agreement with the "shelled approach", despite being totally different methods/data being used.
      • Note that as we get to very high redshift (z~0.3 or above), we start to get badly affected by incompleteness and the mass correction. I'm still trying to understand how we might do this better.

Case Reference

Case / Section What it tests
A Fiducial single Schechter fit (z<0.05, log(Mstar)>10, 1000 samples)
B Same as A but with a wider prior on logphi ([-6, -1])
C Same as B but with a lower mass limit of 1e9 Msun
D Same as C but with 10,000 samples instead of 1,000
E Back to 1,000 samples and log(Mstar)>10, but wider redshift range (z<0.1)
F Same as E but with lower mass limit of 1e9 Msun
G Full catalog, no mass or redshift cuts, 5,000 samples
H Intermediate redshift shell (z=0.18–0.22), log(Mstar)>9, 1,000 samples
I Low redshift (z<0.05), no stellar mass restriction
Faux-continuous / Shelled Bins catalog by redshift and fits GSMF independently per shell; discrete approximation of Leja-style parameter evolution
Linear redshift evolution Parametrizes logphi, logMstar, alpha as linear functions of z; fits 6 coefficients across the full catalog
Quadratic redshift evolution (fiducial) Extends linear model to quadratic (9 parameters), no mass/redshift cuts, 5,000 samples, no Leja constraint
Quadratic redshift evolution (wider priors) Same as quadratic fiducial but with wider priors to resolve unsampled posteriors
Quadratic redshift evolution (~100k galaxies) Same as wider priors but with ~100k galaxies to test sensitivity to sample size
Shelled vs. Leja quadratic comparison Compares GSMF and parameters from the shelled approach vs. the quadratic Leja model to understand discrepancies
Jackknife testing Runs the shelled approach 5 times with different random samples of 1,000 galaxies to test sensitivity to galaxy selection

Fiducial Case (Case A)

  • I started by swapping out the double schechter for a single schechter, and have the following choices in the GSMF fitting:
    • Limiting input puts to z<0.05, log(Mstar) > 10 --> sampling 1000 points from this space
    • No Leja constraints
    • volume factor = 0.7 * 1000 / 158489 (accounting for 1/1000th sampling)
    • prior_ranges =
      • 'logphi': [-6.0, -2.0],
      • 'logMstar': [8.0, 12.0],
      • 'alpha': [-2.0, 3.0]
Posteriors GSMF Samples
[images/260311/260311_fiducial_single_schechter_fit_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_fiducial_single_schechter_fit_gsmf.png)

Small prior adjustment (Case B)

  • It seemed like the posterior for logphi wanted to be a bit higher, so I increased the prior ranges on 'logphi' to [-6.0, -1.0], but keeping everything else the same:
    • We're really getting somewhere with this!
Posteriors GSMF Samples
[images/260311/260311_fiducial_single_schechter_fit_logphi_m6_m1_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_fiducial_single_schechter_fit_logphi_m6_m1_gsmf.png)

Adjusting catalog cuts (Case C)

  • Given how the above set of posteriors and GSMF samples looked, I wanted to include a large set of points with less strict cuts. For this case, I've simply changed the lower mass limit to 1e9 Msun (and adjusting the volume factor accordingly):
    • At least in this test, it seems like changing the low mass limit to 1e9 flattens out the low mass end of the Schecter function, and the high mass end vastly overpredicts the Leja+20 z=0 curve.
Posteriors GSMF Samples
[images/260311/260311_fiducial_single_schechter_fit_case_C_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_fiducial_single_schechter_fit_case_C_gsmf.png)

Adjusting number of sampled galaxies (Case D)

  • Everything is the same as in Case C, but I'm now using 10000 samples instead of 1000 (and adjusted the volume factor):
    • Relatively to Case C, there's very little change in the GSMF samples, though the results from Case C with fewer galaxies have understandably larger uncertainties. For quick iteration, we're probably fine to stick with 1000 galaxies, so I'll stick with that.
Posteriors GSMF Samples
[images/260311/260311_fiducial_single_schechter_fit_case_D_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_fiducial_single_schechter_fit_case_D_gsmf.png)

Adjusting redshift range (Case E)

  • I've gone back to 1000 galaxies sampled, and I've also gone back to log(Mstar)=10 for the lower mass cutoff. In this test, I've changed the redshift cutoff to be z<0.1 , rather than z<0.05:
    • The results here are still looking reasonable! It does have me worried about the dependence on the lower mass limit, though, so I want to try another case where I go back to 1e9 Msun as the lower bound, which I will do in Case F.
Posteriors GSMF Samples
[images/260311/260311_fiducial_single_schechter_fit_case_E_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_fiducial_single_schechter_fit_case_E_gsmf.png)

Adjusting redshift and mass range (Case F)

  • As mentioned above, this is identical to Case E, but I've changed the lower mass bound from my catalog to 1e9 Msun:
    • Surprisingly, this is looking better than the case above where I changed the mass range. It's definitely picking up on the broad shape of the curve, and not massively over/under predicting the high/low mass ends of the GSMF.
Posteriors GSMF Samples
[images/260311/260311_fiducial_single_schechter_fit_case_F_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_fiducial_single_schechter_fit_case_F_gsmf.png)

Fully open mass and redshift range (Case G)

  • The above test made me curious about opening up (M, z) to the full parameter space of our catalog, but still downsampling. I've increased the number of sampled galaxies to 5000 and have made no cuts on the mass and redshift for this test.
    • A bit hard to make sense of this result, in part because I think this is not the intended way that Leja would suggest to do this calculation. I'm working through how Leja did this now, where it seems like they were instead fitting for coefficients of polynomials describing the evolution in parameters over redshift?
Posteriors GSMF Samples
[images/260311/260311_fiducial_single_schechter_fit_case_G_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_fiducial_single_schechter_fit_case_G_gsmf.png)

Trying an intermediate redshift case (Case H)

  • Rather than throwing the full catalog at the wall, I though an interesting test would be to define a "shell" of redshift from my catalog to see if we can get a correct general trend in the GSMF evolution. To do this, I've limited once again to:
    • 1000 galaxy samples
    • z=[0.18,0.22]
    • log(Mstar) > 9
Posteriors GSMF Samples
[images/260311/260311_fiducial_single_schechter_fit_case_H_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_fiducial_single_schechter_fit_case_H_gsmf.png)

Low redshift, no mass restriction (Case I)

  • I had the idea to do a "faux" Leja style GSMF, where instead of parametrizing the evolution, I just divide the data into a variety of redshift bins and compute the individual GSMF for each set of data. This will give me, in genearl terms, the rough GSMF evolution implied by our data.

    • However, before going straight to that case, I wanted to try limiting my catalog to local sources but NOT placing restrictions on the stellar mass, just to see how badly the low mass data is affecting our results. So in this set of plots:
      • I'm basically taking Case A and removing the stellar mass restriction.
  • I'm actually stunned at the leve of agreement here. The low mass end is likely being underpredicted due to sampling effects, but this is frankly fantastic in my opinion.

Posteriors GSMF Samples
[images/260311/260311_fiducial_single_schechter_fit_case_I_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_fiducial_single_schechter_fit_case_I_gsmf.png)

Trying a "faux-continuous" version/"shelled" version

  • Given some of the results above, I wanted to try one quick test where I bin the catalog by redshift, and run the GSMF fitter on each redshift shell. This is similar in spirit to the Leja approach, but the Leja approach bakes in the parameter evolution into their fitter. Here, we're just doing this discretely as a rough approximation:
plot z=(0,0.05) z=(0.05,0.1) z=(0.1,0.15) z=(0.15,0.2) z=(0.2,0.25) z=(0.25,0.3) z=(0.3,0.35) z=(0.35,0.4) z=(0.4,0.45) z=(0.45,0.5) z=(0.5,0.55) z=(0.55,0.6)
Posteriors [images/260311/shell_0_z0.00_to_0.05_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_1_z0.05_to_0.10_posterior.png) [images/260311/shell_2_z0.10_to_0.15_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_3_z0.15_to_0.20_posterior.png) [images/260311/shell_4_z0.20_to_0.25_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_5_z0.25_to_0.30_posterior.png) [images/260311/shell_6_z0.30_to_0.35_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_7_z0.35_to_0.40_posterior.png) [images/260311/shell_8_z0.40_to_0.45_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_9_z0.45_to_0.50_posterior.png) [images/260311/shell_10_z0.50_to_0.55_posterior.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_11_z0.55_to_0.60_posterior.png)
GSMF Samples [images/260311/shell_0_z0.00_to_0.05_gsmf.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_1_z0.05_to_0.10_gsmf.png) [images/260311/shell_2_z0.10_to_0.15_gsmf.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_3_z0.15_to_0.20_gsmf.png) [images/260311/shell_4_z0.20_to_0.25_gsmf.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_5_z0.25_to_0.30_gsmf.png) [images/260311/shell_6_z0.30_to_0.35_gsmf.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_7_z0.35_to_0.40_gsmf.png) [images/260311/shell_8_z0.40_to_0.45_gsmf.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_9_z0.45_to_0.50_gsmf.png) [images/260311/shell_10_z0.50_to_0.55_gsmf.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/shell_11_z0.55_to_0.60_gsmf.png)
  • I have also extracted the individual GSMFs and the parameters (note that some have very non-gaussian/incompletely sampled posteriors):
GSMFs Posterior Evolution
[images/260311/gsmf_master_comparison.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/parameter_evolution.png)

Trying to bake in the redshift evolution (Leja+20)

  • Up to now, it's my understanding on the code that I am essentially doing a single-redshift version of the full Leja prescription, and I should instead parametrize logphi/logMstar/alpha as a function of redshift, and fit for the coefficients of this evolution.

  • As a first pass, I attempted to do this assuming linear evolution of the parameters as a function of redshift, giving six parameters to fit.

    • logphi(z) = logphi_0 + beta_phi * z
    • logMstar(z) = logMstar_0 + beta_M * z
    • alpha(z) = alpha_0 + beta_alpha * z
  • The results are plotted here, and I'm still trying to make sense of them. Though I'm not sure it's worth spending too much time on this particular part since Leja advocates for a quadratic model. At the least, I am able to obtain somewhat Gaussian parameters, and the results are not orders of magntiude off.

    • Though it is a bit strange the this model seems to favor more massive galaxies at higher redshift, but this might just be since we're not using the corrected mass? But my gut tells me that "correcting" the mass will make it go in the wrong direction, since we'll end up raising the mass on the highest redshift galaxies.
    • Maybe another issue is the incorporation of completeness? Currently not doing anything on that front, but likely need to be.
GSMFs Posterior Evolution Cornerplots
[images/260311/260311_evolved_single_schechter_bugfix_evolution_bands_with_leja.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260311_evolved_single_schechter_bugfix_evolution_params.png) images/260311/260311_evolved_single_schechter_bugfix_corner.png

Quadratic Redshift Evolution

  • Leja adopts a quadratic model for the parameter evolution rather than a linear model, so I tried to extend the results above to a full 9-parameter model.

Fiducial Case

  • After adding the additional parameters for the quadratic model, I ran a "fiducial" test and obtained the following results:
    • Note that some of the choices I made are:
      • prior_ranges:
        • 'c_phi': [-6.0, -1.0], # normalization at z=0
        • 'b_phi': [-10.0, 10.0], # linear evolution of normalization
        • 'a_phi': [-20.0, 20.0], # quadratic evolution of normalization
        • 'c_M': [8.0, 12.0], # characteristic mass at z=0
        • 'b_M': [-10.0, 10.0], # linear evolution of characteristic mass
        • 'a_M': [-20.0, 20.0], # quadratic evolution of characteristic mass
        • 'c_alpha': [-5.0, 5.0], # low-mass slope at z=0
        • 'b_alpha': [-10.0, 10.0], # linear evolution of slope
        • 'a_alpha': [-20.0, 20.0] # quadratic evolution of slope
      • No mass cuts, no redshift cuts
      • No Leja constraint imposed
      • Sampling 5000 random galaxies from the full catalog
GSMFs Posterior Evolution Cornerplots
[images/260311/260312_quadratic_case_fiducial_evolution_bands.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260312_quadratic_case_fiducial_evolution_params.png) images/260311/260312_quadratic_case_fiducial_corner.png

Wider priors

  • The above test didn't resolve some of the posterior distributions, so I widened the priors a bit. This leads to a seemingly legit-looking model!
GSMFs Posterior Evolution Cornerplots
[images/260311/260312_quadratic_case_even_wider_priors_evolution_bands.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260312_quadratic_case_even_wider_priors_corner.png) images/260311/260312_quadratic_case_even_wider_priors_evolution_params.png

Trying to run with a large sample of ~100k galaxies

  • I was curious if our results depended strongly on the number of galaxies sampled. Whereas the above test used 5000 galaxies, I upped this number to 100k galaxies without any other cuts. Dynesty ended up running for ~1.25 hours, but gave reasonable outputs still!
GSMFs Posterior Evolution Cornerplots
[images/260311/260312_quadratic_case_even_wider_priors_100k_samples_evolution_bands.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/260312_quadratic_case_even_wider_priors_100k_samples_evolution_params.png) images/260311/260312_quadratic_case_even_wider_priors_100k_samples_corner.png

Trying to understand "shelled" GSMF vs. Leja quadratic model GSMF

  • One of the intersting things from the above tests -- it seems like the z=0 Leja+2020 quadratic model gives a substantially different GSMF (and parameters) than the version where I simply feed in all the low redshift data from a "shell." I dont quite know why this is, and I this section of the page is my attempt at understanding that.
    • Note that the same is true in the linear model case, so I suspect there's either a bug or a limitation of our current setup.
Parameter Evolution GSMF Comparisons
[images/260311/all_shells_0_7_vs_quadratic.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260311/gsmf_grid_shells_0_to_7.png)

Jackknife Testing

  • One question I had -- throughout all the tests above, I am selecting a very small sample of the full catalog of ~20M galaxies, so how much do our results depend on which set of galaxies I use to "fit" the model?

    • To test this, I ran the same "shelled" test as above (I plan to do this in the Leja+20 quadratic case, too), and selected 5 different sets of 1000 galaxies, computing posteriors on the parameters.
  • It seems like there is very little sampling sensitivty here! The resulting GSMFs and parameters (especially for the lowest ~4 redshift "shells" are in very nice agreement). As mentioned above however, this breaks down at higher redshift when we have many fewer galaxies to select from. Still working on how we might approach this part of the parameter space.

plot z=(0,0.05) z=(0.05,0.1) z=(0.1,0.15) z=(0.15,0.2) z=(0.2,0.25) z=(0.25,0.3) z=(0.3,0.35) z=(0.35,0.4) z=(0.4,0.45) z=(0.45,0.5) z=(0.5,0.55) z=(0.55,0.6)
Posteriors [images/260313/shell_0_z0.00_to_0.05_posterior.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_1_z0.05_to_0.10_posterior.png) [images/260313/shell_2_z0.10_to_0.15_posterior.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_3_z0.15_to_0.20_posterior.png) [images/260313/shell_4_z0.20_to_0.25_posterior.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_5_z0.25_to_0.30_posterior.png) [images/260313/shell_6_z0.30_to_0.35_posterior.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_7_z0.35_to_0.40_posterior.png) [images/260313/shell_8_z0.40_to_0.45_posterior.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_9_z0.45_to_0.50_posterior.png) [images/260313/shell_10_z0.50_to_0.55_posterior.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_11_z0.55_to_0.60_posterior.png)
GSMF Samples [images/260313/shell_0_z0.00_to_0.05_gsmf.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_1_z0.05_to_0.10_gsmf.png) [images/260313/shell_2_z0.10_to_0.15_gsmf.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_3_z0.15_to_0.20_gsmf.png) [images/260313/shell_4_z0.20_to_0.25_gsmf.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_5_z0.25_to_0.30_gsmf.png) [images/260313/shell_6_z0.30_to_0.35_gsmf.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_7_z0.35_to_0.40_gsmf.png) [images/260313/shell_8_z0.40_to_0.45_gsmf.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_9_z0.45_to_0.50_gsmf.png) [images/260313/shell_10_z0.50_to_0.55_gsmf.png]] ](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260313/shell_11_z0.55_to_0.60_gsmf.png)
  • And we can also look at the parameter evolution as a function of redshift from the 5 different jackknives:
Param Evolution (Jackknives)
images/260313/parameter_evolution.png

Some sanity checks

  • I wanted to return to some of the "raw data" to ensure that the plots above make sense. Here's a variety of diagnostic plots that tell a more complete story of the GSMFs above:
Mass Histogram Mass Histogram with Shells M vs. z M vs. z in panels All CDF CDF in Panels
[images/260317/plot1_mass_histogram.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260317/plot2_mass_histogram_with_shells.png) [images/260317/plot3a_2d_histogram_full.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260317/plot3b_2d_histogram_shells.png) [images/260317/plot4c_cumulative_all_shells.png]]](/JacobPilawa/TriaxSchwarzschild_wiki_6/wiki/[[images/260317/plot4e_cumulative_by_survey_panels.png)