Startup
This commit is contained in:
Executable
+1
@@ -0,0 +1 @@
|
||||
ascan((SARUN02_MCRX080,SARUN02_MCRY080), (SARUN03_DBPM070), (-2.0,-2.0), (2.0,2.0), (5,5), 0.01)
|
||||
@@ -0,0 +1,15 @@
|
||||
prefix = "MINSB03-RSYS" # SINEG01-RSYS
|
||||
start = -175.0
|
||||
stop = 180.0
|
||||
step = 5.0
|
||||
|
||||
rf_phase_setpoint = ao1 # Channel(prefix + ":SET-VSUM-PHASE")
|
||||
rf_phase_readback = phase # Channel(prefix + ":GET-VSUM-PHASE")
|
||||
rf_ampl_readback = ai2 # Channel(prefix + ":GET-VSUM-AMPLT")
|
||||
bpm_q = bpm # SINEG01-DBPM340:Q1, SINEG01-DWCM170:Q_B1
|
||||
|
||||
r = lscan(rf_phase_setpoint, [rf_phase_readback, rf_ampl_readback, bpm_q], start, stop, step , latency=0.5)
|
||||
|
||||
plot(r.getReadable(2), xdata = r.getReadable(0), title = "data")
|
||||
|
||||
set_return(r.print())
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
|
||||
|
||||
#Simona test
|
||||
|
||||
#!/usr/bin/env python
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
# example data
|
||||
x = np.arange(0.1, 4, 0.5)
|
||||
y = np.exp(-x)
|
||||
|
||||
# example variable error bar values
|
||||
yerr = 0.1 + 0.2*np.sqrt(x)
|
||||
xerr = 0.1 + yerr
|
||||
|
||||
# First illustrate basic pyplot interface, using defaults where possible.
|
||||
plt.figure()
|
||||
plt.errorbar(x, y, xerr=0.2, yerr=0.4)
|
||||
plt.title("Simplest errorbars, 0.2 in x, 0.4 in y")
|
||||
|
||||
# Now switch to a more OO interface to exercise more features.
|
||||
fig, axs = plt.subplots(nrows=2, ncols=2, sharex=True)
|
||||
ax = axs[0,0]
|
||||
ax.errorbar(x, y, yerr=yerr, fmt='o')
|
||||
ax.set_title('Vert. symmetric')
|
||||
|
||||
# With 4 subplots, reduce the number of axis ticks to avoid crowding.
|
||||
ax.locator_params(nbins=4)
|
||||
|
||||
ax = axs[0,1]
|
||||
ax.errorbar(x, y, xerr=xerr, fmt='o')
|
||||
ax.set_title('Hor. symmetric')
|
||||
|
||||
ax = axs[1,0]
|
||||
ax.errorbar(x, y, yerr=[yerr, 2*yerr], xerr=[xerr, 2*xerr], fmt='--o')
|
||||
ax.set_title('H, V asymmetric')
|
||||
|
||||
ax = axs[1,1]
|
||||
ax.set_yscale('log')
|
||||
# Here we have to be careful to keep all y values positive:
|
||||
ylower = np.maximum(1e-2, y - yerr)
|
||||
yerr_lower = y - ylower
|
||||
|
||||
ax.errorbar(x, y, yerr=[yerr_lower, 2*yerr], xerr=xerr,
|
||||
fmt='o', ecolor='g', capthick=2)
|
||||
ax.set_title('Mixed sym., log y')
|
||||
|
||||
fig.suptitle('Variable errorbars')
|
||||
|
||||
plt.show()
|
||||
|
||||
Reference in New Issue
Block a user