File indexing completed on 2026-04-09 07:48:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 """
0022 Progressive sequencing, ie looking at the
0023 frequencies of steps as they develop as obtained
0024 by a step by step growing mask.
0025
0026 This is essentially just the same as SeqAna but with
0027 a progressive mask.
0028
0029
0030 """
0031 import logging, numpy as np
0032 log = logging.getLogger(__name__)
0033
0034 from opticks.ana.base import opticks_main
0035 from opticks.ana.nload import A
0036 from opticks.ana.nbase import count_unique_sorted
0037
0038 cusfmt_ = lambda cus:"\n".join(["%16x %8d " % (q, n) for q, n in cus])
0039 msk_ = lambda n:(1 << 4*(n+1)) - 1
0040
0041 if __name__ == '__main__':
0042 args = opticks_main(doc=__doc__, tag="1", src="torch", det="laser", c2max=2.0, tagoffset=0)
0043 np.set_printoptions(precision=4, linewidth=200, formatter={'int':hex})
0044
0045 log.info("tag %s src %s det %s c2max %s " % (args.utag,args.src,args.det, args.c2max))
0046
0047 dbg = False
0048 ph = A.load_("ph",args.src,args.utag,args.det,dbg, optional=True)
0049
0050 seqhis = ph[:,0,0]
0051
0052
0053 for i in range(10):
0054 msk = msk_(i)
0055 sqh = seqhis & msk
0056 isqh = count_unique_sorted(sqh)
0057 print "%16x --------------- " % msk
0058 print cusfmt_(isqh)
0059
0060
0061
0062