예제 #1
0
    y_ranges8.append((-a - (b * (i - 1)) / it, -a - (b * i) / it))
    x_ranges8.append((a + (b * i) / it, a + b))

    x_ranges6.append((-a - (b * (i - 1)) / it, -a - (b * i) / it))
    y_ranges6.append((-a - (b * i) / it, -a - b))

    x_ranges7.append((a + (b * (i - 1)) / it, a + (b * i) / it))
    y_ranges7.append((-a - (b * i) / it, -a - b))

xlist = [x_ranges1, x_ranges2, x_ranges3, x_ranges4, x_ranges5, x_ranges6, x_ranges7, x_ranges8]
ylist = [y_ranges1, y_ranges2, y_ranges3, y_ranges4, y_ranges5, y_ranges6, y_ranges7, y_ranges8]


""" Now build your own world """
w = World(1)
# first build the left electrodes
i = 0
r = [0, 0, 185e-6]
for xr, yr in zip(x_ranges, y_ranges):
    i = i + 1
    w.add_electrode(str(i), xr, yr, "dc")
    w.dc_electrode_dict[str(i)].expand_in_multipoles(r)
    for xrp, yrp in zip(xlist[i - 1], ylist[i - 1]):
        w.dc_electrode_dict[str(i)].extend([[xrp, yrp]])


C = w.multipole_control_matrix(r, ["Ex", "Ey", "Ez", "U3"], r0=1e-3)

f = open("ringtrapboxapproxMartix.csv", "w")
for i in range(0, len(C[:, 1])):
예제 #2
0
        x_ranges4.append((-h * (i + 1), -(r**2 - (h * (i + 1))**2)**.5))
        x_ranges5.append((-h * (i + 1), -(r**2 - (h * (i + 1))**2)**.5))
        y_ranges6.append((-h * (i + 1), -(r**2 - (h * (i + 1))**2)**.5))
        y_ranges7.append((-h * (i + 1), -(r**2 - (h * (i + 1))**2)**.5))
        x_ranges8.append((h * (i + 1), (r**2 - (h * (i + 1))**2)**.5))

xlist = [
    x_ranges1, x_ranges2, x_ranges3, x_ranges4, x_ranges5, x_ranges6,
    x_ranges7, x_ranges8
]
ylist = [
    y_ranges1, y_ranges2, y_ranges3, y_ranges4, y_ranges5, y_ranges6,
    y_ranges7, y_ranges8
]
''' Now build your own world '''
w = World(1)
# first build the dc electrodes
i = 0
r = [0, 0, 185e-6]
for xr, yr in zip(x_ranges, y_ranges):
    i = i + 1
    w.add_electrode(str(i), xr, yr, 'dc')
    for xrp, yrp in zip(xlist[i - 1], ylist[i - 1]):
        w.dc_electrode_dict[str(i)].extend([[xrp, yrp]])
    w.dc_electrode_dict[str(i)].expand_in_multipoles(r)

C = w.multipole_control_matrix(r, ['Ex', 'Ey', 'U3', 'U4'],
                               r0=10**-3)  #compute the control matrix

#write control matrix to file
f = open('ringtrapCMartix.csv', 'w')
cx1 = -45.e-6
cx2 = 45.e-6

rfy1 = -5280.e-6
rfy2 = 9475.e-6

lx1 = -490.e-6
lx2 = -190.e-6
rx1 = 325.e-6
rx2 = 625.e-6

# y coords of the dc electrodes
y_ranges = 1e-6 * np.array([(0, 300.), (305., 605.), (610., 910.),
                            (915., 1215.), (1220., 1320.), (1325., 1625.),
                            (1630., 1930.), (1935., 2235), (2240., 2540.),
                            (2545., 2995.), (3000., 3450.)])
''' Now build your own world '''
w = World()
# first build the left electrodes
for num, yr in zip(range(1, 12), y_ranges):
    w.add_electrode(str(num), (lx1, lx2), yr, 'dc')
# now the right electrodes
for num, yr in zip(range(12, 23), y_ranges):
    w.add_electrode(str(num), (rx1, rx2), yr, 'dc')
# add the center
w.add_electrode('23', (cx1, cx2), (rfy1, rfy2), 'dc')
# add the RF
w.add_electrode('rf1', (smallrfx1, smallrfx2), (rfy1, rfy2), 'rf')
w.add_electrode('rf2', (bigrfx1, bigrfx2), (rfy1, rfy2), 'rf')
#w.drawTrap()
    y_ranges6.append((-a-(b*i)/it,-a-b))

    x_ranges7.append((a+(b*(i-1))/it,a+(b*i)/it))
    y_ranges7.append((-a-(b*i)/it,-a-b))
                
xlist = [x_ranges1,x_ranges2,x_ranges3,x_ranges4,x_ranges5,x_ranges6,x_ranges7,x_ranges8]
ylist = [y_ranges1,y_ranges2,y_ranges3,y_ranges4,y_ranges5,y_ranges6,y_ranges7,y_ranges8]  
  
 
    
    
    
    

''' Now build your own world '''
w = World(1)
# first build the left electrodes
i=0
r = [0,0,185e-6]
for xr, yr in zip( x_ranges, y_ranges):
    i=i+1
    w.add_electrode(str(i), xr, yr, 'dc')
    w.dc_electrode_dict[str(i)].expand_in_multipoles(r)
    for xrp, yrp in zip(xlist[i-1], ylist[i-1]):
        w.dc_electrode_dict[str(i)].extend( [[ xrp,yrp ]] )    


