desihub / desitest

Testing coordination for DESI code
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Add ZWARN statistics #19

Open londumas opened 6 years ago

londumas commented 6 years ago

I put this comment on the minitest, to keep track:

Another metric that would be very useful in QA, both for simulated and true data, would be a simple table, maybe after cell 58 about the different ZWARN flags. It would help track what are causing ZWARN flags to be nonzero It could simply be something of that kind:

import redrock.zwarning
flags = redrock.zwarning.ZWarningMask().flags

to_print = "FLAG "
for objtype in set(truth['TEMPLATETYPE']):
    to_print += objtype+' | '
print(to_print)
for objtype in set(truth['TEMPLATETYPE']):
    to_print = flags_name + ' | '
    for i in range(11):
        w = (dsq_z['TEMPLATETYPE']==objtype) & ((dsq_z['ZWARN']&2**i)>0)
        to_print += str(w.sum())+' | '
    print(to_print)