-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- bump :v1.0.2 - add warnings if parameters exceed their limits on device functions - change snAPI init for ipython - fix parseBool in read OpenFileDevice - fix a possible crash in TimeTrace if a channel number higher than possible number of channels - improve forcedStop - fixed Times for Marker with T3 Formats != Absolute - fix some uncategorized log entries - fix PH330 PQ_TAGID_TTRESULTFORMAT_TTTRRECTYPE - add library warnings on measure start Docu: - fix description of Unfold.dTime_T3() - fixed misleading correlation figure Python: - fix init snAPI for older python versions - fix returning array size for getCountRates() - improve Tool_PlotCountRateByTriggerLevel.py to plot all channels - fix dTimes in Demo_RecordViewer_UF - fixed isMarker() in Raw measure class - add Demo_HeraldedCorrelationG2.py
- Loading branch information
Showing
21 changed files
with
114 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from snAPI.Main import * | ||
import matplotlib | ||
matplotlib.use('TkAgg',force=True) | ||
from matplotlib import pyplot as plt | ||
print("Switched to:",matplotlib.get_backend()) | ||
import time | ||
|
||
if(__name__ == "__main__"): | ||
|
||
sn = snAPI(libType=LibType.MH) | ||
sn.getDeviceIDs() | ||
sn.getDevice() | ||
sn.initDevice(MeasMode.T2) | ||
|
||
# define the path for the T2 file | ||
sn.getFileDevice("E:\Data\PicoQuant\CW_Shelved.ptu") | ||
|
||
# define a gate window after the herald channel (1) for the detector channels (2 and 3), | ||
# starting at 100000 ps after the herald signal, with a gate length of 200000 ps | ||
heraldChans = sn.manipulators.herald(1, [2, 3], 100000, 200000) | ||
|
||
# initiate the g2 correlation with the time-gated channels | ||
sn.correlation.setG2Parameters(heraldChans[0],heraldChans[1], 500000, 100) | ||
sn.correlation.measure(100000,savePTU=False) | ||
|
||
while True: | ||
finished = sn.correlation.isFinished() | ||
data, bins = sn.correlation.getG2Data() | ||
time.sleep(.3) | ||
|
||
plt.clf() | ||
plt.plot(bins, data, linewidth=2.0, label='g(2)') | ||
plt.xlabel('Time [s]') | ||
plt.ylabel('g(2)') | ||
plt.legend() | ||
plt.title("g(2)") | ||
plt.pause(0.1) | ||
|
||
if finished: | ||
break | ||
|
||
plt.show(block=True) |
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
Binary file not shown.
Binary file renamed
BIN
+2.26 MB
dist/snAPI-1.0.1-cp311-cp311-win_amd64.whl → dist/snAPI-1.0.2-cp311-cp311-win_amd64.whl
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.