Open taldcroft opened 6 years ago
During profiling this function didn't jump out as a hot stop, though I wasn't explicitly looking for it. Might be more important now that the de-tablification significantly reduced run time for spoiler and imposters, so the relative time for computing calc_p_safe has gone up.
Currently this uses the generalized routine that computes p(N_or_fewer) for N from 0 to 7 using a loop from 0 .. 255 to enumerate all possibilities. All we need is N=1, so I think this can be made much faster.
See: https://github.com/sot/chandra_aca/blob/652bb052/chandra_aca/star_probs.py#L147
Of course some profiling should be done to demonstrate that this function contributes to overall time.