예제 #1
0
def test_2x2_img_easy() :
    pc2x2 = SegGeometryEpix100V1(use_wide_pix_center=False)
    X,Y = pc2x2.get_seg_xy_maps_pix_with_offset()
    iX, iY = (X+0.25).astype(int), (Y+0.25).astype(int)
    img = gg.getImageFromIndexArrays(iX,iY,iX+iY)
    gg.plotImageLarge(img, amp_range=(0, 1500), figsize=(8,10))
    gg.show()
예제 #2
0
def test_2x2_img_easy():
    pc2x2 = SegGeometryEpix100V1(use_wide_pix_center=False)
    X, Y = pc2x2.get_seg_xy_maps_pix_with_offset()
    iX, iY = (X + 0.25).astype(int), (Y + 0.25).astype(int)
    img = gg.getImageFromIndexArrays(iX, iY, iX + iY)
    gg.plotImageLarge(img, amp_range=(0, 1500), figsize=(8, 10))
    gg.show()
예제 #3
0
def test_mask(mbits=0377) :
    pc2x1 = SegGeometryMatrixV1()
    X, Y = pc2x1.get_seg_xy_maps_pix_with_offset()
    mask = pc2x1.pixel_mask_array(mbits)
    iX, iY = (X+0.25).astype(int), (Y+0.25).astype(int)
    img = gg.getImageFromIndexArrays(iX,iY,mask)
    gg.plotImageLarge(img, amp_range=(-1, 2), figsize=(8,10))
    gg.show()
예제 #4
0
def test_img_easy() :
    pc2x1 = SegGeometryMatrixV1()
    #X,Y = pc2x1.get_seg_xy_maps_pix()
    X,Y = pc2x1.get_seg_xy_maps_pix_with_offset()
    iX, iY = (X+0.25).astype(int), (Y+0.25).astype(int)
    img = gg.getImageFromIndexArrays(iX,iY,iX+iY)
    gg.plotImageLarge(img, amp_range=(0, 1100), figsize=(8,10))
    gg.show()
예제 #5
0
def test_mask(mbits=0377):
    pc2x1 = SegGeometryMatrixV1()
    X, Y = pc2x1.get_seg_xy_maps_pix_with_offset()
    mask = pc2x1.pixel_mask_array(mbits)
    iX, iY = (X + 0.25).astype(int), (Y + 0.25).astype(int)
    img = gg.getImageFromIndexArrays(iX, iY, mask)
    gg.plotImageLarge(img, amp_range=(-1, 2), figsize=(8, 10))
    gg.show()
예제 #6
0
def test_img_easy():
    pc2x1 = SegGeometryMatrixV1()
    #X,Y = pc2x1.get_seg_xy_maps_pix()
    X, Y = pc2x1.get_seg_xy_maps_pix_with_offset()
    iX, iY = (X + 0.25).astype(int), (Y + 0.25).astype(int)
    img = gg.getImageFromIndexArrays(iX, iY, iX + iY)
    gg.plotImageLarge(img, amp_range=(0, 1100), figsize=(8, 10))
    gg.show()
예제 #7
0
def test_2x2_mask(mbits=0377) :
    pc2x2 = SegGeometryEpix100V1(use_wide_pix_center=False)
    X, Y = pc2x2.get_seg_xy_maps_pix_with_offset()
    mask = pc2x2.pixel_mask_array(mbits)
    mask[mask==0]=3
    iX, iY = (X+0.25).astype(int), (Y+0.25).astype(int)
    img = gg.getImageFromIndexArrays(iX,iY,mask)
    gg.plotImageLarge(img, amp_range=(-1, 2), figsize=(8,10))
    gg.show()
예제 #8
0
def test_2x2_mask(mbits=0377):
    pc2x2 = SegGeometryEpix100V1(use_wide_pix_center=False)
    X, Y = pc2x2.get_seg_xy_maps_pix_with_offset()
    mask = pc2x2.pixel_mask_array(mbits)
    mask[mask == 0] = 3
    iX, iY = (X + 0.25).astype(int), (Y + 0.25).astype(int)
    img = gg.getImageFromIndexArrays(iX, iY, mask)
    gg.plotImageLarge(img, amp_range=(-1, 2), figsize=(8, 10))
    gg.show()
예제 #9
0
def test_2x1_mask(mbits=0377) :
    pc2x1 = SegGeometryCspad2x1V1(use_wide_pix_center=False)
    X, Y = pc2x1.get_seg_xy_maps_pix_with_offset()
    mask = pc2x1.pixel_mask_array(mbits)
    print 'mask:\n%s' % mask
    print 'mask.shape: ', mask.shape
    iX, iY = (X+0.25).astype(int), (Y+0.25).astype(int)
    img = gg.getImageFromIndexArrays(iX,iY,mask)
    gg.plotImageLarge(img, amp_range=(-1, 2), figsize=(8,10))
    gg.show()