예제 #1
0
def test_segname(segname):
    t0_sec = time()
    #sgs1 = SegGeometryStore()
    sg = sgs.Create(segname=segname)
    dt_sec = time() - t0_sec
    sg.print_seg_info(pbits=0o377)
    logger.info('Consumed time to create = %.6f sec' % dt_sec)
    test_mask(sg)
예제 #2
0
    def __init__(self, pname=None, pindex=None,\
                 oname=None, oindex=None,\
                 x0=0, y0=0, z0=0,\
                 rot_z=0, rot_y=0, rot_x=0,\
                 tilt_z=0, tilt_y=0, tilt_x=0,\
                 use_wide_pix_center=False): 

        self.pname  = pname
        self.pindex = pindex
        self.oname  = oname
        self.oindex = oindex
        self.set_geo_pars(x0, y0, z0, rot_z, rot_y, rot_x, tilt_z, tilt_y, tilt_x)
        self.algo = sgs.Create(segname=self.oname, pbits=0, use_wide_pix_center=use_wide_pix_center) # ex.: SegGeometryCspad2x1V1(...)

        # ---- 2-nd stage
        self.parent = None
        self.list_of_children = []
예제 #3
0
    if tname in ('0', '4'): s += '\n 4 - EPIX10KA:V1'
    if tname in ('0', '5'): s += '\n 5 - JUNGFRAU:V1'
    if tname in ('0', '6'): s += '\n 6 - JUNGFRAU:V2'
    if tname in ('0', '7'): s += '\n 7 - MTRX:512:512:54:54'
    if tname in ('0', '8'): s += '\n 8 - MTRX:V2:512:512:54:54'
    if tname in ('0', '9'): s += '\n 9 - EPIXHR2X2:V1'
    if tname in ('0', '10'): s += '\n10 - ABRACADABRA:V1'
    return s


tname = sys.argv[1] if len(sys.argv) > 1 else '0'
if len(sys.argv) == 1: logger.info(usage())
elif (tname == '1'): sg = test_segname('SENS2X1:V1')
elif (tname == '2'): sg = test_segname('EPIX100:V1')
elif (tname == '3'): sg = test_segname('PNCCD:V1')
elif (tname == '4'): sg = test_segname('EPIX10KA:V1')
elif (tname == '5'): sg = test_segname('JUNGFRAU:V1')
elif (tname == '6'): sg = test_segname('JUNGFRAU:V2')
elif (tname == '7'): sg = test_segname('MTRX:512:512:54:54')
elif (tname == '8'): sg = test_segname('MTRX:V2:512:512:54:54')
elif (tname == '9'): sg = test_segname('EPIXHR2X2:V1')
elif (tname == '10'):
    sg = sgs.Create(segname='ABRACADABRA:V1')
    logger.info('Return for non-existent segment name: %s' % sg)
else:
    logger.warning('NON-EXPECTED TEST NAME: %s\n\n%s' % (tname, usage()))
if len(sys.argv) > 1: logger.info(usage(tname))
sys.exit('END OF TEST')

# EOF