def prepare_evt_gen(binned_t):
    global flux
    gamma.flux = flux
    gamma.prepare_evt_gen(binned_t)
    flux = gamma.flux
def prepare_evt_gen(binned_t):
    global flux
    gamma.flux = flux
    gamma.prepare_evt_gen(binned_t)
    flux = gamma.flux