Commit 9e0fc099 authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto

agrego meds con camara

parent 98fe4007
INFO: Platform: linux
INFO: Version Info: v0.3.0
DEBUG: Log Path: cp.log
DEBUG: command: ['/home/liaf-ankylosaurus-admin/anaconda3/bin/python', '/home/liaf-ankylosaurus-admin/Documents/artiq/artiq_master/repository/Experiments/Spectrum/With_calibration/Motional/scan_roi_test.py']
DEBUG: file: None
DEBUG: pause: True
DEBUG: repl: /home/liaf-ankylosaurus-admin/anaconda3/bin/python
DEBUG: args: ['/home/liaf-ankylosaurus-admin/Documents/artiq/artiq_master/repository/Experiments/Spectrum/With_calibration/Motional/scan_roi_test.py']
INFO: return code: 1 (0x1)
INFO: elapsed time: 0.033690
from artiq.experiment import * #Imports everything from experiment library
from artiq.coredevice.ad9910 import ( #Imports RAM destination amplitude scale factor and RAM mode bidirectional ramp methods from AD9910 Source
RAM_DEST_ASF, RAM_MODE_BIDIR_RAMP, RAM_MODE_CONT_RAMPUP)
from numpy import load,sin,linspace,pi,array
import numpy as np
from time import sleep,time
# This code demonstrates use of the urukul RAM.
# It produces a 50 MHz square waveform attenuated
PORT = 60000
PASS = b'Secr3t Pa55W0rd'
from multiprocessing.connection import Client
class roitest(EnvExperiment):
'''Scan Roi Test'''
def build(self): #this code runs on the host computer
self.setattr_device("core") #sets core device drivers as attributes
self.setattr_device("ccb")
self.scan_time_step = self.get_argument(f"Scan time step" ,NumberValue(0.5 , min=0.01, max=60,unit="s") )
def run(self):
# print(self.am_freq)
# for am_delta in range(1000,5000,1000):
# parameters = get_urukul_params( self.am_freq + am_delta )
print("START")
self.create_datasets()
t0 = time()
address = ('localhost', PORT)
conn = Client(address, authkey=PASS)
sleep(0.1)
for jj in range(20):
conn.send(['rois'])
rta = conn.recv()
val = rta
print(f'{round(time()-t0,1)}: val({jj})={val}')
self.mutate_dataset("counts1", jj, val[0] )
self.mutate_dataset("counts2", jj, val[1] )
sleep(self.scan_time_step)
print("FFIIINNN")
@rpc
def create_datasets(self):
self.set_dataset("counts1" , np.zeros( 20 , dtype=int ), broadcast=True, archive=True)
self.set_dataset("counts2" , np.zeros( 20 , dtype=int ), broadcast=True, archive=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment