Skip to content

Commit

Permalink
add update to i01
Browse files Browse the repository at this point in the history
  • Loading branch information
RNO-G committed Dec 11, 2023
1 parent 848d6fd commit 2d867dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
18 changes: 8 additions & 10 deletions examples/get_sample_timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,23 @@
print('skipping lab ',i)
continue
lab=i
print(lab)
#dump strobes
dev.labc.scan_dump(lab)
#dev.labc.scan_dump(lab)
freq=510
dev.calSelect(int(lab/4))
dev.radsig.enable(False)
#dev.radsig.enable(False)
dev.radsig.signal(pulse=False,band = (2 if freq>100 else 0))
dev.calib.updatePedestals()
#dev.calib.updatePedestals()
dev.radsig.enable(True)
dev.radsig.setFrequency(freq)
t=dev.calib.getTimeRun(freq*1e6,verbose=False)
print('time through fast samples = %0.3f'%(np.sum(t[lab][0:127])/1000),' ns')
print('time through all samples = %0.3f'%(np.sum(t[lab][0:128])/1000),' ns')
print('seam sample = %0.3f'%t[lab][0],' ps')
print('slow sample = %0.3f'%t[lab][127], ' ps')
print('avg of middle samples = %0.3f'%np.mean(t[lab][1:127]),' ps')
#print('time through fast samples = %0.3f'%(np.sum(t[lab][0:127])/1000),' ns')
#print('time through all samples = %0.3f'%(np.sum(t[lab][0:128])/1000),' ns')
print('lab %i : seam %0.2f, slow %0.2f, mean %0.2f ps'%(lab,t[lab][0],t[lab][127],np.mean(t[lab][1:127])))
#print('slow sample = %0.3f'%t[lab][127], ' ps')
#print('avg of middle samples = %0.3f'%np.mean(t[lab][1:127]),' ps')
np.savez('timing_data/lab_%i.npz'%lab,timing=t[lab][0:128])
time.sleep(0.2)
print()

dev.calSelect()
dev.radsig.enable(False)
Expand Down
3 changes: 2 additions & 1 deletion examples/i01_setup_radiant.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
dev.calib.resetCalib()
dna = dev.dna()
dev.calib.load(dna)

for i in range(24):
dev.labc.update(i)
dev.labc.testpattern_mode(False)

dev.calram.zero()
Expand Down

1 comment on commit 2d867dd

@fschlueter
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to comment on this here. I think this changes to i01_setup_radiant.py are already included in the corresponding code of the stationrc branch because we add it to the calib.load function

Please sign in to comment.