This commit is contained in:
@@ -8,6 +8,12 @@ import ch.psi.pshell.crlogic.CrlogicPositioner as CrlogicPositioner
|
||||
import ch.psi.pshell.crlogic.CrlogicSensor as CrlogicSensor
|
||||
|
||||
|
||||
#Libraries
|
||||
#import Jama.Matrix
|
||||
#sys.path.append('/Users/gobbo_a/dev/pshell/config/home/script/Lib/diffcalc')
|
||||
|
||||
|
||||
|
||||
crlogic_config = {}
|
||||
crlogic_config["class"] = "ch.psi.pshell.crlogic.CrlogicScan"
|
||||
crlogic_config["prefix"] = "MTEST-HW3-CRL"
|
||||
@@ -105,7 +111,8 @@ class SimulatedInput(Readable):
|
||||
sout = SimulatedOutput()
|
||||
sinp = SimulatedInput()
|
||||
|
||||
|
||||
for m in mu, delta, gam, eta, chi, phi:
|
||||
m.setSpeed(m.config.defaultSpeed)
|
||||
#Controler Evenrt Listener
|
||||
|
||||
|
||||
@@ -283,9 +290,9 @@ get_context().dataManager.setLayout(DataLayout())
|
||||
"""
|
||||
|
||||
|
||||
#run("CPython/wrapper")
|
||||
run("CPython/wrapper")
|
||||
|
||||
class SimulatedImage(ReadonlyRegisterBase, ReadonlyRegisterMatrix):
|
||||
class SimulatedImage(ReadonlyRegisterBase, ReadonlyRegisterMatrix, ReadableCalibratedMatrix):
|
||||
def __init__(self, size_x=1280, size_y=960, number_of_dead_pixels=100, noise=0.1, beam_size_x=100, beam_size_y=20):
|
||||
self.size_x, self.size_y, self.number_of_dead_pixels, self.noise, self.beam_size_x, self.beam_size_y = \
|
||||
size_x, size_y, number_of_dead_pixels, noise, beam_size_x, beam_size_y
|
||||
@@ -303,8 +310,11 @@ class SimulatedImage(ReadonlyRegisterBase, ReadonlyRegisterMatrix):
|
||||
def getHeight(self):
|
||||
return self.height
|
||||
|
||||
add_device(RegisterMatrixSource("sim", SimulatedImage()), True)
|
||||
sim.polling = -250
|
||||
def getCalibration(self):
|
||||
return MatrixCalibration(-1.0, 1.0, 0.0, 0.0)
|
||||
|
||||
#add_device(RegisterMatrixSource("sim", SimulatedImage()), True)
|
||||
#sim.polling = -250
|
||||
|
||||
|
||||
|
||||
@@ -503,6 +513,7 @@ class ScalarDevice(RegisterBase):
|
||||
def test(self):
|
||||
self.setCache(1.0, None)
|
||||
|
||||
"""
|
||||
add_device(ArrayDevice("scan_pos"), True)
|
||||
add_device(ArrayDevice("scan_val"), True)
|
||||
add_device(ScalarDevice("scan_start"), True)
|
||||
@@ -532,7 +543,7 @@ scan_val.set([0.0,] * MAX_ARRAY_DEV_SIZE )
|
||||
|
||||
|
||||
#cas6= CAS("PSHELL:var",sin)
|
||||
|
||||
"""
|
||||
|
||||
def plot_numpy_array(na, title = None):
|
||||
plot( Convert.reshape(na.getData(),na.getDimensions()),title=title)
|
||||
|
||||
Reference in New Issue
Block a user