Open sweverett opened 6 years ago
Erin suggested that we make a check in bal_config
that will allow GalSim to use photon shooting for low surface brightness - large cm_T
objects. This will make the configs a bit messy but could give large speedups for this class of objects.
This will be open for a while - we will identify slow parts of the code that we can use to speed up injection. The latest run has injection taking nearly as long as runing SOF which is far too slow!
First up is handling large objects. I profiled the injection code and roughly half of the runtime is in
_drawKImage()
. Messing withmax_T
andmin_T
shows that a few very large objects (cm_T>10
) can slow down a chip injection by well over 100% the mean time. This appears to be a bigger issue with the new combined catalogy3_balrog_test_input_mof
as it has a largercm_T
tail.We need to find a way to either:
cm_T
andcm_T_err
to reduce the size of the largeT
tail, ormax_T
(possible selection issues), ormax_fft_size
and explore its effect on selection.The other approach is to solve #6 which will certainly help speed up runtime, but it will have diminishing returns as 1% of objects can take ~90% of runtime in the worst cases.