-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix improper cleanup on client disconnection (#9)
* fix improper cleanup on client disconnection * more spell corrections
- Loading branch information
1 parent
3246742
commit fcb8410
Showing
8 changed files
with
90 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"""RPC for Swabian Instruments' Time Tagger""" | ||
|
||
__version__ = '0.0.5' | ||
__version__ = '0.0.6' | ||
__author__ = 'Igor Shavrin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'Time Tagger RPC' | ||
copyright = '2021 Swabian Instruments GmbH' | ||
copyright = '2022 Swabian Instruments GmbH' | ||
author = 'Igor Shavrin <[email protected]>' | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import time | ||
|
||
from TimeTaggerRPC.client import createProxy | ||
|
||
with createProxy() as TT: | ||
|
||
print('TT', TT._pyroUri) | ||
|
||
# Find Time Taggers available at the remote system | ||
print('Available Time Taggers', TT.scanTimeTagger()) | ||
|
||
# Create Time Tagger | ||
with TT.createTimeTagger() as tagger: | ||
tagger.setTestSignal(1, True) | ||
tagger.setTestSignal(2, True) | ||
|
||
print('tagger', tagger._pyroUri, tagger.getSerial()) | ||
|
||
delayed_vch = TT.DelayedChannel(tagger, 2, 1000) | ||
DELAYED_CH = delayed_vch.getChannel() | ||
|
||
with TT.SynchronizedMeasurements(tagger) as sm: | ||
|
||
hist_list = list() | ||
for i in range(5): | ||
h = TT.Correlation(tagger, 1, DELAYED_CH, binwidth=10, n_bins=2000) | ||
print(f'hist_{i}', h._pyroUri) | ||
hist_list.append(h) | ||
sm.registerMeasurement(h) | ||
|
||
for i in range(5, 40): | ||
h = TT.Correlation(sm.getTagger(), 1, DELAYED_CH, binwidth=10, n_bins=2000) | ||
print(f'hist_{i}', h._pyroUri) | ||
hist_list.append(h) | ||
|
||
crate = TT.Countrate(tagger, [1, 2]) | ||
print('crate', crate._pyroUri) | ||
crate.clear() | ||
|
||
sm.startFor(int(1e12), clear=True) | ||
|
||
while sm.isRunning(): | ||
time.sleep(0.05) | ||
|
||
for h in hist_list: | ||
h._pyroRelease() | ||
|
||
print('Countrates', crate.getData()) | ||
|
||
|
||
|
||
print('Sleeping ...') | ||
time.sleep(1) |