Could we get rid of the flags at the python layer and have these options controlled by hsmparams.  e.g. if `nsig_rg > 0`, then this set `flag |= 0x4`, and if `nsig_rg2 > 0`, then set `flag |= 0x8`. For the first two, you could have a parameter `recompute_flux` which can be `None`, `sum` or `fit` perhaps.  Having users set a flag by hand without named bits.  And I think having an hsmparams object means we can make it so they don't ever have to.