C = w.multipole_control_matrix(r,['Ex','Ey','Ez','U3'], r0=1e-3)
       
f=open('ringtrapboxapproxMartix.csv','w')
for i in range(0,len(C[:,1])):
예제 #5
0
        y_ranges7.append((-h*(i+1), -(r**2-(h*(i+1))**2)**.5)) 
        x_ranges8.append((h*(i+1), (r**2-(h*(i+1))**2)**.5))    


                
xlist = [x_ranges1,x_ranges2,x_ranges3,x_ranges4,x_ranges5,x_ranges6,x_ranges7,x_ranges8]
ylist = [y_ranges1,y_ranges2,y_ranges3,y_ranges4,y_ranges5,y_ranges6,y_ranges7,y_ranges8]  
  
 
    
    
    
    

''' Now build your own world '''
w = World(1)
# first build the dc electrodes
i=0
r = [0,0,185e-6]
for xr, yr in zip( x_ranges, y_ranges):
    i=i+1
    w.add_electrode(str(i), xr, yr, 'dc')
    for xrp, yrp in zip(xlist[i-1], ylist[i-1]):
        w.dc_electrode_dict[str(i)].extend( [[ xrp,yrp ]] )    
    w.dc_electrode_dict[str(i)].expand_in_multipoles(r)


C = w.multipole_control_matrix(r,['Ex','Ey','U3','U4'], r0=10**-3) #compute the control matrix
       
#write control matrix to file
f=open('ringtrapCMartix.csv','w')
예제 #6
0
y_ranges5 = (-r,r)
x_ranges6 = (r+l1,r+l1+l2)
y_ranges6 = (-r,r)
x_ranges7 = (-r,0)
y_ranges7 = (-r,-r-hb)
x_ranges8 = (0,r)
y_ranges8 = (-r,-r-hb)
x_ranges9 = (-r,r) 
y_ranges9 = (-r,r)

x_ranges.extend([x_ranges1,x_ranges2,x_ranges3,x_ranges4,x_ranges5,x_ranges6,x_ranges7,x_ranges8,x_ranges9])
y_ranges.extend([y_ranges1,y_ranges2,y_ranges3,y_ranges4,y_ranges5,y_ranges6,y_ranges7,y_ranges8,y_ranges9])


''' Now build your own world '''
w = World(1)
# first build the dc electrodes
i=0
r = [0,0,120e-6]

for xr, yr in zip(x_ranges, y_ranges):
    i=i+1
    w.add_electrode(str(i), xr, yr, 'dc')
    #for xrp, yrp in zip(xlist[i-1], ylist[i-1]):
    #        w.dc_electrode_dict[str(i)].extend( [[ xrp,yrp ]] )    
    w.dc_electrode_dict[str(i)].expand_in_multipoles(r)

C1 = w.multipole_control_matrix(r,['Ex','Ey','Ez','U1','U3'], r0=1e-3,shorted_electrodes = shorts) #compute the control matrix for section
if point_trap == 0:
    C2 = w.multipole_control_matrix(r,['Ex','Ey','Ez','U1','U3'], r0=1e-3,shorted_electrodes = shorts2)
    C = np.append(C1,C2,axis=0)
예제 #7
0
rx2 = 1250.e-6

# y coords of the dc electrodes
y_ranges = 1e-6*np.array([(0, 300.),
            (305., 605.),
            (610., 910.),
            (915., 1215.),
            (1220., 1320.),
            (1325., 1625.),
            (1630., 1930.),
            (1935., 2235),
            (2240., 2540.),
            (2545., 2995.),
            (3000., 3450.)
            ])

''' Now build your own world '''
w = World()
# first build the left electrodes
for num, yr in zip( range(1, 12), y_ranges):
    w.add_electrode(str(num), (lx1, lx2), yr, 'dc')
# now the right electrodes
for num, yr in zip( range(12, 23), y_ranges):
    w.add_electrode(str(num), (rx1, rx2), yr, 'dc')
# add the center
w.add_electrode('23', (cx1, cx2), (rfy1, rfy2), 'dc' )
# add the RF
w.add_electrode('rf1', (smallrfx1, smallrfx2), (rfy1, rfy2), 'rf')
w.add_electrode('rf2', (bigrfx1, bigrfx2), (rfy1, rfy2), 'rf')
w.drawTrap()
예제 #8
0
upper_y_edges = lower_y_edges + dy


#y-range tuples for the outer electrodes
yranges = list(map(lambda i: (lower_y_edges[i], upper_y_edges[i]), y_indices))

xrangeRight = (160*u,160*u + dx)
xrangeLeft = (-160*u - dx, -160*u)



#create a world object and start filling in electrodes
#axes_permutation = 1 means that y lies in the trap plane, and z is the normal
# direction (height)
FTrapWorld = World(axes_permutation=1)

#left electrodes, 1-10
for i in range(1, 11):
    yrange = yranges[i-1]
    FTrapWorld.add_electrode(str(i), xrangeLeft, yrange, 'dc')
    FTrapWorld.add_electrode(str(i+10), xrangeRight, yrange, 'dc')	
	
FTrapWorld.add_electrode('21', centerxRange, centeryRange, 'dc')
FTrapWorld.add_electrode('RF1', RF1xRange, RFyRange, 'rf')
FTrapWorld.add_electrode('RF2', RF2xRange, RFyRange, 'rf')

plt.ion()
FTrapWorld.drawTrap()