Conversation
|
I have not made any attempt to optimize the new implementation, and so it is much slower and more memory intensive than the original module, because many redundant calculations are being done. I wanted to start with code-correctness before proceeding to optimization. |
|
A couple of scattered notes for future work on this PR: First, a list of functions we should consider replacing:
Separately, diffmerge is based on |
_mc_phot_kern…y harmless due to different treatment of randoms.
…elect_diffstar_params with incorrect argument order
…ical to compute_burstiness
… all galaxies were treated as centrals. Now satellite quenching can take effect
… gd_phot_kernels.py and gd_phot_kernels_merging.py. This changes the API of gd_phot_kernels.py because now we need to know p_merge to compute no-merge photometry
|
The code in this PR has been used by both @zaidikumail and @MitraKaustav in gradient descents, and the rapid quenching implementation has been stress-tested by @zaidikumail, so I'll proceed to merge this into |
|
Note that #424 was a closely related investigation to this PR, I think maybe we should close #424 now that we found a better solution to the blue merging problem, but @zaidikumail should confirm before we do that. |
Yes, we can close #424 |
This PR brings in a dev version of
phot_kernels._mc_phot_kern. The implementation is in a new module,gd_phot_kernels.py. There is a unit test that ensures thatgd_phot_kernels._mc_phot_kernandphot_kernels._mc_phot_kernreturn identical results for the stochasticobs_magsquantity. The gd_phot_kernels._mc_phot_kernfunction returns a bunch of additional quantities, includingobs_mags_weighted. The figure below shows that histograms ofobs_magsandobs_mags_weighted` are very similar.