├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── CPP ├── snAPI64.dll ├── snAPI64.lib └── snAPI_lib.h ├── EnableTerminalColors.reg ├── LICENSE ├── README.md ├── demos ├── Demo_CoincidenceTimestamps.py ├── Demo_CorrelationFCS.py ├── Demo_CorrelationG2.py ├── Demo_DeviceConfig.py ├── Demo_HW_Start.py ├── Demo_HW_StartGated.py ├── Demo_HW_StartStop.py ├── Demo_HeraldedCorrelationG2.py ├── Demo_HistogramRefresh.py ├── Demo_HistogramSimple.py ├── Demo_RecordViewer_Raw.py ├── Demo_RecordViewer_UF.py ├── Demo_TimeTrace.py ├── Demo_TimeTrace_Coincidence.py ├── Demo_WR_Configure_Master.py ├── Demo_WR_Configure_Slave.py ├── Demo_WR_TimeTrace_Master.py ├── Demo_WR_TimeTrace_Slave.py ├── config │ ├── HH.ini │ ├── MH.ini │ ├── PH330_CFD.ini │ ├── PH330_Edge.ini │ ├── TH260N.ini │ ├── TH260P.ini │ └── device.ini └── g2_from_file.py ├── dist ├── snAPI-1.0.7-cp36-cp36m-win_amd64.whl ├── snAPI-1.0.7-cp37-cp37m-win_amd64.whl ├── snAPI-1.0.7-pp37-pypy37_pp73-win_amd64.whl ├── snapi-1.0.7-cp310-cp310-win_amd64.whl ├── snapi-1.0.7-cp311-cp311-win_amd64.whl ├── snapi-1.0.7-cp312-cp312-win_amd64.whl ├── snapi-1.0.7-cp313-cp313-win_amd64.whl ├── snapi-1.0.7-cp38-cp38-win_amd64.whl ├── snapi-1.0.7-cp39-cp39-win_amd64.whl ├── snapi-1.0.7-pp310-pypy310_pp73-win_amd64.whl ├── snapi-1.0.7-pp311-pypy311_pp73-win_amd64.whl ├── snapi-1.0.7-pp38-pypy38_pp73-win_amd64.whl ├── snapi-1.0.7-pp39-pypy39_pp73-win_amd64.whl └── snapi-1.0.7.tar.gz ├── docs ├── .nojekyll ├── _images │ ├── 01_Histogram.png │ ├── 01_Histogram_dark.png │ ├── 02_TimeTrace.png │ ├── 02_TimeTrace_dark.png │ ├── 03_Correlation_Antibunching.png │ ├── 03_Correlation_Antibunching_dark.png │ ├── 03_Correlation_Bunching.png │ ├── 03_Correlation_Bunching_dark.png │ ├── 04_Coincidence.png │ ├── 04_Coincidence_02.png │ ├── 04_Coincidence_dark.png │ ├── 05_Delay.png │ ├── 05_Delay_02.png │ ├── 05_Delay_dark.png │ ├── 06_Merge.png │ ├── 06_Merge_02.png │ ├── 06_Merge_dark.png │ ├── 07_Herald.png │ ├── 07_Herald_02.png │ ├── 07_Herald_dark.png │ ├── 08_snAPI_Flow.png │ ├── 08_snAPI_Flow_dark.png │ ├── DB-25.png │ ├── DE-15.png │ ├── G2_Correlation.png │ ├── Histogram.png │ ├── Log.png │ ├── T2_mode.jpg │ ├── T3_mode.jpg │ ├── TimeTrace.png │ ├── VSCode.png │ ├── coincidence.png │ ├── delay.png │ ├── herald.png │ ├── heralded.png │ └── snAPI_Flow.png ├── _sources │ ├── config.rst.txt │ ├── controlConnector.rst.txt │ ├── hardware.controlConnector.rst.txt │ ├── hardware.rst.txt │ ├── index.rst.txt │ ├── install.rst.txt │ ├── introduction.rst.txt │ ├── snAPI.Constants.rst.txt │ ├── snAPI.Main.rst.txt │ ├── snAPI.Utils.rst.txt │ ├── snAPI.rst.txt │ └── tttr data format.rst.txt ├── _sphinx_design_static │ ├── design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css │ ├── design-tabs.js │ └── sphinx-design.min.css ├── _static │ ├── 01_Histogram.png │ ├── 01_Histogram_dark.png │ ├── 02_TimeTrace.png │ ├── 02_TimeTrace_dark.png │ ├── 03_Correlation_Antibunching.png │ ├── 03_Correlation_Antibunching_dark.png │ ├── 03_Correlation_Bunching.png │ ├── 03_Correlation_Bunching_dark.png │ ├── 04_Coincidence.png │ ├── 04_Coincidence_02.png │ ├── 04_Coincidence_dark.png │ ├── 05_Delay.png │ ├── 05_Delay_02.png │ ├── 05_Delay_dark.png │ ├── 06_Merge.png │ ├── 06_Merge_02.png │ ├── 06_Merge_dark.png │ ├── 07_Herald.png │ ├── 07_Herald_02.png │ ├── 07_Herald_dark.png │ ├── 08_snAPI_Flow.png │ ├── 08_snAPI_Flow_dark.png │ ├── Coincidence.png │ ├── Coincidence_dark.png │ ├── Coioncidence.png │ ├── DB-25.png │ ├── DE-15.png │ ├── Delay.png │ ├── G2_Correlation.png │ ├── Herald.png │ ├── Heralded.png │ ├── Histogram.png │ ├── Log.png │ ├── MultiHarp-160.jpg │ ├── T2_mode.jpg │ ├── T3_mode.jpg │ ├── TimeTrace.png │ ├── VSCode.png │ ├── basic.css │ ├── design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css │ ├── design-tabs.js │ ├── doctools.js │ ├── documentation_options.js │ ├── favicon.ico │ ├── favicon.png │ ├── file.png │ ├── language_data.js │ ├── logo-dark.png │ ├── logo-light.png │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.js.LICENSE.txt │ │ ├── bootstrap.js.map │ │ ├── fontawesome.js │ │ ├── fontawesome.js.LICENSE.txt │ │ ├── fontawesome.js.map │ │ ├── pydata-sphinx-theme.js │ │ └── pydata-sphinx-theme.js.map │ ├── searchtools.js │ ├── snAPI_Flow.png │ ├── sphinx-design.min.css │ ├── sphinx_highlight.js │ ├── styles │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── pydata-sphinx-theme.css │ │ ├── pydata-sphinx-theme.css.map │ │ └── theme.css │ ├── vendor │ │ └── fontawesome │ │ │ ├── 6.1.2 │ │ │ ├── LICENSE.txt │ │ │ ├── css │ │ │ │ └── all.min.css │ │ │ └── webfonts │ │ │ │ ├── fa-brands-400.ttf │ │ │ │ ├── fa-brands-400.woff2 │ │ │ │ ├── fa-regular-400.ttf │ │ │ │ ├── fa-regular-400.woff2 │ │ │ │ ├── fa-solid-900.ttf │ │ │ │ ├── fa-solid-900.woff2 │ │ │ │ ├── fa-v4compatibility.ttf │ │ │ │ └── fa-v4compatibility.woff2 │ │ │ ├── 6.5.2 │ │ │ ├── LICENSE.txt │ │ │ ├── css │ │ │ │ └── all.min.css │ │ │ ├── js │ │ │ │ ├── all.min.js │ │ │ │ └── all.min.js.LICENSE.txt │ │ │ └── webfonts │ │ │ │ ├── fa-brands-400.ttf │ │ │ │ ├── fa-brands-400.woff2 │ │ │ │ ├── fa-regular-400.ttf │ │ │ │ ├── fa-regular-400.woff2 │ │ │ │ ├── fa-solid-900.ttf │ │ │ │ ├── fa-solid-900.woff2 │ │ │ │ ├── fa-v4compatibility.ttf │ │ │ │ └── fa-v4compatibility.woff2 │ │ │ └── webfonts │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff2 │ │ │ ├── fa-solid-900.ttf │ │ │ └── fa-solid-900.woff2 │ └── webpack-macros.html ├── config.html ├── controlConnector.html ├── genindex.html ├── hardware.controlConnector.html ├── hardware.html ├── index.html ├── install.html ├── introduction.html ├── objects.inv ├── py-modindex.html ├── search.html ├── searchindex.js ├── snAPI.Constants.html ├── snAPI.Main.html ├── snAPI.Utils.html ├── snAPI.html └── tttr data format.html ├── snAPI ├── Constants.py ├── Main.py ├── PH330Lib.dll ├── Utils.py ├── __init__.py ├── hhlib64.dll ├── mhlib64.dll ├── snAPI64.dll ├── snAPI64.lib ├── snAPI_lib.h ├── system.ini └── th260lib64.dll ├── tools ├── Tool_PlotCountRateByTriggerLevel.py └── Tool_ReadPTU.py └── vids └── CountRateByTriggerLevel.mov /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Logfile** 24 | Add corresponding logfile from C:\data\PicoQuant\Logs . 25 | 26 | **Screenshots** 27 | If applicable, add screenshots to help explain your problem. 28 | 29 | **Additional context** 30 | Add any other context about the problem here. 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /CPP/snAPI64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/CPP/snAPI64.dll -------------------------------------------------------------------------------- /CPP/snAPI64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/CPP/snAPI64.lib -------------------------------------------------------------------------------- /CPP/snAPI_lib.h: -------------------------------------------------------------------------------- 1 | #ifndef _WIN32 2 | #define _stdcall 3 | #endif 4 | #include "snapi.h" 5 | 6 | /********** snAPI **********/ 7 | extern bool _stdcall initAPI(char* systemIni); 8 | extern void _stdcall exitAPI(); 9 | extern void _stdcall setLogLevel(int logLevel, bool onOff); 10 | extern void _stdcall logExternal(char* message); 11 | extern void _stdcall logError(char* message); 12 | extern bool _stdcall getDeviceIDs(char* names); 13 | extern bool _stdcall getDevice(char* name); 14 | extern void _stdcall closeDevice(bool all); 15 | extern bool _stdcall getFileDevice(char* path); 16 | extern bool _stdcall initDevice(int mode, int refsource); 17 | extern bool _stdcall loadIniConfig(char* fileName); 18 | extern void _stdcall setPTUFilePath(char* filePath); 19 | extern void _stdcall setIniConfig(char* iniData); 20 | extern int _stdcall getDeviceConfig(char* conf); 21 | extern int _stdcall getManisConfig(char* conf); 22 | extern int _stdcall getMeasDescription(char* conf); 23 | 24 | /********** Device **********/ 25 | extern bool _stdcall setInputHysteresis(int hystCode); 26 | extern bool _stdcall setTimingMode(int timingMode); 27 | extern bool _stdcall setStopOverflow(unsigned int stopCount); 28 | extern bool _stdcall setBinning(int binning); 29 | extern bool _stdcall setOffset(int offset); 30 | extern bool _stdcall setHistoLength(int lengthCode); 31 | extern bool _stdcall clearHistMem(); 32 | extern bool _stdcall setMeasControl(int measControl, int startEdge, int stopEdge); 33 | extern bool _stdcall setTriggerOutput(int trigOutput); 34 | 35 | // Sync 36 | extern bool _stdcall setSyncDiv(int div); 37 | extern bool _stdcall setSyncTrigMode(int syncTrigMode); 38 | extern bool _stdcall setSyncEdgeTrig(int trigLvlSync, int trigEdgeSync); 39 | extern bool _stdcall setSyncCFD(int discrLvlSync, int zeroXLvlSync); 40 | extern bool _stdcall setSyncChannelOffset(int syncChannelOffset); 41 | extern bool _stdcall setSyncChannelEnable(int syncChannelEnable); 42 | extern bool _stdcall setSyncDeadTime(int syncChannelEnable); 43 | 44 | // Channel 45 | extern bool _stdcall setInputTrigMode(int iChan, int trigMode); 46 | extern bool _stdcall setInputEdgeTrig(int iChan, int trigLvl, int trigEdge); 47 | extern bool _stdcall setInputCFD(int iChan, int discrLvl, int zeroXLvl); 48 | extern bool _stdcall setInputChannelOffset(int iChan, int chanOffs); 49 | extern bool _stdcall setInputChannelEnable(int iChan, int chanEna); 50 | extern bool _stdcall setInputDeadTime(int iChan, int deadTime); 51 | 52 | /********** Measurements **********/ 53 | extern void _stdcall getCountRates(int* syncRate, int* cntRates); 54 | extern void _stdcall getSyncPeriod(double* syncPeriod); 55 | extern bool _stdcall getHistogram(int tAcq, bool waitFinished, bool savePTU, unsigned int* data, bool* finished); 56 | extern void _stdcall setHistoT2RefChan(uint8_t iChan); 57 | extern void _stdcall setHistoT2BinWidth(uint64_t numBins); 58 | extern void _stdcall setHistoT2NumBins(uint64_t numBins); 59 | extern bool _stdcall getTimeTrace(int tAcq, bool waitFinished, bool savePTU, unsigned int* data, uint64_t* t0, bool* finished); 60 | extern void _stdcall setTimeTraceNumBins(int numBins); 61 | extern void _stdcall setTimeTraceHistorySize(double historySize); 62 | extern void _stdcall setG2Params(uint64_t startChannel, uint64_t clickChannel, double windowSize, double binWidth); 63 | extern void _stdcall setFCSParams(uint64_t startChannel, uint64_t clickChannel, uint64_t* numTaus, double startTime, double stopTime, uint64_t numBins); 64 | extern void _stdcall setFFCSParams(uint64_t startChannel, uint64_t clickChannel, uint64_t* numTaus, double startTime, double stopTime, uint64_t numBins); 65 | extern bool _stdcall getCorrelation(int tAcq, bool waitFinished, bool savePTU, double* data, double* bins, bool* finished); 66 | extern bool _stdcall rawMeasure(int tAcq, bool waitFinished, bool savePTU, unsigned int* data, unsigned long long* dataIdx, unsigned long long dataSize, bool* finished); 67 | extern bool _stdcall rawStartBlock(int tAcq, bool savePTU, unsigned int* data, unsigned long long dataSize, bool* finished); 68 | extern bool _stdcall rawGetBlock(unsigned int* data, unsigned long long* size); 69 | extern bool _stdcall stopMeasure(); 70 | extern bool _stdcall clearMeasure(); 71 | extern bool _stdcall ufMeasure(int tAcq, bool waitFinished, bool savePTU, unsigned long long* times, unsigned char* chans, unsigned long long* idx, unsigned long long dataSize, bool* finished); 72 | extern bool _stdcall ufStartBlock(int tAcq, bool savePTU, unsigned long long* time, unsigned char* chan, unsigned long long dataSize, bool* finished); 73 | extern bool _stdcall ufGetBlock(uint64_t* times, unsigned char* chans, unsigned long long* size); 74 | extern bool _stdcall getTimesFromChannelUF(unsigned char* channels, uint64_t* times, uint64_t* timesOut, int channel, size_t* size); 75 | 76 | /********** Manipulators **********/ 77 | extern int _stdcall getNumAllChans(void); 78 | extern void _stdcall clearManis(void); 79 | extern int _stdcall addMCoincidence(int* chans, int numChans, double windowTime, int mode, int time, bool keepChannels); 80 | extern int _stdcall addMMerge(int* chans, int numChans, bool keepChannels); 81 | extern int _stdcall addMDelay(int chan, double delayTime, bool keepChannel); 82 | extern int _stdcall addMHerald(uint8_t herald, int* chans, int32_t numChans, int32_t delayTime, int32_t windowTime, bool inverted, bool keepChannels); 83 | extern int _stdcall addMCountRate(double windowTime); 84 | extern bool _stdcall getMCountRates(int manisIdx, int* countRatess); 85 | 86 | /********** Marker **********/ 87 | extern bool _stdcall setMarkerEdges(int edge1, int edge2, int edge3, int edge4); 88 | extern bool _stdcall setMarkerEnable(int ena1, int ena2, int ena3, int ena4); 89 | extern bool _stdcall setMarkerHoldoffTime(int holdofftime); 90 | extern bool _stdcall setOflCompression(int holdtime); 91 | 92 | /********** HW-Filter **********/ 93 | extern bool _stdcall setRowEventFilter(int iRow, int timeRange, int matchCount, bool inverse, int useChans, int passChans); 94 | extern bool _stdcall enableRowEventFilter(int iRow, bool enable); 95 | extern bool _stdcall setMainEventFilterParams(int timeRange, int matchCount, bool inverse); 96 | extern bool _stdcall setMainEventFilterChannels(int iRow, int useChans, int passChans); 97 | extern bool _stdcall enableMainEventFilter(bool enable); 98 | extern bool _stdcall setFilterTestMode(bool testMode); 99 | extern bool _stdcall getRowFilteredRates(int* syncRate, int* countRates); 100 | extern bool _stdcall getMainFilteredRates(int* syncRate, int* countRates); 101 | 102 | /********** White Rabbit **********/ 103 | extern bool _stdcall WRabbitGetMAC(char* macAddr); 104 | extern bool _stdcall WRabbitSetMAC(char* macAddr); 105 | extern bool _stdcall WRabbitGetInitScript(char* script); 106 | extern bool _stdcall WRabbitSetInitScript(char* script); 107 | extern bool _stdcall WRabbitGetSFPData(char* sfpNames, int* dTxs, int* dRxs, int* alphas); 108 | extern bool _stdcall WRabbitSetSFPData(char* sfpNames, int* dTxs, int* dRxs, int* alphas); 109 | extern bool _stdcall WRabbitSetMode(int bootFromScript, int reinitWithMode, int mode); 110 | extern bool _stdcall WRabbitSetTime(uint64_t time); 111 | extern bool _stdcall WRabbitGetTime(uint64_t* time, uint32_t* subSec16ns); 112 | extern bool _stdcall WRabbitGetStatus(uint32_t* status); 113 | extern bool _stdcall WRabbitGetTermOutput(char* termOutput); 114 | extern bool _stdcall WRabbitInitLink(int onOff); -------------------------------------------------------------------------------- /EnableTerminalColors.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/EnableTerminalColors.reg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Disclaimer 2 | PicoQuant GmbH disclaims all warranties with regard to the supplied software and documentation including all implied warranties of merchantability 3 | and fitness for a particular purpose. In no case shall PicoQuant GmbH be liable for any direct, indirect or consequential damages or any material 4 | or immaterial damages whatsoever resulting from loss of data, time or profits; arising from use, inability to use, or performance of this software 5 | and associated documentation. 6 | 7 | License and Copyright Notice 8 | Along with the purchase of a PicoQuant TCSPC module with DLL option you have also purchased a license to use the snAPI software. You have not 9 | purchased any other rights to the software itself. The software is protected by copyright and intellectual property laws. You may not distribute 10 | the software to third parties or reverse engineer, decompile or disassemble the software or part thereof. You may use and modify demo code to 11 | create your own software. Original or modified demo code may be re–distributed, provided that the original disclaimer and copyright notes are 12 | not removed from it. Copyright of the manual and on–line documentation belongs to PicoQuant GmbH. No parts of it may be reproduced, translated 13 | or transferred to third parties without written permission of PicoQuant GmbH. 14 | Products and corporate names appearing in this software and associated documentation may or may not be registered trademarks or subject to 15 | copyrights of their respective owners. PicoQuant GmbH claims no rights to any such trademarks. They are used only for identification or explanation 16 | and to the owner’s benefit, without intent to infringe. 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # snAPI 2 | Our Snappy New API (short snAPI) is a powerful Python wrapper which enables seamless 3 | communication and configuration with PicoQuant Time Correlated Single Photon Counting 4 | Instruments (TCSPC devices). It harnesses the advantages of C++ for optimal speed and 5 | performance and bridges the gap between the high-speed capabilities of your PicoQuant 6 | TCSPC device and the ease of use and versatility of Python. 7 | 8 | ## Getting Started 9 | To get started with snAPI, follow the [Install](https://picoquant.github.io/snAPI/install.html) section of the online documentation. 10 | 11 | ## Questions and Answers 12 | If you have questions about snAPI visit the [Q&A](https://github.com/PicoQuant/snAPI/discussions/categories/q-a) section of this repository. 13 | 14 | ## Reporting Bugs 15 | If you encounter any bugs or issues while using snAPI, we appreciate your feedback. Please help us improve by reporting any problems you encounter. To report a bug, follow these steps: 16 | 17 | 1. Go to the [Issues](https://github.com/PicoQuant/snAPI/issues) section of this repository. 18 | 19 | 2. Click on the "New Issue" button. 20 | 21 | 3. Provide a clear and detailed description of the bug or issue you encountered. 22 | 23 | 4. If possible, include steps to reproduce the problem and any relevant error messages or logs. 24 | 25 | 5. Submit the issue, and we will review it as soon as possible. 26 | 27 | Your bug reports are welcome and will help us identify and address issues effectively. 28 | 29 | ## License 30 | This software is released under this [License](LICENSE). Please review the license file for more information. 31 | 32 | ## Disclaimer 33 | **Use snAPI at your own risk. We are not responsible for any damages or losses resulting from the use of this software.** 34 | 35 | https://github.com/PicoQuant/snAPI/assets/717502/4cce4620-5fd7-4152-b6d8-e92fd62d5ed5 36 | -------------------------------------------------------------------------------- /demos/Demo_CoincidenceTimestamps.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | 3 | if(__name__ == "__main__"): 4 | 5 | start = 0 6 | length = 10 7 | 8 | sn = snAPI() 9 | sn.getDevice() 10 | 11 | # offline processing: 12 | # sn.getFileDevice(r"E:\Data\PicoQuant\G2_T3_sameTTs.ptu") 13 | sn.initDevice(MeasMode.T2) 14 | 15 | # set the trigger level 16 | sn.loadIniConfig("config\MH.ini") 17 | 18 | #list of channels to build the coincidence from 19 | chans= [1,2] 20 | ciIndex = sn.manipulators.coincidence(chans, 1000, mode = CoincidenceMode.CountOnce, 21 | time = CoincidenceTime.Last, 22 | keepChannels=True) #set keepChannels to false to get the coincidences only 23 | # ciIndex is the 'channel number' where the coincidences are stored 24 | sn.logPrint(f"coincidence index: {ciIndex}") 25 | 26 | # block measurement for continuous (acqTime = 0 is until stop) measurement 27 | sn.unfold.startBlock(acqTime=1000, size=1024*1024*1024, savePTU=False) 28 | 29 | while(True): 30 | times, channels = sn.unfold.getBlock() 31 | 32 | if(len(times) > 9): 33 | sn.logPrint("new data block:") 34 | sn.logPrint(" channel | time tag") 35 | sn.logPrint("--------------------") 36 | 37 | # only print the first 10 time tags per block out 38 | # for performance reasons 39 | # but it here should all data be stored to disc 40 | for i in range(10): 41 | sn.logPrint(f"{channels[i]:9} | {times[i]:8}") 42 | 43 | 44 | # filter the time tags of coincidences 45 | ciTimes = sn.unfold.getTimesByChannel(ciIndex) 46 | sn.logPrint("new coincidence block:") 47 | sn.logPrint("time tag") 48 | sn.logPrint("--------") 49 | if len(ciTimes) > 9: 50 | for i in range(10): 51 | sn.logPrint(f"{ciTimes[i]:8}") 52 | 53 | 54 | if sn.unfold.finished.contents: 55 | break 56 | 57 | # if otherBreakCondition: 58 | sn.unfold.stopMeasure 59 | 60 | sn.logPrint("end") -------------------------------------------------------------------------------- /demos/Demo_CorrelationFCS.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | import time 7 | 8 | if(__name__ == "__main__"): 9 | 10 | sn = snAPI() 11 | sn.getDeviceIDs() 12 | sn.getFileDevice(r"D:\Data\PicoQuant\OpenCLTest\Atto655+Cy5_diff_FCS+FLCS_Conv.ptu") 13 | #sn.getDevice() 14 | sn.initDevice(MeasMode.T2) 15 | 16 | # set the configuration for your device type 17 | sn.loadIniConfig(r"config\MH.ini") 18 | 19 | # 1. shift the signals to max correlation max at tau = 0 20 | #sn.device.setInputChannelOffset(1, 1564) 21 | 22 | # 2. set windowSize and startTime 23 | sn.correlation.setFFCSParameters(1, 2, 1e6, 1e12, 100) 24 | sn.correlation.measure(2000,savePTU=False) 25 | 26 | while True: 27 | finished = sn.correlation.isFinished() 28 | data, bins = sn.correlation.getFCSData() 29 | time.sleep(.1) 30 | 31 | plt.clf() 32 | plt.plot(bins, data[0], linewidth=2.0, label='AA') 33 | plt.plot(bins, data[1], linewidth=2.0, label='AB') 34 | plt.plot(bins, data[2], linewidth=2.0, label='BB') 35 | plt.xlabel('Time [s]') 36 | plt.xscale('log') 37 | plt.ylabel('FCS') 38 | #plt.yscale('log') 39 | plt.legend() 40 | plt.title("FCS") 41 | plt.pause(0.1) 42 | 43 | if finished: 44 | break 45 | 46 | plt.show(block=True) 47 | -------------------------------------------------------------------------------- /demos/Demo_CorrelationG2.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | import time 7 | 8 | if(__name__ == "__main__"): 9 | 10 | sn = snAPI() 11 | sn.getDeviceIDs() 12 | #sn.getDevice() 13 | sn.getFileDevice(r"D:\Data\PicoQuant\CW_Shelved.ptu") # T2 File 14 | sn.initDevice(MeasMode.T2) 15 | 16 | # set the configuration for your device type 17 | sn.loadIniConfig("config\MH.ini") 18 | 19 | # 1. shift the signals to max correlation max at tau = 0 20 | #sn.device.setInputChannelOffset(1, 1588) 21 | 22 | # 2. set windowSize and startTime 23 | sn.correlation.setG2Parameters(1, 2, 50000, 50) 24 | sn.correlation.measure(1000,savePTU=False) 25 | 26 | while True: 27 | finished = sn.correlation.isFinished() 28 | data, bins = sn.correlation.getG2Data() 29 | time.sleep(.3) 30 | 31 | plt.clf() 32 | plt.plot(bins, data, linewidth=2.0, label='g(2)') 33 | plt.xlabel('Time [s]') 34 | plt.ylabel('g(2)') 35 | plt.legend() 36 | plt.title("g(2)") 37 | plt.pause(0.1) 38 | 39 | if finished: 40 | break 41 | 42 | plt.show(block=True) 43 | -------------------------------------------------------------------------------- /demos/Demo_DeviceConfig.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | 3 | if(__name__ == "__main__"): 4 | 5 | # set the library for your device type 6 | sn = snAPI() 7 | sn.getDevice() 8 | sn.initDevice() 9 | 10 | # set the configuration for your device type 11 | sn.loadIniConfig("config\MH.ini") 12 | 13 | # print complete device config structure 14 | sn.logPrint(json.dumps(sn.deviceConfig, indent=2)) 15 | sn.logPrint() 16 | 17 | # device serial number (name) 18 | sn.logPrint("----------------------------------------------") 19 | sn.logPrint("Serial Number:", sn.deviceConfig["ID"]) 20 | 21 | # trigger/ discriminator level of all channels 22 | sn.logPrint("----------------------------------------------") 23 | for channel in sn.deviceConfig["ChansCfg"]: 24 | if channel["TrigMode"] == "Edge": 25 | sn.logPrint("Chan", channel["Index"], "- TrigLvl:", channel["TrigLvl"]) 26 | elif channel["TrigMode"] == "CFD": 27 | sn.logPrint("Chan", channel["Index"], "- DiscrLvl :", channel["DiscrLvl"]) 28 | 29 | # print enable state channel 2 (this is the second channel - the first one has index 0) 30 | sn.logPrint("----------------------------------------------") 31 | sn.logPrint("Chan 2:", "enabled" if sn.deviceConfig["ChansCfg"][1]["ChanEna"] else "disabled") 32 | -------------------------------------------------------------------------------- /demos/Demo_HW_Start.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | 7 | 8 | if(__name__ == "__main__"): 9 | 10 | sn = snAPI() 11 | sn.getDevice() 12 | sn.initDevice(MeasMode.T2) 13 | 14 | # a trigger signal on C1 starts the measurement 15 | sn.device.setMeasControl(MeasControl.C1StartCtcStop) 16 | sn.loadIniConfig("config\MH.ini") 17 | 18 | # configure timetrace 19 | sn.timeTrace.setNumBins(10000) 20 | sn.timeTrace.setHistorySize(10) 21 | # prepare measurement for triggered start (stop after 10s) 22 | sn.timeTrace.measure(10000, waitFinished=False, savePTU=False) 23 | 24 | plt.figure(f'Figure: {sn.deviceConfig["Model"]}') 25 | while True: 26 | finished = sn.timeTrace.isFinished() 27 | counts, times = sn.timeTrace.getData() 28 | plt.clf() 29 | plt.plot(times, counts[0], linewidth=2.0, label='sync') 30 | for c in range(1, 1+sn.deviceConfig["NumChans"]): 31 | plt.plot(times, counts[c], linewidth=2.0, label=f'chan{c}') 32 | 33 | plt.xlabel('Time [s]') 34 | plt.ylabel('Counts[Cts/s]') 35 | plt.legend() 36 | plt.title(f'TimeTrace Master {sn.deviceConfig["ID"]}') 37 | plt.pause(0.1) 38 | 39 | if finished: 40 | break 41 | 42 | plt.show(block=True) 43 | -------------------------------------------------------------------------------- /demos/Demo_HW_StartGated.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | 7 | 8 | if(__name__ == "__main__"): 9 | 10 | sn = snAPI() 11 | sn.getDevice() 12 | sn.initDevice(MeasMode.T2) 13 | 14 | # a trigger signal on C1 starts and holds the measurement 15 | # a low to high slope starts the measurement until the signal on the control connector Pin C1 16 | # is getting low again. 17 | sn.device.setMeasControl(MeasControl.C1Gated, 1, 0) 18 | sn.loadIniConfig("config\MH.ini") 19 | 20 | # configure timetrace 21 | sn.timeTrace.setNumBins(10000) 22 | sn.timeTrace.setHistorySize(10) 23 | # prepare measurement for triggered start (stop after 10s) 24 | sn.timeTrace.measure(10000, waitFinished=False, savePTU=False) 25 | 26 | plt.figure(f'Figure: {sn.deviceConfig["Model"]}') 27 | while True: 28 | finished = sn.timeTrace.isFinished() 29 | counts, times = sn.timeTrace.getData() 30 | plt.clf() 31 | plt.plot(times, counts[0], linewidth=2.0, label='sync') 32 | for c in range(1, 1+sn.deviceConfig["NumChans"]): 33 | plt.plot(times, counts[c], linewidth=2.0, label=f'chan{c}') 34 | 35 | plt.xlabel('Time [s]') 36 | plt.ylabel('Counts[Cts/s]') 37 | plt.legend() 38 | plt.title(f'TimeTrace Master {sn.deviceConfig["ID"]}') 39 | plt.pause(0.1) 40 | 41 | if finished: 42 | break 43 | 44 | plt.show(block=True) 45 | -------------------------------------------------------------------------------- /demos/Demo_HW_StartStop.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | 7 | if(__name__ == "__main__"): 8 | 9 | sn = snAPI() 10 | sn.getDevice() 11 | sn.initDevice(MeasMode.T2) 12 | 13 | # a trigger signal on C1 starts and one on C2 stops the measurement 14 | sn.device.setMeasControl(MeasControl.C1StartC2Stop) 15 | sn.loadIniConfig("config\MH.ini") 16 | 17 | # configure timetrace 18 | sn.timeTrace.setNumBins(10000) 19 | sn.timeTrace.setHistorySize(10) 20 | # prepare measurement for triggered start and stop 21 | sn.timeTrace.measure(waitFinished=False, savePTU=False) 22 | 23 | plt.figure(f'Figure: {sn.deviceConfig["Model"]}') 24 | while True: 25 | finished = sn.timeTrace.isFinished() 26 | counts, times = sn.timeTrace.getData() 27 | plt.clf() 28 | plt.plot(times, counts[0], linewidth=2.0, label='sync') 29 | for c in range(1, 1+sn.deviceConfig["NumChans"]): 30 | plt.plot(times, counts[c], linewidth=2.0, label=f'chan{c}') 31 | 32 | plt.xlabel('Time [s]') 33 | plt.ylabel('Counts[Cts/s]') 34 | plt.legend() 35 | plt.title(f'TimeTrace Master {sn.deviceConfig["ID"]}') 36 | plt.pause(0.1) 37 | 38 | if finished: 39 | break 40 | 41 | plt.show(block=True) 42 | -------------------------------------------------------------------------------- /demos/Demo_HeraldedCorrelationG2.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | import time 7 | 8 | if(__name__ == "__main__"): 9 | 10 | sn = snAPI() 11 | sn.getDeviceIDs() 12 | sn.getDevice() 13 | sn.initDevice(MeasMode.T2) 14 | sn.loadIniConfig("config\MH.ini") 15 | 16 | windowSize = 2000 #ps 17 | # move the histograms of the both channels to the same time after the sync to filter both at once 18 | sn.device.setInputChannelOffset(0,-4000) 19 | 20 | # measure the count rate before the herald filter 21 | CrInIdx = sn.manipulators.countrate() 22 | 23 | # define a gate window after the herald channel 0 (sync) for the detector channels 1 and 2, 24 | # starting at 52000 ps after the herald signal , with a gate length of windowSize (300 ps) 25 | heraldChans = sn.manipulators.herald(0, [1,2], 46000, windowSize, inverted=False, keepChannels=True ) 26 | 27 | # measure the count rate after the herald filter 28 | CrOutIdx = sn.manipulators.countrate() 29 | 30 | # initiate the g2 correlation with the time-gated channels 31 | sn.correlation.setG2Parameters(heraldChans[0], heraldChans[1], windowSize, 1) 32 | sn.correlation.measure(10000,savePTU=False) 33 | 34 | while True: 35 | finished = sn.correlation.isFinished() 36 | data, bins = sn.correlation.getG2Data() 37 | 38 | CRin = sn.manipulators.getCountrates(CrInIdx) 39 | CRout = sn.manipulators.getCountrates(CrOutIdx) 40 | 41 | # print the count rates 42 | sn.logPrint(f"CR in: {CRin[1]}, {CRin[2]} - out: {CRout[heraldChans[0]]}, {CRout[heraldChans[1]]}") 43 | 44 | time.sleep(.3) 45 | 46 | plt.clf() 47 | plt.plot(bins, data, linewidth=2.0, label='g(2)') 48 | plt.xlabel('Time [s]') 49 | plt.ylabel('g(2)') 50 | plt.legend() 51 | plt.title("g(2)") 52 | plt.pause(0.1) 53 | 54 | if finished: 55 | break 56 | 57 | plt.show(block=True) 58 | -------------------------------------------------------------------------------- /demos/Demo_HistogramRefresh.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | from threading import Timer 7 | import time 8 | 9 | if(__name__ == "__main__"): 10 | 11 | sn = snAPI() 12 | sn.getDevice() 13 | sn.initDevice() 14 | 15 | # temporarily enable logging of configuration 16 | sn.setLogLevel(LogLevel.Config, True) 17 | # set the configuration for your device type 18 | sn.loadIniConfig("config\MH.ini") 19 | sn.setLogLevel(LogLevel.Config, False) 20 | 21 | # change histogram parameter in T2 mode 22 | #sn.histogram.setRefChannel(0) 23 | #sn.histogram.setBinWidth(5) 24 | #sn.histogram.setNumBins(65536) 25 | sn.histogram.measure(acqTime=1000, waitFinished=False, savePTU=True) 26 | 27 | while True: 28 | finished = sn.histogram.isFinished() 29 | data, bins = sn.histogram.getData() 30 | 31 | # 1s refresh time 32 | plt.pause(1) 33 | plt.clf() 34 | plt.plot(bins, data[0], linewidth=2.0, label='sync') 35 | for c in range(1, 1+sn.deviceConfig["NumChans"]): 36 | plt.plot(bins, data[c], linewidth=2.0, label=f'chan{c}') 37 | 38 | plt.yscale('log') 39 | plt.xlabel('Time [ps]') 40 | plt.ylabel('Counts') 41 | plt.legend() 42 | plt.title("Histogram") 43 | 44 | # clear measure data 45 | sn.histogram.clearMeasure() 46 | if finished: 47 | break 48 | 49 | plt.show(block=True) 50 | -------------------------------------------------------------------------------- /demos/Demo_HistogramSimple.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | 7 | if(__name__ == "__main__"): 8 | 9 | # select the device library 10 | sn = snAPI() 11 | # get first available device 12 | sn.getDevice() 13 | sn.setLogLevel(logLevel=LogLevel.DataFile, onOff=True) 14 | 15 | #initialize the device 16 | sn.initDevice(MeasMode.T2) 17 | 18 | # set the configuration for your device type 19 | sn.loadIniConfig("config\MH.ini") 20 | 21 | sn.histogram.setRefChannel(0) 22 | sn.histogram.setBinWidth(5) 23 | sn.histogram.setNumBins(100000) 24 | # start histogram measurement 25 | sn.histogram.measure(acqTime=1000,savePTU=True) 26 | 27 | # get the data 28 | data, bins = sn.histogram.getData() 29 | 30 | # plot the histogram 31 | if len(data): 32 | plt.clf() 33 | plt.plot(bins, data[0], linewidth=2.0, label='sync') 34 | for c in range(1, 1+sn.deviceConfig["NumChans"]): 35 | plt.plot(bins, data[c], linewidth=2.0, label=f'chan{c}') 36 | plt.xlabel('Time [ps]') 37 | plt.ylabel('Counts') 38 | plt.legend() 39 | plt.title("Counts / Time") 40 | plt.pause(0.01) 41 | 42 | plt.show(block=True) -------------------------------------------------------------------------------- /demos/Demo_RecordViewer_Raw.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | 3 | if(__name__ == "__main__"): 4 | 5 | start = 0 6 | length = 10 7 | 8 | sn = snAPI() 9 | sn.getDevice() 10 | 11 | #sn.getFileDevice(r"C:\Data\PicoQuant\default.ptu") 12 | sn.initDevice(MeasMode.T3) 13 | sn.loadIniConfig("config\HH.ini") 14 | 15 | # 1GB 16 | sn.raw.measure(1000, 1024*1024*1024, True, False) 17 | data = sn.raw.getData() 18 | sn.logPrint("from raw data") 19 | sn.logPrint("channel | timetag") 20 | sn.logPrint("-------------------") 21 | 22 | for i in range(start,start+length): 23 | sn.logPrint(f"{sn.raw.channel(data[i]):9} | {sn.raw.dTime_T3(data[i]):7}") -------------------------------------------------------------------------------- /demos/Demo_RecordViewer_UF.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | 3 | if(__name__ == "__main__"): 4 | 5 | start = 0 6 | length = 10 7 | 8 | sn = snAPI() 9 | sn.getDevice() 10 | 11 | #sn.getFileDevice(r"D:\Data\PicoQuant\default.ptu") # T2 File 12 | sn.getFileDevice(r"D:\Data\PicoQuant\G2_T3_sameTTs.ptu") # T3 File 13 | sn.initDevice(MeasMode.T3) 14 | #sn.setLogLevel(LogLevel.Config, True) 15 | sn.loadIniConfig("config\MH.ini") 16 | 17 | countRates = sn.getCountRates() 18 | 19 | # 1GB 20 | resolution = sn.deviceConfig['Resolution'] 21 | sn.unfold.measure(acqTime=1000, size=1024*1024*1024, waitFinished=True, savePTU=False) 22 | times, channels = sn.unfold.getData() 23 | 24 | if sn.deviceConfig['MeasMode'] == 3: # T3 25 | sn.logPrint("Unfold T3 Data:") 26 | sn.logPrint(" channel | syncCtr | dTime | absTime") 27 | sn.logPrint("------------------------------------------") 28 | 29 | syncPeriod = 1e12 / countRates[0] # in ps 30 | for i in range(start,start+length): 31 | sn.logPrint(f"{channels[i]:9} | {sn.unfold.nSync_T3(times[i]):7} | {(resolution * sn.unfold.dTime_T3(times[i])):8} | {sn.unfold.abs_T3(times[i]):.1f}") 32 | 33 | else: # T2 34 | sn.logPrint("Unfold T2 Data:") 35 | sn.logPrint(" channel | absTime") 36 | sn.logPrint("---------------------") 37 | 38 | syncPeriod = 1e12 / countRates[0] # in ps 39 | for i in range(start,start+length): 40 | sn.logPrint(f"{channels[i]:9} | {times[i]:.1f}") 41 | 42 | sn.logPrint("end") -------------------------------------------------------------------------------- /demos/Demo_TimeTrace.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | 7 | if(__name__ == "__main__"): 8 | 9 | sn = snAPI() 10 | sn.getDevice() 11 | 12 | # alternatively read data from file 13 | sn.setLogLevel(LogLevel.DataFile, True) 14 | sn.initDevice(MeasMode.T2) 15 | 16 | # enable this to get info about loading config 17 | sn.setLogLevel(logLevel=LogLevel.Config, onOff=True) 18 | sn.loadIniConfig("config\MH.ini") 19 | 20 | numChans = sn.deviceConfig["NumChans"] 21 | triggerMode = TrigMode.Edge if sn.deviceConfig["SyncTrigMode"] == "Edge" else TrigMode.CFD 22 | 23 | if dontUseSettingsFromConfigIni := False: 24 | #set input CFD trigger 25 | if triggerMode == TrigMode.CFD: 26 | #sn.device.setSyncTrigMode(TrigMode.CFD) 27 | sn.device.setInputTrigMode(-1, TrigMode.CFD) 28 | sn.device.setSyncCFD(100, 0) 29 | sn.device.setInputCFD(-1, 100, 0) 30 | 31 | #set input edge trigger 32 | if triggerMode == TrigMode.Edge: 33 | #sn.device.setSyncTrigMode(TrigMode.Edge) 34 | sn.device.setInputTrigMode(-1, TrigMode.Edge) 35 | sn.device.setSyncEdgeTrig(-100, 0) 36 | sn.device.setInputEdgeTrig(-1, -50, 0) 37 | 38 | # configure timetrace 39 | sn.timeTrace.setNumBins(10000) 40 | sn.timeTrace.setHistorySize(10) 41 | 42 | # you can set a custom file name or path 43 | sn.setPTUFilePath("C:\Data\PicoQuant\MyFileName.ptu") 44 | 45 | # measure 10s 46 | sn.timeTrace.measure(10000, waitFinished=False, savePTU=True) 47 | 48 | while True: 49 | finished = sn.timeTrace.isFinished() 50 | counts, times = sn.timeTrace.getData() 51 | plt.clf() 52 | plt.plot(times, counts[0], linewidth=2.0, label='sync') 53 | for c in range(1, 1+sn.deviceConfig["NumChans"]): 54 | plt.plot(times, counts[c], linewidth=2.0, label=f'chan{c}') 55 | 56 | plt.xlabel('Time [s]') 57 | plt.ylabel('Counts[Cts/s]') 58 | plt.legend() 59 | plt.title("TimeTrace") 60 | plt.pause(0.1) 61 | 62 | if finished: 63 | break 64 | 65 | plt.show(block=True) 66 | -------------------------------------------------------------------------------- /demos/Demo_TimeTrace_Coincidence.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | 7 | if(__name__ == "__main__"): 8 | 9 | sn = snAPI() 10 | sn.getDevice() 11 | #sn.getFileDevice("C:\Data\PicoQuant\default.ptu") 12 | 13 | # alternatively read data from file 14 | sn.setLogLevel(LogLevel.DataFile, True) 15 | sn.initDevice(MeasMode.T2) 16 | 17 | # enable this to get info about loading config 18 | #sn.setLogLevel(logLevel=LogLevel.Config, onOff=True) 19 | sn.loadIniConfig("config\HH.ini") 20 | 21 | coincidenceAll = sn.manipulators.coincidence([1,2], windowTime=1e7, mode=CoincidenceMode.CountAll, keepChannels=True) 22 | coincidenceOnce = sn.manipulators.coincidence([1,2], windowTime=1e7, mode=CoincidenceMode.CountOnce, keepChannels=True) 23 | # measure 10s 24 | sn.timeTrace.measure(10000, waitFinished=False, savePTU=False) 25 | 26 | while True: 27 | finished = sn.timeTrace.isFinished() 28 | counts, times = sn.timeTrace.getData() 29 | plt.clf() 30 | plt.plot(times, counts[0], linewidth=2.0, label='sync') 31 | plt.plot(times, counts[1], linewidth=2.0, label='chan1') 32 | plt.plot(times, counts[2], linewidth=2.0, label='chan2') 33 | plt.plot(times, counts[coincidenceAll], linewidth=2.0, label='coincidenceAll') 34 | plt.plot(times, counts[coincidenceOnce], linewidth=2.0, label='coincidenceOnce') 35 | 36 | plt.xlabel('Time [s]') 37 | plt.ylabel('Counts[Cts/s]') 38 | plt.legend() 39 | plt.title("TimeTrace") 40 | plt.pause(0.1) 41 | 42 | if finished: 43 | break 44 | 45 | plt.show(block=True) 46 | -------------------------------------------------------------------------------- /demos/Demo_WR_Configure_Master.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import time 3 | 4 | 5 | # This demo is only for configuring the master. It may be better to use the official Harp Software for this, 6 | # as it provides a more convenient implementation of the terminal output. 7 | # It is also recommended not to reconfigure the Harp every time you take measurement. Only Do it once. Once the 8 | # White Rabbit is configured and working, use only the measurement demos. 9 | # Both scripts: DEMO_WR_Configure_Master and DEMO_WR_Configure_Slave must be executed at the same time and the Harp 10 | # devices must be be connected directly via a WR fibre optics cable! 11 | 12 | if(__name__ == "__main__"): 13 | 14 | start = 0 15 | length = 10 16 | 17 | sn = snAPI() 18 | # Enter the device ID / serial number here: 19 | sn.getDevice("1000002") 20 | sn.initDevice(MeasMode.T2) 21 | 22 | # Each WR device needs a unique MAC address. 23 | # We use the device ID here for an easy identification of the device. 24 | sn.whiteRabbit.setMAC("00-00-01-00-00-02") 25 | sn.logPrint(sn.whiteRabbit.mac) 26 | 27 | # Print the sfp calibration data. 28 | sn.whiteRabbit.getSFPData() 29 | sn.logPrint(f"SFP names: \"{sn.whiteRabbit.SFPnames}\"") 30 | sn.logPrint(f"SFP dTxs: \"{sn.whiteRabbit.SFPdTxs}\"") 31 | sn.logPrint(f"SFP dRxs: \"{sn.whiteRabbit.SFPdRxs}\"") 32 | sn.logPrint(f"SFP alphas: \"{sn.whiteRabbit.SFPalphas}\"") 33 | 34 | # Set the init script for the master. It will be written to the EEPROM. After starting the 35 | # Harp Device will automatically boot with this script. 36 | sn.whiteRabbit.setInitScript("ptp stop\nsfp detect\nsfp match\nmode master\nptp start\ngui\n") 37 | sn.logPrint(f"Init Script: \"{sn.whiteRabbit.initScript}\"") 38 | 39 | # Initialize the Harp with RefSource to Harp Master. 40 | # The Slave then wait for the master to start the measurement. 41 | sn.initDevice(MeasMode.T2, RefSource.Wr_Master_Harp) 42 | 43 | # Poll the WR status until the Harp device is ready to use. 44 | readyState = WRstatus.LockedCalibrated.value | WRstatus.ModeMaster.value | WRstatus.ModeMaster.value 45 | for i in range(100): 46 | status = sn.whiteRabbit.getStatus() 47 | sn.logPrint(f"{status:08x}") 48 | if (status & readyState) == readyState: 49 | break 50 | else: 51 | time.sleep(1) 52 | 53 | # Set the correct UTC time. 54 | sn.whiteRabbit.setTime(datetime.now()) 55 | sn.logPrint(sn.whiteRabbit.getTermOutput()) 56 | sn.logPrint(f"WR time: {sn.whiteRabbit.getTime()}") 57 | -------------------------------------------------------------------------------- /demos/Demo_WR_Configure_Slave.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import time 3 | 4 | 5 | # This demo is only for configuring the master. It may be better to use the official Harp Software for this, 6 | # as it provides a more convenient implementation of the terminal output. 7 | # It is also recommended not to reconfigure the Harp every time you take measurement. Only Do it once. Once the 8 | # White Rabbit is configured and working, use only the measurement demos. 9 | # Both scripts: DEMO_WR_Configure_Master and DEMO_WR_Configure_Slave must be executed at the same time and the Harp 10 | # devices must be be connected directly via a WR fibre optics cable! 11 | 12 | if(__name__ == "__main__"): 13 | 14 | start = 0 15 | length = 10 16 | 17 | sn = snAPI() 18 | # Enter the device ID / serial number here: 19 | sn.getDevice("1045483") 20 | sn.initDevice(MeasMode.T2) 21 | 22 | # Each WR device needs a unique MAC address. 23 | # We use the device ID here for an easy identification of the device. 24 | sn.whiteRabbit.setMAC("00-00-01-04-54-83") 25 | sn.logPrint(f"MAC: \"{sn.whiteRabbit.mac}\"") 26 | 27 | # Print the sfp calibration data. 28 | sn.whiteRabbit.getSFPData() 29 | sn.logPrint(f"SFP names: \"{sn.whiteRabbit.SFPnames}\"") 30 | sn.logPrint(f"SFP dTxs: \"{sn.whiteRabbit.SFPdTxs}\"") 31 | sn.logPrint(f"SFP dRxs: \"{sn.whiteRabbit.SFPdRxs}\"") 32 | sn.logPrint(f"SFP alphas: \"{sn.whiteRabbit.SFPalphas}\"") 33 | 34 | # Set the init script for the master. It will be written to the EEPROM. After starting the 35 | # Harp Device will automatically boot with this script. 36 | sn.whiteRabbit.setInitScript("ptp stop\nsfp detect\nsfp match\nmode slave\nptp start\ngui\n") 37 | sn.logPrint(f"Init Script: \"{sn.whiteRabbit.initScript}\"") 38 | 39 | # Initialize the Harp again. 40 | sn.initDevice(MeasMode.T2) 41 | 42 | # Poll the WR status until the Harp device is ready to use. 43 | readyState = WRstatus.LockedCalibrated.value | WRstatus.ModeSlave.value | WRstatus.ModeSlave.value | WRstatus.ServoTrackPhase.value 44 | for i in range(100): 45 | status = sn.whiteRabbit.getStatus() 46 | sn.logPrint(f"{status:08x}") 47 | if (status & readyState) == readyState: 48 | break 49 | else: 50 | time.sleep(1) 51 | 52 | sn.logPrint(sn.whiteRabbit.getTermOutput()) 53 | # Check whether the master has set the correct UTC time. 54 | sn.logPrint(f"WR time: {sn.whiteRabbit.getTime()}") 55 | -------------------------------------------------------------------------------- /demos/Demo_WR_TimeTrace_Master.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | 7 | # This demo starts the data acquisition at the master and should be executed after the slave is 8 | # initialized and the measurement is started on the slave. 9 | 10 | if(__name__ == "__main__"): 11 | 12 | sn = snAPI() 13 | sn.getDevice("1000002") 14 | 15 | # Init Slave and init Master must not happen at the same time! 16 | sn.initDevice(MeasMode.T2, RefSource.Wr_Master_Harp) 17 | sn.device.setMeasControl(MeasControl.WrMaster2Slave) 18 | sn.loadIniConfig("config\MH.ini") 19 | 20 | # configure timetrace 21 | sn.timeTrace.setNumBins(10000) 22 | sn.timeTrace.setHistorySize(10) 23 | 24 | # Now the master starts the measurement of itself and the slave synchronously 25 | # over White Rabbit. 26 | sn.setPTUFilePath("C:\Data\PicoQuant\master.ptu") 27 | # The line `sn.timeTrace.measure(10000, waitFinished=False, savePTU=False)` is initiating a 28 | # measurement using the time trace feature of the device. 29 | sn.timeTrace.measure(10000, waitFinished=False, savePTU=True) 30 | 31 | plt.figure(f'Figure: {sn.deviceConfig["Model"]}') 32 | while True: 33 | finished = sn.timeTrace.isFinished() 34 | counts, times = sn.timeTrace.getData() 35 | plt.clf() 36 | plt.plot(times, counts[0], linewidth=2.0, label='sync') 37 | for c in range(1, 1+sn.deviceConfig["NumChans"]): 38 | plt.plot(times, counts[c], linewidth=2.0, label=f'chan{c}') 39 | 40 | plt.xlabel('Time [s]') 41 | plt.ylabel('Counts[Cts/s]') 42 | plt.legend() 43 | plt.title(f'TimeTrace Master {sn.deviceConfig["ID"]}') 44 | plt.pause(0.1) 45 | 46 | if finished: 47 | break 48 | 49 | plt.show(block=True) 50 | -------------------------------------------------------------------------------- /demos/Demo_WR_TimeTrace_Slave.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | import matplotlib 3 | matplotlib.use('TkAgg',force=True) 4 | from matplotlib import pyplot as plt 5 | print("Switched to:",matplotlib.get_backend()) 6 | 7 | # This demo starts the data acquisition at the slave and should be executed first. 8 | 9 | if(__name__ == "__main__"): 10 | 11 | sn = snAPI() 12 | sn.getDevice("1045483") 13 | 14 | # init Slave and init Master must not happen at the same time 15 | sn.initDevice(MeasMode.T2, RefSource.Wr_Slave_Harp) 16 | sn.device.setMeasControl(MeasControl.WrMaster2Slave) 17 | sn.loadIniConfig("config\MH.ini") 18 | 19 | # configure timetrace 20 | sn.timeTrace.setNumBins(10000) 21 | sn.timeTrace.setHistorySize(10) 22 | 23 | # This enables the measurement on the slave. 24 | sn.setPTUFilePath("C:\Data\PicoQuant\slave.ptu") 25 | sn.timeTrace.measure(10000, waitFinished=False, savePTU=True) 26 | 27 | # Now the slave waits for the start of the measurement of the master. 28 | plt.figure(f'Figure: {sn.deviceConfig["Model"]}') 29 | while True: 30 | finished = sn.timeTrace.isFinished() 31 | counts, times = sn.timeTrace.getData() 32 | plt.clf() 33 | plt.plot(times, counts[0], linewidth=2.0, label='sync') 34 | for c in range(1, 1+sn.deviceConfig["NumChans"]): 35 | plt.plot(times, counts[c], linewidth=2.0, label=f'chan{c}') 36 | 37 | plt.xlabel('Time [s]') 38 | plt.ylabel('Counts[Cts/s]') 39 | plt.legend() 40 | plt.title(f'TimeTrace Slave {sn.deviceConfig["ID"]}') 41 | plt.pause(0.1) 42 | 43 | if finished: 44 | break 45 | 46 | plt.show(block=True) 47 | -------------------------------------------------------------------------------- /demos/config/HH.ini: -------------------------------------------------------------------------------- 1 | [Device] 2 | HystCode = 0 3 | SyncDiv = 1 4 | SyncCFD = 50,0 5 | SyncChannelOffset = -10000 6 | StopCount = 0 7 | Binning = 0 8 | TriggerOutput = 0 9 | 10 | [All_Channels] 11 | ChanOffs = 0 12 | ChanEna = 1 13 | DeadTime = 0 14 | 15 | [Channel_0] 16 | CFD = 50,0 17 | 18 | [Channel_1] 19 | CFD = 100,0 -------------------------------------------------------------------------------- /demos/config/MH.ini: -------------------------------------------------------------------------------- 1 | [Device] 2 | HystCode = 0 3 | SyncDiv = 1 4 | SyncEdgeTrig = -200,0 5 | SyncChannelOffset = 0 6 | SyncChannelEnable = 1 7 | SyncDeadTime = 0 8 | StopCount = 0 9 | Binning = 1 10 | Offset = 0 11 | TriggerOutput = 0 12 | 13 | [All_Channels] 14 | EdgeTrig = -50,0 15 | ChanOffs = 0 16 | ChanEna = 1 17 | DeadTime = 0 18 | 19 | [Channel_3] 20 | EdgeTrig = -55,0 21 | ChanOffs = 0 22 | 23 | [Channel_1] 24 | EdgeTrig = -56,0 -------------------------------------------------------------------------------- /demos/config/PH330_CFD.ini: -------------------------------------------------------------------------------- 1 | [Device] 2 | HystCode = 0 3 | SyncDiv = 1 4 | SyncTrigMode = 1 5 | SyncCFD = -50,0 6 | SyncChannelOffset = 0 7 | SyncChannelEnable = 1 8 | SyncDeadTime = 0 9 | StopCount = 0 10 | Binning = 1 11 | Offset = 0 12 | TriggerOutput = 0 13 | 14 | [All_Channels] 15 | TrigMode = 1 16 | ChanOffs = 0 17 | ChanEna = 1 18 | DeadTime = 0 19 | 20 | [Channel_0] 21 | CFD = -50,0 22 | 23 | [Channel_1] 24 | CFD = -50,0 -------------------------------------------------------------------------------- /demos/config/PH330_Edge.ini: -------------------------------------------------------------------------------- 1 | [Device] 2 | HystCode = 0 3 | SyncDiv = 1 4 | SyncTrigMode = 0 5 | SyncEdgeTrig = -250,0 6 | SyncChannelOffset = 0 7 | SyncChannelEnable = 1 8 | SyncDeadTime = 0 9 | StopCount = 0 10 | Binning = 1 11 | Offset = 0 12 | TriggerOutput = 0 13 | 14 | [All_Channels] 15 | TrigMode = 0 16 | ChanOffs = 0 17 | ChanEna = 1 18 | DeadTime = 0 19 | EdgeTrig = -50,0 20 | -------------------------------------------------------------------------------- /demos/config/TH260N.ini: -------------------------------------------------------------------------------- 1 | [Device] 2 | HystCode = 0 3 | SyncDiv = 1 4 | SyncEdgeTrig = -100,1 5 | SyncChannelOffset = 0 6 | StopCount = 0 7 | Binning = 1 8 | Offset = 0 9 | TriggerOutput = 0 10 | 11 | [All_Channels] 12 | ChanOffs = 0 13 | ChanEna = 1 14 | DeadTime = 0 15 | 16 | [Channel_0] 17 | EdgeTrig = -100,1 18 | ChanOffs = 0 19 | 20 | [Channel_1] 21 | EdgeTrig = -120,1 -------------------------------------------------------------------------------- /demos/config/TH260P.ini: -------------------------------------------------------------------------------- 1 | [Device] 2 | HystCode = 0 3 | SyncDiv = 1 4 | SyncEdgeTrig = -50,1 5 | SyncChannelOffset = 0 6 | StopCount = 0 7 | Binning = 1 8 | Offset = 0 9 | TriggerOutput = 0 10 | 11 | [All_Channels] 12 | ChanOffs = 0 13 | ChanEna = 1 14 | DeadTime = 0 15 | 16 | [Channel_0] 17 | CFD = -50,0 18 | ChanOffs = 0 19 | 20 | [Channel_1] 21 | CFD = -120,0 -------------------------------------------------------------------------------- /demos/config/device.ini: -------------------------------------------------------------------------------- 1 | [Device] 2 | HystCode = 0 3 | SyncDiv = 1 4 | SyncEdgeTrig = -50,1 5 | SyncChannelOffset = 0 6 | SyncChannelEnable = 1 7 | SyncDeadTime = 0 8 | StopCount = 0 9 | Binning = 1 10 | Offset = 0 11 | TriggerOutput = 0 12 | 13 | [All_Channels] 14 | EdgeTrig = -50,1 15 | ChanOffs = 0 16 | ChanEna = 1 17 | DeadTime = 0 18 | 19 | [Channel_0] 20 | EdgeTrig = 0,1 21 | ChanOffs = 0 22 | 23 | [Channel_1] 24 | EdgeTrig = -120,1 -------------------------------------------------------------------------------- /demos/g2_from_file.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | from matplotlib import pyplot as plt 3 | import click 4 | from pathlib import Path 5 | import pandas as pd 6 | 7 | 8 | @click.command() 9 | @click.argument('filename',type=click.Path(exists=True), metavar='FILENAME.ptu') 10 | @click.option('--A', '-a', type=int, default=1, help='Correlation channel A (default: 1)') 11 | @click.option('--B', '-b', type=int, default=2, help='Correlation channel B (default: 2)') 12 | @click.option('--windowsize', '-ws', type=int, default=10000, help='size of the correlation window in ps (default: 100000)') 13 | @click.option('--binsize', '-bs', type=int, default=10, help='size of the correlation bin size in ps (default: 10)') 14 | def g2correlation(filename, a=1, b=2, windowsize=10000, binsize=10): 15 | sn = snAPI() 16 | sn.getFileDevice(filename) 17 | sn.correlation.setG2Parameters(a, b, windowsize, binsize) 18 | sn.correlation.measure(waitFinished=True) 19 | g2, lagtimes = sn.correlation.getG2Data() 20 | 21 | df = pd.DataFrame({"lagtime": list(lagtimes), "g2": list(g2)}) 22 | 23 | # Plot the DataFrame 24 | df.plot(x='lagtime', y='g2', label=f'{filename}') 25 | plt.xlabel('lagtime (s)') 26 | plt.ylabel('g(2) amplitude') 27 | plt.title("g(2) correlation") 28 | 29 | # Save the plot to a PDF file 30 | plt.savefig(Path(filename).with_suffix('.' + 'pdf'), format='pdf') 31 | # Save the plot to a PNG file 32 | plt.savefig(Path(filename).with_suffix('.' + 'png'), format='png') 33 | # Save the g2-correlation to csv 34 | df.to_csv(Path(filename).with_suffix('.' + 'csv')) 35 | # Save the g2-correlation to Excel 36 | df.to_excel(Path(filename).with_suffix('.' + 'xlsx')) 37 | # Save the g2-correlation to json 38 | df.to_json(Path(filename).with_suffix('.' + 'json')) 39 | if(__name__ == "__main__"): 40 | g2correlation() 41 | -------------------------------------------------------------------------------- /dist/snAPI-1.0.7-cp36-cp36m-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snAPI-1.0.7-cp36-cp36m-win_amd64.whl -------------------------------------------------------------------------------- /dist/snAPI-1.0.7-cp37-cp37m-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snAPI-1.0.7-cp37-cp37m-win_amd64.whl -------------------------------------------------------------------------------- /dist/snAPI-1.0.7-pp37-pypy37_pp73-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snAPI-1.0.7-pp37-pypy37_pp73-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-cp310-cp310-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-cp310-cp310-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-cp311-cp311-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-cp311-cp311-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-cp312-cp312-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-cp312-cp312-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-cp313-cp313-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-cp313-cp313-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-cp38-cp38-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-cp38-cp38-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-cp39-cp39-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-cp39-cp39-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-pp310-pypy310_pp73-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-pp310-pypy310_pp73-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-pp311-pypy311_pp73-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-pp311-pypy311_pp73-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-pp38-pypy38_pp73-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-pp38-pypy38_pp73-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7-pp39-pypy39_pp73-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7-pp39-pypy39_pp73-win_amd64.whl -------------------------------------------------------------------------------- /dist/snapi-1.0.7.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/dist/snapi-1.0.7.tar.gz -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/.nojekyll -------------------------------------------------------------------------------- /docs/_images/01_Histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/01_Histogram.png -------------------------------------------------------------------------------- /docs/_images/01_Histogram_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/01_Histogram_dark.png -------------------------------------------------------------------------------- /docs/_images/02_TimeTrace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/02_TimeTrace.png -------------------------------------------------------------------------------- /docs/_images/02_TimeTrace_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/02_TimeTrace_dark.png -------------------------------------------------------------------------------- /docs/_images/03_Correlation_Antibunching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/03_Correlation_Antibunching.png -------------------------------------------------------------------------------- /docs/_images/03_Correlation_Antibunching_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/03_Correlation_Antibunching_dark.png -------------------------------------------------------------------------------- /docs/_images/03_Correlation_Bunching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/03_Correlation_Bunching.png -------------------------------------------------------------------------------- /docs/_images/03_Correlation_Bunching_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/03_Correlation_Bunching_dark.png -------------------------------------------------------------------------------- /docs/_images/04_Coincidence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/04_Coincidence.png -------------------------------------------------------------------------------- /docs/_images/04_Coincidence_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/04_Coincidence_02.png -------------------------------------------------------------------------------- /docs/_images/04_Coincidence_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/04_Coincidence_dark.png -------------------------------------------------------------------------------- /docs/_images/05_Delay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/05_Delay.png -------------------------------------------------------------------------------- /docs/_images/05_Delay_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/05_Delay_02.png -------------------------------------------------------------------------------- /docs/_images/05_Delay_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/05_Delay_dark.png -------------------------------------------------------------------------------- /docs/_images/06_Merge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/06_Merge.png -------------------------------------------------------------------------------- /docs/_images/06_Merge_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/06_Merge_02.png -------------------------------------------------------------------------------- /docs/_images/06_Merge_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/06_Merge_dark.png -------------------------------------------------------------------------------- /docs/_images/07_Herald.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/07_Herald.png -------------------------------------------------------------------------------- /docs/_images/07_Herald_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/07_Herald_02.png -------------------------------------------------------------------------------- /docs/_images/07_Herald_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/07_Herald_dark.png -------------------------------------------------------------------------------- /docs/_images/08_snAPI_Flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/08_snAPI_Flow.png -------------------------------------------------------------------------------- /docs/_images/08_snAPI_Flow_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/08_snAPI_Flow_dark.png -------------------------------------------------------------------------------- /docs/_images/DB-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/DB-25.png -------------------------------------------------------------------------------- /docs/_images/DE-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/DE-15.png -------------------------------------------------------------------------------- /docs/_images/G2_Correlation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/G2_Correlation.png -------------------------------------------------------------------------------- /docs/_images/Histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/Histogram.png -------------------------------------------------------------------------------- /docs/_images/Log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/Log.png -------------------------------------------------------------------------------- /docs/_images/T2_mode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/T2_mode.jpg -------------------------------------------------------------------------------- /docs/_images/T3_mode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/T3_mode.jpg -------------------------------------------------------------------------------- /docs/_images/TimeTrace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/TimeTrace.png -------------------------------------------------------------------------------- /docs/_images/VSCode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/VSCode.png -------------------------------------------------------------------------------- /docs/_images/coincidence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/coincidence.png -------------------------------------------------------------------------------- /docs/_images/delay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/delay.png -------------------------------------------------------------------------------- /docs/_images/herald.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/herald.png -------------------------------------------------------------------------------- /docs/_images/heralded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/heralded.png -------------------------------------------------------------------------------- /docs/_images/snAPI_Flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_images/snAPI_Flow.png -------------------------------------------------------------------------------- /docs/_sources/config.rst.txt: -------------------------------------------------------------------------------- 1 | .. role:: fwLighter 2 | :class: fw-lighter 3 | 4 | 5 | Configuration 6 | ############# 7 | 8 | The :obj:`.deviceConfig` stores the state of the device in the API and can be updated with :meth:`.getDeviceConfig`. 9 | From :obj:`.deviceConfig` the parameters can only be read. To set them you need to call :meth:`.loadIniConfig` or :meth:`.setIniConfig`. 10 | An other and more pythonesque way to change them is to use the commands defined in the :class:`.Device` directly. 11 | This document will give you an overview about the configuration parameters and there corresponding functions or constants, 12 | where their values and/or their maximum and minimum are defined. 13 | 14 | .. note:: 15 | If you encounter any issues reading a config.ini file enable the config log level in the system.ini. The file location 16 | is shown at the firs log entry: 'loadSettingsIni: e:\\path\\to\\system.ini'. 17 | 18 | 19 | Parameter Description 20 | ********************* 21 | 22 | Read only parameters 23 | ==================== 24 | 25 | .. list-table:: Read only from :obj:`.deviceConfig` (can't be set via :meth:`.loadIniConfig` or :meth:`.setIniConfig`) 26 | :widths: 25 25 50 27 | :header-rows: 1 28 | 29 | * - Name 30 | - Object / Reference 31 | - Description 32 | 33 | * - DeviceType 34 | - :obj:`.DeviceType` 35 | - real Hardware or File Device 36 | 37 | * - FileDevicePath 38 | - string 39 | - path to the ptu file 40 | 41 | * - ID 42 | - string 43 | - serial number 44 | 45 | * - Index 46 | - int 47 | - index number of the device in the list of :obj:`.deviceIDs` (only valid after :meth:`.getDeviceIDs`) 48 | 49 | * - Model 50 | - string 51 | - model name 52 | 53 | * - PartNo 54 | - string 55 | - part number 56 | 57 | * - Version 58 | - string 59 | - version number 60 | 61 | * - BaseResolution 62 | - double 63 | - base resolution in ps (timing resolution in T2 mode) 64 | 65 | * - Resolution 66 | - double 67 | - current resolution (histogram bin width) in ps (not meaningful in T2 mode) 68 | 69 | * - Binning 70 | - int 71 | - current binning code (multiplier for BaseResolution) - (not meaningful in T2 mode) 72 | 73 | * - NumChans 74 | - int 75 | - number of input channels (without sync) 76 | 77 | * - NumMods 78 | - int 79 | - number of installed modules 80 | 81 | * - MeasMode 82 | - :obj:`.MeasMode` 83 | - Histogram, T2, T3 84 | 85 | * - RefSource 86 | - :obj:`.RefSource` 87 | - source of the reference clock 88 | 89 | 90 | INI Device Section 91 | ================== 92 | 93 | .. list-table:: INI Section: [Device] 94 | :widths: 25 25 50 95 | :header-rows: 1 96 | 97 | * - Name 98 | - Object / Reference 99 | - Description 100 | 101 | * - SyncDivider 102 | - :meth:`.setSyncDiv` 103 | - sync rate divider 104 | 105 | * - SyncTrigMode 106 | - :meth:`.setSyncTrigMode` 107 | - `Edge` or `CFD` trigger 108 | 109 | * - SyncEdgeTrig, SyncTrigLvl , SyncTrigEdge 110 | - :meth:`.setSyncEdgeTrig` 111 | - sets both parameters at once: trigger level and edge 112 | 113 | * - SyncCFD, SyncDiscrLvl , SyncZeroXLvL 114 | - :meth:`.setSyncCFD` 115 | - sets both parameters at once: discriminator- and zero cross level 116 | 117 | * - SyncChannelOffset 118 | - :meth:`.setSyncChannelOffset` 119 | - sync timing offset in ps 120 | 121 | * - SyncChannelEnable 122 | - :meth:`.setSyncChannelEnable` 123 | - enable state of the sync channel 124 | 125 | * - SyncDeadTime 126 | - :meth:`.setSyncDeadTime` 127 | - dead-time in ps 128 | 129 | * - HystCode 130 | - :meth:`.setInputHysteresis` 131 | - input hysteresis 132 | 133 | * - StopCount 134 | - :meth:`.setStopOverflow` 135 | - stop count for histogram 136 | 137 | * - Binning 138 | - :meth:`.setBinning` 139 | - binning factor 140 | 141 | * - Offset 142 | - :meth:`.setOffset` 143 | - histogram time offset in ns 144 | 145 | * - LengthCode, NumBins 146 | - :meth:`.setHistoLength` 147 | - number of bins 148 | 149 | * - TriggerOutput 150 | - :meth:`.setTriggerOutput` 151 | - programmable trigger output period in ns 152 | 153 | * - MarkerHoldoffTime 154 | - :meth:`.setMarkerHoldoffTime` 155 | - marker hold of time to remove glitches in ns 156 | 157 | * - HoldTime 158 | - :meth:`.setOflCompression` 159 | - low data rates 160 | 161 | 162 | INI Channel Section 163 | =================== 164 | 165 | .. list-table:: INI Section: [All_Channels] | [Channel_N] 166 | :widths: 25 25 50 167 | :header-rows: 1 168 | 169 | * - Name 170 | - Object / Reference 171 | - Description 172 | 173 | * - TrigMode 174 | - :meth:`.setInputTrigMode` 175 | - `Edge` or `CFD` trigger 176 | 177 | * - EdgeTrig, TrigLvl , TrigEdge 178 | - :meth:`.setInputEdgeTrig` 179 | - sets both values at once: trigger level and edge 180 | 181 | * - CFD, DiscrLvl , ZeroXLvl 182 | - :meth:`.setInputCFD` 183 | - sets both values at once: discriminator- and zero cross level 184 | 185 | * - ChanOffs 186 | - :meth:`.setInputChannelOffset` 187 | - input channel offset timing offset in ps 188 | 189 | * - ChanEna 190 | - :meth:`.setInputChannelEnable` 191 | - enable state of the input channel 192 | 193 | * - DeadTime 194 | - :meth:`.setInputDeadTime` 195 | - dead-time in ps 196 | 197 | 198 | Example of the :obj:`.deviceConfig` 199 | =================================== 200 | :: 201 | 202 | { 203 | "DeviceType": 0, 204 | "FileDevicePath": "", 205 | "ID": "1045483", 206 | "Index": 0, 207 | "Model": "MultiHarp 150 4P", 208 | "PartNo": "930043", 209 | "Version": "1.0", 210 | "BaseResolution": 5.0, 211 | "Resolution": 5.0, 212 | "BinSteps": 24, 213 | "NumChans": 4, 214 | "NumMods": 2, 215 | "SyncDivider": 1, 216 | "SyncTrigMode": "Edge", 217 | "SyncTrigLvl": -50, 218 | "SyncTrigEdge": 1, 219 | "SyncDiscrLvl": -50, 220 | "SyncZeroXLvL": 0, 221 | "SyncChannelOffset": 0, 222 | "SyncChannelEnable": 1, 223 | "SyncDeadTime": 800, 224 | "HystCode": 0, 225 | "StopCount": 4294967295, 226 | "Binning": 1, 227 | "Offset": 0, 228 | "lengthCode": 6, 229 | "NumBins": 65536, 230 | "MeasControl": 0, 231 | "StartEdge": 1, 232 | "StopEdge": 1, 233 | "TrigOutput": 0, 234 | "HoldoffTime": 0, 235 | "HoldTime": 0, 236 | "MarkerEdges": [ 237 | 0, 238 | 0, 239 | 0, 240 | 0 241 | ], 242 | "MarkerEna": [ 243 | 0, 244 | 0, 245 | 0, 246 | 0 247 | ], 248 | "ModsCfg": [ 249 | { 250 | "Index": 0, 251 | "ModelCode": 1010, 252 | "VersionCode": 16843029 253 | }, 254 | { 255 | "Index": 1, 256 | "ModelCode": 1000, 257 | "VersionCode": 17694997 258 | } 259 | ], 260 | "ChansCfg": [ 261 | { 262 | "Index": 0, 263 | "TrigLvl": 100, 264 | "TrigEdge": 1, 265 | "DiscrLvl": 100, 266 | "ZeroXLvl": 0, 267 | "ChanOffs": 0, 268 | "ChanEna": 1, 269 | "DeadTime": 800 270 | }, 271 | { 272 | "Index": 1, 273 | "TrigLvl": -120, 274 | "TrigEdge": 1, 275 | "DiscrLvl": -120, 276 | "ZeroXLvl": 1, 277 | "ChanOffs": 0, 278 | "ChanEna": 1, 279 | "DeadTime": 800 280 | } 281 | ], 282 | "MeasMode": 0, 283 | "RefSource": 0 284 | } 285 | 286 | Example of the device ini file 287 | ============================== 288 | :: 289 | 290 | [Device] 291 | HystCode = 0 292 | SyncDiv = 1 293 | SyncEdgeTrig = -50,1 294 | SyncChannelOffset = 0 295 | SyncChannelEnable = 1 296 | SyncDeadTime = 0 297 | StopOverflow = 4294967295 298 | Binning = 1 299 | Offset = 0 300 | MeasControl = 0 301 | StartEdge = 1 302 | StopEdge = 1 303 | TriggerOutput = 0 304 | 305 | [All_Channels] 306 | InputEdgeTrig = -50,1 307 | InputChannelOffset = 0 308 | SetInputChannelEnable = 1 309 | InputDeadTime = 0 310 | 311 | [Channel_0] 312 | InputEdgeTrig = -10,1 313 | InputChannelOffset = 100 314 | 315 | [Channel_1] 316 | InputEdgeTrig = -120,1 317 | -------------------------------------------------------------------------------- /docs/_sources/controlConnector.rst.txt: -------------------------------------------------------------------------------- 1 | .. role:: fwLighter 2 | :class: fw-lighter 3 | 4 | Control Connector 5 | ================= 6 | 7 | 25-pin sub-D 8 | ------------ 9 | 10 | Supported devices: [MH150/160 | PH330] 11 | 12 | .. image:: _static/DB-25.png 13 | :class: p-2 14 | 15 | :figure-caption:`The control connector is a 25-pin female sub-D connector labeled CTRL.` 16 | 17 | The following figure shows the pin layout and the table below contains the connector's default pin assignments. 18 | 19 | .. list-table:: Default Pin Assignment: 25-pin sub-D 20 | :widths: 20 30 30 200 21 | :header-rows: 1 22 | 23 | * - Pin # 24 | - Name 25 | - I/O 26 | - Purpose/Description 27 | * - 1 28 | - GPIO 0 29 | - TTL in 30 | - marker 1 input 31 | * - 2 32 | - GPIO 1 33 | - TTL in 34 | - marker 2 input 35 | * - 3 36 | - GPIO 2 37 | - TTL in 38 | - marker 3 input 39 | * - 4 40 | - GPIO 3 41 | - TTL in 42 | - marker 4 input 43 | * - 5 44 | - GPIO 4 45 | - TTL in 46 | - reserved 47 | * - 6 48 | - GPIO 5 49 | - TTL in 50 | - reserved 51 | * - 7 52 | - GPIO 6 53 | - TTL in 54 | - reserved 55 | * - 8 56 | - GPIO 7 57 | - TTL in 58 | - reserved 59 | * - 9 60 | - GPIO 8 61 | - TTL in 62 | - reserved 63 | * - 10 64 | - GPIO 9 65 | - TTL in 66 | - reserved 67 | * - 11 68 | - GPIO 10 69 | - TTL in 70 | - reserved 71 | * - 12 72 | - GPIO 11 73 | - TTL in 74 | - reserved 75 | * - 13 76 | - GPIO 12 77 | - TTL in 78 | - reserved 79 | * - 14 80 | - GND 81 | - GND 82 | - reserved 83 | * - 15 84 | - GPIO 13 85 | - TTL in 86 | - reserved 87 | * - 16 88 | - GPIO 14 89 | - TTL in 90 | - ground (0V) 91 | * - 17 92 | - GPIO 15 93 | - TTL in 94 | - RS232 RX (3.3V signal level) for connection to GPS/GLONASS receiver 95 | * - 18 96 | - GND 97 | - GND 98 | - ground (0V) 99 | * - 19 100 | - C1 101 | - TTL in 102 | - start measurement 103 | * - 20 104 | - C2 105 | - TTL in 106 | - stop measurement 107 | * - 21 108 | - GND 109 | - GND 110 | - ground (0V) 111 | * - 22 112 | - MACT 113 | - TTL out 114 | - high when measurement running 115 | * - 23 116 | - GND 117 | - TTL in 118 | - ground (0V) 119 | * - 24 120 | - D3V3 121 | - DC out 122 | - +3.3V / ≤ 350 mA supply for external hardware add-ons 123 | * - 25 124 | - GND 125 | - GND 126 | - ground (0V) 127 | 128 | .. note:: 129 | A maximum high level of 3.3V is permitted. 130 | 131 | 132 | Marker 133 | """""" 134 | 135 | `Pin 1, 2, 3 and 4` accept TTL compatible synchronization signals that will be recorded as markers in T2/T3 136 | mode. The pins are internally pulled down, so that they are inactive when left unconnected. The active edge 137 | can be set with :meth:`Device.setMarkerEdges` and is at least 50 ns long. 138 | The clock period may therefore (in principle) be as short as about 100 ns but data bus throughput constraints will apply. 139 | Each marker creates an additional data record, so that one must ensure not to swamp the data stream with too many marker records. 140 | When bandwidth gets tight, markers take precedence over photon records, so that excess marker traffic can 141 | suppress photon records. In fast imaging applications it is therefore recommended not to use a pixel clock 142 | but a line clock only. Because each photon has a time tag, it is usually not necessary to use an additional 143 | pixel clock. 144 | 145 | 146 | External Clock 147 | """""""""""""" 148 | 149 | `Pin 17` can be used to connect the serial TX line of a GPS/GLONASS receiver for time transmission via the 150 | NMEA ZDA Message protocol at 115.2 kbps, 3.3V. We have successfully tested this with the Mini-T™ GG disciplined 151 | clock module from Trimble Inc., USA. 152 | Set :class:`snAPI.Constants.RefSource` to :obj:`RefSource.Extn_GPS_PPS` in :meth:`snAPI.initDevice`. 153 | 154 | Hardware triggered measurements 155 | """"""""""""""""""""""""""""""" 156 | 157 | `Pins 19 and 20` can be used to implement hardware triggered measurements. Therefore ou have to set :meth:`Device.setMeasControl` 158 | to :obj:`MeasControl.C1Gated`, :obj:`MeasControl.C1StartCtcStop` or :obj:`MeasControl.C1StartC2Stop`. 159 | 160 | See: 161 | | :octicon:`mark-github` `Demo_HW_Start.py `_ 162 | | :octicon:`mark-github` `Demo_HW_StartStop.py `_ 163 | | :octicon:`mark-github` `Demo_HW_StartGated.py `_ 164 | 165 | 166 | Additional Features 167 | """"""""""""""""""" 168 | 169 | `Pin 22` is a TTL output that goes high when a measurement is running. 170 | `Pin 24` provides a 3.3 V DC supply voltage that external electronics can use. Under no circumstances must this 171 | line be shorted to ground or loaded in excess of the specified maximum current. 172 | `Pin 14, 18, 21, 23, and 25` are the common ground for the TTL signals and the DC supply line. They are also 173 | connected to the housing. 174 | 175 | .. note:: 176 | Appropriate cables for typical applications of the control port are available from PicoQuant. 177 | 178 | 179 | 15-pin sub-D 180 | ------------ 181 | 182 | Supported devices: [TH260] 183 | 184 | .. image:: _static/DE-15.png 185 | :class: p-2 186 | 187 | :figure-caption:`The control connector is a 15-pin female sub-D connector located on the slot bracket and labelled C.` 188 | 189 | The following table shows the control connector's pin assignments 190 | 191 | .. list-table:: Default Pin Assignments: 15-pin sub-D 192 | :widths: 20 30 200 193 | :header-rows: 1 194 | 195 | * - Pin # 196 | - I/O 197 | - Purpose/Description 198 | * - 1 199 | - TTL out 200 | - debug output - do not connect! 201 | * - 2 202 | - TTL in 203 | - disable sync channel (T2 mode only) 204 | * - 3 205 | - TTL out 206 | - high when measurement running 207 | * - 4 208 | - TTL in 209 | - marker 2 input 210 | * - 5 211 | - TTL in 212 | - marker 3 input 213 | * - 6 214 | - TTL in 215 | - disable input channel 1 216 | * - 7 217 | - NIM out 218 | - trigger out (programmable rate) 219 | * - 8 220 | - TTL in 221 | - disable input channel 2 222 | * - 9 223 | - TTL in 224 | - marker 1 input 225 | * - 10 226 | - TTL in 227 | - marker 4 input 228 | * - 11 229 | - DC out 230 | - + 5V ± 0.5V / ≤ 300 mA 231 | * - 12 232 | - GND 233 | - ground (0V) 234 | * - 13 235 | - TTL in 236 | - C1 `Start measurement` 237 | * - 14 238 | - GND 239 | - ground (0V) 240 | * - 15 241 | - GND 242 | - C2 `Stop measurement` 243 | 244 | 245 | Channel Disabling 246 | """"""""""""""""" 247 | 248 | `Pin 2, 6, and 8` accept the TTL compatible signals to disable event recording on individual channels. By default, 249 | when the respective pin is unconnected, recording is enabled. When the pin is driven by external logic 250 | then the `enabled` state is TTL low and the `disabled` state is TTL high. Note that the sync channel can only be 251 | disabled in T2 mode. Also note that this kind of enabling is not designed for precise timing in the sense of temporal 252 | gating. The temporal precision is only on the order on some tens of nanoseconds and disabling the channel does not prevent dead time. 253 | 254 | 255 | Markers 256 | """"""" 257 | 258 | `Pin 4, 5, 9 and 10` accept the TTL compatible synchronization signals that will be recorded as markers in 259 | TTTR mode. Note that this requires a `DUAL` model, markers are not supported in the `SINGLE` models. The 260 | pins are internally pulled down, so that they are inactive when left unconnected. The active edge 261 | can be set with :meth:`Device.setMarkerEdges`. 262 | Rise/fall times must be 10 ns or faster. Both high and low state must be at least 50 ns long. The clock 263 | period may therefore (in principle) be as short as 100 ns but data bus throughput constraints 264 | will apply. Each marker creates an additional TTTR record, so that one must ensure not to swamp the 265 | data stream with too many marker records. When bandwidth gets tight, markers take precedence over photon 266 | records, so that excess marker traffic can suppress photon records. In fast imaging applications it is therefore 267 | recommended not to use a pixel clock but a line clock only. Because each photon has a time tag, it is usually 268 | not necessary to use an additional pixel clock. 269 | 270 | 271 | Hardware triggered measurements 272 | """"""""""""""""""""""""""""""" 273 | 274 | `Pin 13 and 15` can be used to implement hardware triggered measurements. Therefore ou have to set :meth:`Device.setMeasControl` 275 | to :obj:`MeasControl.C1Gated`, :obj:`MeasControl.C1StartCtcStop` or :obj:`MeasControl.C1StartC2Stop`. 276 | 277 | See 278 | 279 | | :octicon:`mark-github` `Demo_HW_Start.py `_ 280 | | :octicon:`mark-github` `Demo_HW_StartStop.py `_ 281 | | :octicon:`mark-github` `Demo_HW_StartGated.py `_ 282 | 283 | 284 | Additional Features 285 | """"""""""""""""""" 286 | 287 | `Pin 7` provides a programmable trigger output for light sources. Trigger out is only available with TH260N or with TH260P 288 | in :meth:`Device.setTimingMode` set to 1 (long range mode). 289 | `Pin 11` provides a 5 V DC supply voltage external electronics can use. Under no circumstances must this line 290 | be shorted or loaded in excess of the specified maximum current. 291 | `Pin 12 and 14` are the common ground for the TTL signals and the DC supply line. They are also connected to 292 | the PC chassis. -------------------------------------------------------------------------------- /docs/_sources/hardware.controlConnector.rst.txt: -------------------------------------------------------------------------------- 1 | .. role:: fwLighter 2 | :class: fw-lighter 3 | 4 | Control Connector 5 | ================= 6 | 7 | 25-pin sub-D 8 | ------------ 9 | 10 | Supported devices: [MH150/160 | PH330] 11 | 12 | .. image:: _static/DB-25.png 13 | :class: p-2 14 | 15 | :figure-caption:`The control connector is a 25-pin female sub-D connector labeled CTRL.` 16 | 17 | The following figure shows the pin layout and the table below contains the connector's default pin assignments. 18 | 19 | .. list-table:: Default Pin Assignment: 25-pin sub-D 20 | :widths: 20 30 30 200 21 | :header-rows: 1 22 | 23 | * - Pin # 24 | - Name 25 | - I/O 26 | - Purpose/Description 27 | * - 1 28 | - GPIO 0 29 | - TTL in 30 | - marker 1 input 31 | * - 2 32 | - GPIO 1 33 | - TTL in 34 | - marker 2 input 35 | * - 3 36 | - GPIO 2 37 | - TTL in 38 | - marker 3 input 39 | * - 4 40 | - GPIO 3 41 | - TTL in 42 | - marker 4 input 43 | * - 5 44 | - GPIO 4 45 | - TTL in 46 | - reserved 47 | * - 6 48 | - GPIO 5 49 | - TTL in 50 | - reserved 51 | * - 7 52 | - GPIO 6 53 | - TTL in 54 | - reserved 55 | * - 8 56 | - GPIO 7 57 | - TTL in 58 | - reserved 59 | * - 9 60 | - GPIO 8 61 | - TTL in 62 | - reserved 63 | * - 10 64 | - GPIO 9 65 | - TTL in 66 | - reserved 67 | * - 11 68 | - GPIO 10 69 | - TTL in 70 | - reserved 71 | * - 12 72 | - GPIO 11 73 | - TTL in 74 | - reserved 75 | * - 13 76 | - GPIO 12 77 | - TTL in 78 | - reserved 79 | * - 14 80 | - GND 81 | - GND 82 | - reserved 83 | * - 15 84 | - GPIO 13 85 | - TTL in 86 | - reserved 87 | * - 16 88 | - GPIO 14 89 | - TTL in 90 | - ground (0V) 91 | * - 17 92 | - GPIO 15 93 | - TTL in 94 | - RS232 RX (3.3V signal level) for connection to GPS/GLONASS receiver 95 | * - 18 96 | - GND 97 | - GND 98 | - ground (0V) 99 | * - 19 100 | - C1 101 | - TTL in 102 | - start measurement 103 | * - 20 104 | - C2 105 | - TTL in 106 | - stop measurement 107 | * - 21 108 | - GND 109 | - GND 110 | - ground (0V) 111 | * - 22 112 | - MACT 113 | - TTL out 114 | - high when measurement running 115 | * - 23 116 | - GND 117 | - TTL in 118 | - ground (0V) 119 | * - 24 120 | - D3V3 121 | - DC out 122 | - +3.3V / ≤ 350 mA supply for external hardware add-ons 123 | * - 25 124 | - GND 125 | - GND 126 | - ground (0V) 127 | 128 | .. note:: 129 | A maximum high level of 3.3V is permitted. 130 | 131 | 132 | Marker 133 | """""" 134 | 135 | `Pin 1, 2, 3 and 4` accept TTL compatible synchronization signals that will be recorded as markers in T2/T3 136 | mode. The pins are internally pulled down, so that they are inactive when left unconnected. The active edge 137 | can be set with :meth:`Device.setMarkerEdges` and is at least 50 ns long. 138 | The clock period may therefore (in principle) be as short as about 100 ns but data bus throughput constraints will apply. 139 | Each marker creates an additional data record, so that one must ensure not to swamp the data stream with too many marker records. 140 | When bandwidth gets tight, markers take precedence over photon records, so that excess marker traffic can 141 | suppress photon records. In fast imaging applications it is therefore recommended not to use a pixel clock 142 | but a line clock only. Because each photon has a time tag, it is usually not necessary to use an additional 143 | pixel clock. 144 | 145 | 146 | External Clock 147 | """""""""""""" 148 | 149 | `Pin 17` can be used to connect the serial TX line of a GPS/GLONASS receiver for time transmission via the 150 | NMEA ZDA Message protocol at 115.2 kbps, 3.3V. We have successfully tested this with the Mini-T™ GG disciplined 151 | clock module from Trimble Inc., USA. 152 | Set :class:`snAPI.Constants.RefSource` to :obj:`RefSource.Extn_GPS_PPS` in :meth:`snAPI.initDevice`. 153 | 154 | Hardware triggered measurements 155 | """"""""""""""""""""""""""""""" 156 | 157 | `Pins 19 and 20` can be used to implement hardware triggered measurements. Therefore ou have to set :meth:`Device.setMeasControl` 158 | to :obj:`MeasControl.C1Gated`, :obj:`MeasControl.C1StartCtcStop` or :obj:`MeasControl.C1StartC2Stop`. 159 | 160 | See: 161 | | :octicon:`mark-github` `Demo_HW_Start.py `_ 162 | | :octicon:`mark-github` `Demo_HW_StartStop.py `_ 163 | | :octicon:`mark-github` `Demo_HW_StartGated.py `_ 164 | 165 | 166 | Additional Features 167 | """"""""""""""""""" 168 | 169 | `Pin 22` is a TTL output that goes high when a measurement is running. 170 | `Pin 24` provides a 3.3 V DC supply voltage that external electronics can use. Under no circumstances must this 171 | line be shorted to ground or loaded in excess of the specified maximum current. 172 | `Pin 14, 18, 21, 23, and 25` are the common ground for the TTL signals and the DC supply line. They are also 173 | connected to the housing. 174 | 175 | .. note:: 176 | Appropriate cables for typical applications of the control port are available from PicoQuant. 177 | 178 | 179 | 15-pin sub-D 180 | ------------ 181 | 182 | Supported devices: [TH260] 183 | 184 | .. image:: _static/DE-15.png 185 | :class: p-2 186 | 187 | :figure-caption:`The control connector is a 15-pin female sub-D connector located on the slot bracket and labelled C.` 188 | 189 | The following table shows the control connector's pin assignments 190 | 191 | .. list-table:: Default Pin Assignments: 15-pin sub-D 192 | :widths: 20 30 200 193 | :header-rows: 1 194 | 195 | * - Pin # 196 | - I/O 197 | - Purpose/Description 198 | * - 1 199 | - TTL out 200 | - debug output - do not connect! 201 | * - 2 202 | - TTL in 203 | - disable sync channel (T2 mode only) 204 | * - 3 205 | - TTL out 206 | - high when measurement running 207 | * - 4 208 | - TTL in 209 | - marker 2 input 210 | * - 5 211 | - TTL in 212 | - marker 3 input 213 | * - 6 214 | - TTL in 215 | - disable input channel 1 216 | * - 7 217 | - NIM out 218 | - trigger out (programmable rate) 219 | * - 8 220 | - TTL in 221 | - disable input channel 2 222 | * - 9 223 | - TTL in 224 | - marker 1 input 225 | * - 10 226 | - TTL in 227 | - marker 4 input 228 | * - 11 229 | - DC out 230 | - + 5V ± 0.5V / ≤ 300 mA 231 | * - 12 232 | - GND 233 | - ground (0V) 234 | * - 13 235 | - TTL in 236 | - C1 `Start measurement` 237 | * - 14 238 | - GND 239 | - ground (0V) 240 | * - 15 241 | - GND 242 | - C2 `Stop measurement` 243 | 244 | 245 | Channel Disabling 246 | """"""""""""""""" 247 | 248 | `Pin 2, 6, and 8` accept the TTL compatible signals to disable event recording on individual channels. By default, 249 | when the respective pin is unconnected, recording is enabled. When the pin is driven by external logic 250 | then the `enabled` state is TTL low and the `disabled` state is TTL high. Note that the sync channel can only be 251 | disabled in T2 mode. Also note that this kind of enabling is not designed for precise timing in the sense of temporal 252 | gating. The temporal precision is only on the order on some tens of nanoseconds and disabling the channel does not prevent dead time. 253 | 254 | 255 | Markers 256 | """"""" 257 | 258 | `Pin 4, 5, 9 and 10` accept the TTL compatible synchronization signals that will be recorded as markers in 259 | TTTR mode. Note that this requires a `DUAL` model, markers are not supported in the `SINGLE` models. The 260 | pins are internally pulled down, so that they are inactive when left unconnected. The active edge 261 | can be set with :meth:`Device.setMarkerEdges`. 262 | Rise/fall times must be 10 ns or faster. Both high and low state must be at least 50 ns long. The clock 263 | period may therefore (in principle) be as short as 100 ns but data bus throughput constraints 264 | will apply. Each marker creates an additional TTTR record, so that one must ensure not to swamp the 265 | data stream with too many marker records. When bandwidth gets tight, markers take precedence over photon 266 | records, so that excess marker traffic can suppress photon records. In fast imaging applications it is therefore 267 | recommended not to use a pixel clock but a line clock only. Because each photon has a time tag, it is usually 268 | not necessary to use an additional pixel clock. 269 | 270 | 271 | Hardware triggered measurements 272 | """"""""""""""""""""""""""""""" 273 | 274 | `Pin 13 and 15` can be used to implement hardware triggered measurements. Therefore ou have to set :meth:`Device.setMeasControl` 275 | to :obj:`MeasControl.C1Gated`, :obj:`MeasControl.C1StartCtcStop` or :obj:`MeasControl.C1StartC2Stop`. 276 | 277 | See 278 | 279 | | :octicon:`mark-github` `Demo_HW_Start.py `_ 280 | | :octicon:`mark-github` `Demo_HW_StartStop.py `_ 281 | | :octicon:`mark-github` `Demo_HW_StartGated.py `_ 282 | 283 | 284 | Additional Features 285 | """"""""""""""""""" 286 | 287 | `Pin 7` provides a programmable trigger output for light sources. Trigger out is only available with TH260N or with TH260P 288 | in :meth:`Device.setTimingMode` set to 1 (long range mode). 289 | `Pin 11` provides a 5 V DC supply voltage external electronics can use. Under no circumstances must this line 290 | be shorted or loaded in excess of the specified maximum current. 291 | `Pin 12 and 14` are the common ground for the TTL signals and the DC supply line. They are also connected to 292 | the PC chassis. -------------------------------------------------------------------------------- /docs/_sources/hardware.rst.txt: -------------------------------------------------------------------------------- 1 | Hardware 2 | ======== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :glob: 7 | :caption: Contents: 8 | 9 | hardware.controlConnector -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. PQ documentation master file, created by 2 | sphinx-quickstart on Thu Apr 13 12:25:58 2023. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to snAPI's documentation! 7 | ================================= 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | :glob: 12 | :caption: Contents: 13 | 14 | introduction 15 | install 16 | snAPI 17 | config 18 | tttr data format 19 | hardware 20 | 21 | Indices and tables 22 | ================== 23 | 24 | * :ref:`genindex` 25 | * :ref:`modindex` 26 | * :ref:`search` 27 | 28 | .. note:: 29 | This API is still under active development, and we make no promises 30 | about the stability of any specific code structure, variables, etc. 31 | Make these customizations at your own risk, and pin versions if you're 32 | worried about breaking changes! 33 | 34 | -------------------------------------------------------------------------------- /docs/_sources/install.rst.txt: -------------------------------------------------------------------------------- 1 | .. role:: fwLighter 2 | :class: fw-lighter 3 | 4 | Installation 5 | ============ 6 | 7 | Python 8 | ------ 9 | 10 | To install the package, follow these steps: 11 | 12 | 1. Install the Microsoft Visual C++ Redistributable(x64) if missing in the system: https://aka.ms/vs/17/release/vc_redist.x64.exe. 13 | 2. First, download and install the latest version of Python 3.13 from the official Python website: https://www.python.org/downloads/ 14 | 3. Once you have installed Python 3.13, open a command prompt or terminal window. 15 | 16 | 4. Right-click on "Command Prompt" and select "Run as administrator". 17 | 18 | :: 19 | 20 | setx PATH "%USERPROFILE%\AppData\Local\Programs\Python\Python313;%USERPROFILE%\AppData\Local\Programs\Python\Python313\Scripts;%PATH%" /M 21 | 22 | This will add the Python 3.13 installation directory to the system path variable. 23 | 24 | 5. Close the Command Prompt and open a new one to ensure that the changes take effect. 25 | 6. Check if Python is installed correctly by typing the following command: 26 | 27 | :: 28 | 29 | python --version 30 | 31 | This should output the version number of Python that you have installed. 32 | 33 | 7. Next, you will need to install the `pip` package manager. To do this, type the following command: 34 | 35 | :: 36 | 37 | python -m ensurepip --upgrade 38 | 39 | This will install or upgrade `pip` to the latest version. 40 | 41 | snAPI 42 | ----- 43 | 44 | 1. Download the latest release from `github.com/picoQuant/snAPI/releases `_ from the repository: https://github.com/picoquant/snapi 45 | 46 | 2. Finally, you can unpack the files and install your package using `pip`. Navigate to the directory where your package is located, and type the following command: 47 | 48 | :: 49 | 50 | pip install .\dist\snAPI--cp313-cp313-win_amd64.whl 51 | 52 | Dependencies 53 | ------------ 54 | 55 | 1. Download and install the software for the product you need: 56 | - https://www.picoquant.com/dl_software/MultiHarp150/MultiHarp150_160_V3_1.zip 57 | - https://www.picoquant.com/dl_software/HydraHarp400/HydraHarp400_SW_and_DLL_v3_0_0_4.zip 58 | - https://www.picoquant.com/dl_software/TimeHarp260/TimeHarp260_SW_and_DLL_V3_2.zip 59 | - https://www.picoquant.com/dl_software/PicoHarp330/PicoHarp330_SW_and_DLL_v1_0.zip 60 | 61 | 2. Start the Harp Software and check if the device is working. 62 | 63 | 3. Once the installation is complete, verify that the package is installed by running the command `import snAPI` in a Python interpreter. If no error message is shown, the installation was successful. 64 | 65 | Additional Features 66 | ------------------- 67 | 68 | 1. Colored Log is default on Windows 11 but on Windows 10 you have to enable it manually in terminal by executing the included registry key `EnableTerminalColors.reg` and restart the terminal. If it is not working in VSCode, klick on the selector next to the run button and switch to 'Run python file in dedicated Terminal' 69 | 70 | .. image:: _static/Log.png 71 | :class: p-2 72 | 73 | Example cutout of a colored log. 74 | 75 | 2. To get the full power of coding we suggest to use snAPI with Visual Studio Code. 76 | 77 | .. image:: _static/VSCode.png 78 | :class: p-2 79 | 80 | VSCode will show the documentation on mouse hover. 81 | 82 | Getting Started 83 | --------------- 84 | 85 | 1. Open a command prompt and navigate to the demos folder. 86 | 87 | 2. Open Demo_TimeTrace.py in an editor. 88 | 89 | 3. Also change the default configuration to the matching one from the demos/config folder. 90 | 91 | :: 92 | 93 | sn.loadIniConfig("config\TH260N.ini") 94 | 95 | 4. edit the ini file and set the trigger levels 96 | 97 | 5. install matplotlib 98 | 99 | :: 100 | 101 | pip install matplotlib 102 | 103 | 6. run the demo 104 | 105 | :: 106 | 107 | python .\Demo_TimeTrace.py 108 | 109 | .. image:: _static/TimeTrace.png 110 | :class: p-2 111 | 112 | example of a timetrace window drawn by matplotlib -------------------------------------------------------------------------------- /docs/_sources/introduction.rst.txt: -------------------------------------------------------------------------------- 1 | .. role:: fwLighter 2 | :class: fw-lighter 3 | 4 | Introduction 5 | ============ 6 | 7 | | Our Snappy New API (short snAPI) is a powerful Python wrapper which enables seamless 8 | | communication and configuration with PicoQuant Time Correlated Single Photon Counting 9 | | Instruments (TCSPC devices). It harnesses the advantages of C++ for optimal speed and 10 | | performance and bridges the gap between the high-speed capabilities of your PicoQuant 11 | | TCSPC device and the ease of use and versatility of Python. 12 | 13 | | snAPI provides a high-level interface to the underlying C++ library and enables users to tap 14 | | into the full potential of your TCSPC device while maintaining the flexibility and versatility 15 | | of the Python programming language. The low-level control offered by C++ ensures smooth 16 | | and efficient data processing, enabling efficient handling of large photon counts and their 17 | | real-time analysis. Additionally, snAPI introduces another dimension of flexibility by 18 | | providing the option to access unfolded data from your PicoQuant TCSPC device. This opens a whole 19 | | new realm of possibilities, allowing researchers, developers, and scientists to delve deeper 20 | | into their data and extract valuable insights. 21 | 22 | | By leveraging the power of Python users can build their own algorithms, implement complex 23 | | calculations, and develop tailored data processing pipelines for analysis. With snAPI, users 24 | | can make use of advanced measurement classes such as timetrace, histogram, unfold, raw and 25 | | correlation (e.g, FCS, g2), without worrying about the intricacies of device handling. The 26 | | measurement classes can be sequentially combined with data manipulators (e.g. coincidence, 27 | | herald, merge, delay) to provide maximum flexibility in analysis. 28 | 29 | | snAPI is free to use and compatible with PicoQuant `TimeHarp 260 `_ (drivers optional), 30 | | `MultiHarp 160 `_, `MultiHarp 150 `_, `HydraHarp 400 `_ and `PicoHarp 330 `_. 31 | | To get started users just need a PicoQuant TCSPC device, its Library/DLL, Python, and snAPI. 32 | -------------------------------------------------------------------------------- /docs/_sources/snAPI.Constants.rst.txt: -------------------------------------------------------------------------------- 1 | snAPI.Constants module 2 | ====================== 3 | 4 | .. automodule:: snAPI.Constants 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_sources/snAPI.Main.rst.txt: -------------------------------------------------------------------------------- 1 | snAPI.Main module 2 | ================= 3 | 4 | .. automodule:: snAPI.Main 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_sources/snAPI.Utils.rst.txt: -------------------------------------------------------------------------------- 1 | snAPI.Utils module 2 | ================== 3 | 4 | .. automodule:: snAPI.Utils 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_sources/snAPI.rst.txt: -------------------------------------------------------------------------------- 1 | snAPI package 2 | ============= 3 | 4 | Submodules 5 | ---------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | snAPI.Constants 11 | snAPI.Main 12 | snAPI.Utils 13 | 14 | Module contents 15 | --------------- 16 | 17 | .. automodule:: snAPI 18 | :members: 19 | :undoc-members: 20 | :show-inheritance: 21 | -------------------------------------------------------------------------------- /docs/_sources/tttr data format.rst.txt: -------------------------------------------------------------------------------- 1 | TTTR Record Format 2 | ================== 3 | 4 | Basic record format 5 | --------------------- 6 | 7 | This page describes the format of the TTTR data named as raw data in ptu files. 8 | 9 | Due to performance reasons the TTTR data are saved exactly as received from TCSPC device, hence the format of the TTTR records depends on the kind of TCSPC device and the type of measurement. The record format used in a particular file is denoted in the mandatory tag TTResultFormat_TTTRRecType. 10 | 11 | Even though the record formats differ, the formal algorithms for the calculations on them don't: To get the global arrival time of a photon or a marker in seconds, count the overflows until the current position and multiply with the overflow period, then add the timetag (for T2) or nSync (for T3) and multiply with the MeasDesc_GlobalResolution. 12 | 13 | The arrival time since the last sync event in T3 measurements is denoted in dTime. To get the time in seconds multiply dTime with MeasDesc_Resolution. 14 | 15 | Images 16 | """""" 17 | (all Formats) 18 | To reconstruct the image one needs marker defined as a line start, line stop and frame trigger. The corresponding header entries are ImgHdr_LineStart, ImgHdr_LineStop and ImgHdr_Frame. The line start and line stop markers mark the real start and stop of image line, a frame marker define a change of the frame. 19 | 20 | The default setting is a linear movement of the scanner between line start and line stop marker, the length of one pixel in this case is given by the length of line (arrival time of line stop marker - arrival time of line start marker) divided by the number of pixels in the line. 21 | Some scanner have a sinusoidal movement, such files have the header entry ImgHdr_SinCorrection which defines the percentage of a sinus curve is covered by the line and must be used to calculate the length of every pixel. 22 | The number of pixels in a line is defined by ImgHdr_PixX. The number of lines is given by ImgHdr_PixY. Attention, in some images one will find a different number of lines than defined by PixY (less or more, even different in every frame), so do not trust this value. 23 | Notice 1: The markers are bit coded in the TTTR records (see below), multiple markers can appear at once; Especially the frame marker often overlay with a line start or line stop marker. 24 | Notice 2: The marker positions in MicroTime200 images are different than before in the SymPhoTime 32. When a MicroTime200 image is converted for the new software the markers are relocated to match the real line start, line stop position. 25 | 26 | TCSPC specific record formats 27 | ----------------------------- 28 | 29 | Currently the following formats are defined: 30 | 31 | | PicoHarp T3: 0x00010303 32 | | PicoHarp T2: 0x00010203 33 | | HydraHarp V1.x T3: 0x00010304 34 | | HydraHarp V1.x T2: 0x00010204 35 | | HydraHarp V2.x T3: 0x01010304 36 | | HydraHarp V2.x T2: 0x01010204 37 | | TimeHarp 260N T2: 0x00010205 38 | | TimeHarp 260N T3: 0x00010305 39 | | TimeHarp 260P T2: 0x00010206 40 | | TimeHarp 260P T3: 0x00010306 41 | | MultiHarp T2: 0x00010207 42 | | MultiHarp T3: 0x00010307 43 | 44 | HydraHarp, MultiHarp and TimeHarp260 T2 Format 45 | """""""""""""""""""""""""""""""""""""""""""""" 46 | 47 | | RecType: 0x00010204 (not supported) 48 | | Overflow period: 33552000 (0x1FFF680) 49 | | Record Size: 32 Bit = 4 Byte 50 | 51 | | RecTypes: 0x01010204, 0x01010205, 0x01010206, 0x01010207 52 | | Overflow period: 33554432 (0x2000000) 53 | | Record Size: 32 Bit = 4 Byte 54 | 55 | The bit allocation in the record is, starting from the MSB: 56 | 57 | - special: 1 58 | - channel: 6 59 | - timetag: 25 60 | 61 | If the special bit is clear, it's a regular event record. 62 | If the special bit is set, the following interpretation of the channel code is given: 63 | 64 | channel code 63 (0x3F) identifies a timetag overflow, increment the overflow timetag accumulator. For HydraHarp V1 (0x00010204) it always means one overflow. For all other types the number of overflows can be read from timetag value. 65 | channel code 0 (0x00) identifies a sync event, 66 | channel codes from 1 to 15 (4 bit = 4 marker) identify markers, the individual bits are external markers. 67 | 68 | HydraHarp, MultiHarp and TimeHarp260 T3 Format 69 | """""""""""""""""""""""""""""""""""""""""""""" 70 | 71 | | RecType: 0x00010304, 0x01010304, 0x00010305, 0x00010306, 0x00010307 72 | | Overflow period: 1024 73 | | Record Size: 32 Bit = 4 Byte 74 | 75 | The bit allocation in the record is, starting from the MSB: 76 | 77 | - special: 1 78 | - channel: 6 79 | - dTime: 15 80 | - nSync: 10 81 | 82 | If the special bit is clear, it's a regular event record. 83 | If the special bit is set, the following interpretation of the channel code is given: 84 | channel code 63 (0x3F) identifies a sync count overflow, increment the sync count overflow accumulator. 85 | For HydraHarp V1 (0x00010304) it means always one overflow. For all other types the number of overflows can be read from nSync value. 86 | channel codes from 1 to 15 (4 bit = 4 marker) identify markers, the individual bits are external markers. 87 | 88 | PicoHarp T2 Format (not supported) 89 | """""""""""""""""""""""""""""""""" 90 | 91 | | RecType: 0x00010203 92 | | Overflow period: 210698240 (0xC8F0000) 93 | | Record Size: 32 Bit = 4 Byte 94 | 95 | The bit allocation in the record is, starting from the MSB: 96 | 97 | - channel: 4 98 | - timetag: 28 99 | 100 | The channel code 15 (0xF) marks a special record. 101 | Special records can be overflows or external markers. To differentiate this, the lower 4 bits of timetag must be checked. 102 | 103 | If they are all zero, the record marks an overflow. 104 | If they are >=1 the individual bits are external markers. 105 | 106 | PicoHarp T3 Format (not supported) 107 | """""""""""""""""""""""""""""""""" 108 | 109 | | RecType: 0x00010303 110 | | Overflow period: 65536 (0x10000) 111 | | Record Size: 32 Bit = 4 Byte 112 | 113 | The bit allocation in the record is, starting from the MSB: 114 | 115 | - channel: 4 116 | - dTime: 12 117 | - nSync: 16 118 | 119 | The channel code 15 (0xF) marks a special record. 120 | Special records can be overflows or external markers. To differentiate this, dTime must be checked. 121 | 122 | If it is zero, the record marks an overflow. 123 | If it is >=1 the individual bits are external markers. -------------------------------------------------------------------------------- /docs/_sphinx_design_static/design-tabs.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | // Extra JS capability for selected tabs to be synced 4 | // The selection is stored in local storage so that it persists across page loads. 5 | 6 | /** 7 | * @type {Record} 8 | */ 9 | let sd_id_to_elements = {}; 10 | const storageKeyPrefix = "sphinx-design-tab-id-"; 11 | 12 | /** 13 | * Create a key for a tab element. 14 | * @param {HTMLElement} el - The tab element. 15 | * @returns {[string, string, string] | null} - The key. 16 | * 17 | */ 18 | function create_key(el) { 19 | let syncId = el.getAttribute("data-sync-id"); 20 | let syncGroup = el.getAttribute("data-sync-group"); 21 | if (!syncId || !syncGroup) return null; 22 | return [syncGroup, syncId, syncGroup + "--" + syncId]; 23 | } 24 | 25 | /** 26 | * Initialize the tab selection. 27 | * 28 | */ 29 | function ready() { 30 | // Find all tabs with sync data 31 | 32 | /** @type {string[]} */ 33 | let groups = []; 34 | 35 | document.querySelectorAll(".sd-tab-label").forEach((label) => { 36 | if (label instanceof HTMLElement) { 37 | let data = create_key(label); 38 | if (data) { 39 | let [group, id, key] = data; 40 | 41 | // add click event listener 42 | // @ts-ignore 43 | label.onclick = onSDLabelClick; 44 | 45 | // store map of key to elements 46 | if (!sd_id_to_elements[key]) { 47 | sd_id_to_elements[key] = []; 48 | } 49 | sd_id_to_elements[key].push(label); 50 | 51 | if (groups.indexOf(group) === -1) { 52 | groups.push(group); 53 | // Check if a specific tab has been selected via URL parameter 54 | const tabParam = new URLSearchParams(window.location.search).get( 55 | group 56 | ); 57 | if (tabParam) { 58 | console.log( 59 | "sphinx-design: Selecting tab id for group '" + 60 | group + 61 | "' from URL parameter: " + 62 | tabParam 63 | ); 64 | window.sessionStorage.setItem(storageKeyPrefix + group, tabParam); 65 | } 66 | } 67 | 68 | // Check is a specific tab has been selected previously 69 | let previousId = window.sessionStorage.getItem( 70 | storageKeyPrefix + group 71 | ); 72 | if (previousId === id) { 73 | // console.log( 74 | // "sphinx-design: Selecting tab from session storage: " + id 75 | // ); 76 | // @ts-ignore 77 | label.previousElementSibling.checked = true; 78 | } 79 | } 80 | } 81 | }); 82 | } 83 | 84 | /** 85 | * Activate other tabs with the same sync id. 86 | * 87 | * @this {HTMLElement} - The element that was clicked. 88 | */ 89 | function onSDLabelClick() { 90 | let data = create_key(this); 91 | if (!data) return; 92 | let [group, id, key] = data; 93 | for (const label of sd_id_to_elements[key]) { 94 | if (label === this) continue; 95 | // @ts-ignore 96 | label.previousElementSibling.checked = true; 97 | } 98 | window.sessionStorage.setItem(storageKeyPrefix + group, id); 99 | } 100 | 101 | document.addEventListener("DOMContentLoaded", ready, false); 102 | -------------------------------------------------------------------------------- /docs/_static/01_Histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/01_Histogram.png -------------------------------------------------------------------------------- /docs/_static/01_Histogram_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/01_Histogram_dark.png -------------------------------------------------------------------------------- /docs/_static/02_TimeTrace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/02_TimeTrace.png -------------------------------------------------------------------------------- /docs/_static/02_TimeTrace_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/02_TimeTrace_dark.png -------------------------------------------------------------------------------- /docs/_static/03_Correlation_Antibunching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/03_Correlation_Antibunching.png -------------------------------------------------------------------------------- /docs/_static/03_Correlation_Antibunching_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/03_Correlation_Antibunching_dark.png -------------------------------------------------------------------------------- /docs/_static/03_Correlation_Bunching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/03_Correlation_Bunching.png -------------------------------------------------------------------------------- /docs/_static/03_Correlation_Bunching_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/03_Correlation_Bunching_dark.png -------------------------------------------------------------------------------- /docs/_static/04_Coincidence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/04_Coincidence.png -------------------------------------------------------------------------------- /docs/_static/04_Coincidence_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/04_Coincidence_02.png -------------------------------------------------------------------------------- /docs/_static/04_Coincidence_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/04_Coincidence_dark.png -------------------------------------------------------------------------------- /docs/_static/05_Delay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/05_Delay.png -------------------------------------------------------------------------------- /docs/_static/05_Delay_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/05_Delay_02.png -------------------------------------------------------------------------------- /docs/_static/05_Delay_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/05_Delay_dark.png -------------------------------------------------------------------------------- /docs/_static/06_Merge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/06_Merge.png -------------------------------------------------------------------------------- /docs/_static/06_Merge_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/06_Merge_02.png -------------------------------------------------------------------------------- /docs/_static/06_Merge_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/06_Merge_dark.png -------------------------------------------------------------------------------- /docs/_static/07_Herald.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/07_Herald.png -------------------------------------------------------------------------------- /docs/_static/07_Herald_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/07_Herald_02.png -------------------------------------------------------------------------------- /docs/_static/07_Herald_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/07_Herald_dark.png -------------------------------------------------------------------------------- /docs/_static/08_snAPI_Flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/08_snAPI_Flow.png -------------------------------------------------------------------------------- /docs/_static/08_snAPI_Flow_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/08_snAPI_Flow_dark.png -------------------------------------------------------------------------------- /docs/_static/Coincidence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/Coincidence.png -------------------------------------------------------------------------------- /docs/_static/Coincidence_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/Coincidence_dark.png -------------------------------------------------------------------------------- /docs/_static/Coioncidence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/Coioncidence.png -------------------------------------------------------------------------------- /docs/_static/DB-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/DB-25.png -------------------------------------------------------------------------------- /docs/_static/DE-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/DE-15.png -------------------------------------------------------------------------------- /docs/_static/Delay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/Delay.png -------------------------------------------------------------------------------- /docs/_static/G2_Correlation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/G2_Correlation.png -------------------------------------------------------------------------------- /docs/_static/Herald.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/Herald.png -------------------------------------------------------------------------------- /docs/_static/Heralded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/Heralded.png -------------------------------------------------------------------------------- /docs/_static/Histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/Histogram.png -------------------------------------------------------------------------------- /docs/_static/Log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/Log.png -------------------------------------------------------------------------------- /docs/_static/MultiHarp-160.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/MultiHarp-160.jpg -------------------------------------------------------------------------------- /docs/_static/T2_mode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/T2_mode.jpg -------------------------------------------------------------------------------- /docs/_static/T3_mode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/T3_mode.jpg -------------------------------------------------------------------------------- /docs/_static/TimeTrace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/TimeTrace.png -------------------------------------------------------------------------------- /docs/_static/VSCode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/VSCode.png -------------------------------------------------------------------------------- /docs/_static/design-tabs.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | // Extra JS capability for selected tabs to be synced 4 | // The selection is stored in local storage so that it persists across page loads. 5 | 6 | /** 7 | * @type {Record} 8 | */ 9 | let sd_id_to_elements = {}; 10 | const storageKeyPrefix = "sphinx-design-tab-id-"; 11 | 12 | /** 13 | * Create a key for a tab element. 14 | * @param {HTMLElement} el - The tab element. 15 | * @returns {[string, string, string] | null} - The key. 16 | * 17 | */ 18 | function create_key(el) { 19 | let syncId = el.getAttribute("data-sync-id"); 20 | let syncGroup = el.getAttribute("data-sync-group"); 21 | if (!syncId || !syncGroup) return null; 22 | return [syncGroup, syncId, syncGroup + "--" + syncId]; 23 | } 24 | 25 | /** 26 | * Initialize the tab selection. 27 | * 28 | */ 29 | function ready() { 30 | // Find all tabs with sync data 31 | 32 | /** @type {string[]} */ 33 | let groups = []; 34 | 35 | document.querySelectorAll(".sd-tab-label").forEach((label) => { 36 | if (label instanceof HTMLElement) { 37 | let data = create_key(label); 38 | if (data) { 39 | let [group, id, key] = data; 40 | 41 | // add click event listener 42 | // @ts-ignore 43 | label.onclick = onSDLabelClick; 44 | 45 | // store map of key to elements 46 | if (!sd_id_to_elements[key]) { 47 | sd_id_to_elements[key] = []; 48 | } 49 | sd_id_to_elements[key].push(label); 50 | 51 | if (groups.indexOf(group) === -1) { 52 | groups.push(group); 53 | // Check if a specific tab has been selected via URL parameter 54 | const tabParam = new URLSearchParams(window.location.search).get( 55 | group 56 | ); 57 | if (tabParam) { 58 | console.log( 59 | "sphinx-design: Selecting tab id for group '" + 60 | group + 61 | "' from URL parameter: " + 62 | tabParam 63 | ); 64 | window.sessionStorage.setItem(storageKeyPrefix + group, tabParam); 65 | } 66 | } 67 | 68 | // Check is a specific tab has been selected previously 69 | let previousId = window.sessionStorage.getItem( 70 | storageKeyPrefix + group 71 | ); 72 | if (previousId === id) { 73 | // console.log( 74 | // "sphinx-design: Selecting tab from session storage: " + id 75 | // ); 76 | // @ts-ignore 77 | label.previousElementSibling.checked = true; 78 | } 79 | } 80 | } 81 | }); 82 | } 83 | 84 | /** 85 | * Activate other tabs with the same sync id. 86 | * 87 | * @this {HTMLElement} - The element that was clicked. 88 | */ 89 | function onSDLabelClick() { 90 | let data = create_key(this); 91 | if (!data) return; 92 | let [group, id, key] = data; 93 | for (const label of sd_id_to_elements[key]) { 94 | if (label === this) continue; 95 | // @ts-ignore 96 | label.previousElementSibling.checked = true; 97 | } 98 | window.sessionStorage.setItem(storageKeyPrefix + group, id); 99 | } 100 | 101 | document.addEventListener("DOMContentLoaded", ready, false); 102 | -------------------------------------------------------------------------------- /docs/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Base JavaScript utilities for all Sphinx HTML documentation. 3 | */ 4 | "use strict"; 5 | 6 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 7 | "TEXTAREA", 8 | "INPUT", 9 | "SELECT", 10 | "BUTTON", 11 | ]); 12 | 13 | const _ready = (callback) => { 14 | if (document.readyState !== "loading") { 15 | callback(); 16 | } else { 17 | document.addEventListener("DOMContentLoaded", callback); 18 | } 19 | }; 20 | 21 | /** 22 | * Small JavaScript module for the documentation. 23 | */ 24 | const Documentation = { 25 | init: () => { 26 | Documentation.initDomainIndexTable(); 27 | Documentation.initOnKeyListeners(); 28 | }, 29 | 30 | /** 31 | * i18n support 32 | */ 33 | TRANSLATIONS: {}, 34 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 35 | LOCALE: "unknown", 36 | 37 | // gettext and ngettext don't access this so that the functions 38 | // can safely bound to a different name (_ = Documentation.gettext) 39 | gettext: (string) => { 40 | const translated = Documentation.TRANSLATIONS[string]; 41 | switch (typeof translated) { 42 | case "undefined": 43 | return string; // no translation 44 | case "string": 45 | return translated; // translation exists 46 | default: 47 | return translated[0]; // (singular, plural) translation tuple exists 48 | } 49 | }, 50 | 51 | ngettext: (singular, plural, n) => { 52 | const translated = Documentation.TRANSLATIONS[singular]; 53 | if (typeof translated !== "undefined") 54 | return translated[Documentation.PLURAL_EXPR(n)]; 55 | return n === 1 ? singular : plural; 56 | }, 57 | 58 | addTranslations: (catalog) => { 59 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 60 | Documentation.PLURAL_EXPR = new Function( 61 | "n", 62 | `return (${catalog.plural_expr})` 63 | ); 64 | Documentation.LOCALE = catalog.locale; 65 | }, 66 | 67 | /** 68 | * helper function to focus on search bar 69 | */ 70 | focusSearchBar: () => { 71 | document.querySelectorAll("input[name=q]")[0]?.focus(); 72 | }, 73 | 74 | /** 75 | * Initialise the domain index toggle buttons 76 | */ 77 | initDomainIndexTable: () => { 78 | const toggler = (el) => { 79 | const idNumber = el.id.substr(7); 80 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 81 | if (el.src.substr(-9) === "minus.png") { 82 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 83 | toggledRows.forEach((el) => (el.style.display = "none")); 84 | } else { 85 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 86 | toggledRows.forEach((el) => (el.style.display = "")); 87 | } 88 | }; 89 | 90 | const togglerElements = document.querySelectorAll("img.toggler"); 91 | togglerElements.forEach((el) => 92 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 93 | ); 94 | togglerElements.forEach((el) => (el.style.display = "")); 95 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 96 | }, 97 | 98 | initOnKeyListeners: () => { 99 | // only install a listener if it is really needed 100 | if ( 101 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 102 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 103 | ) 104 | return; 105 | 106 | document.addEventListener("keydown", (event) => { 107 | // bail for input elements 108 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 109 | // bail with special keys 110 | if (event.altKey || event.ctrlKey || event.metaKey) return; 111 | 112 | if (!event.shiftKey) { 113 | switch (event.key) { 114 | case "ArrowLeft": 115 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 116 | 117 | const prevLink = document.querySelector('link[rel="prev"]'); 118 | if (prevLink && prevLink.href) { 119 | window.location.href = prevLink.href; 120 | event.preventDefault(); 121 | } 122 | break; 123 | case "ArrowRight": 124 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 125 | 126 | const nextLink = document.querySelector('link[rel="next"]'); 127 | if (nextLink && nextLink.href) { 128 | window.location.href = nextLink.href; 129 | event.preventDefault(); 130 | } 131 | break; 132 | } 133 | } 134 | 135 | // some keyboard layouts may need Shift to get / 136 | switch (event.key) { 137 | case "/": 138 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 139 | Documentation.focusSearchBar(); 140 | event.preventDefault(); 141 | } 142 | }); 143 | }, 144 | }; 145 | 146 | // quick alias for translations 147 | const _ = Documentation.gettext; 148 | 149 | _ready(Documentation.init); 150 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | const DOCUMENTATION_OPTIONS = { 2 | VERSION: '', 3 | LANGUAGE: 'en', 4 | COLLAPSE_INDEX: false, 5 | BUILDER: 'html', 6 | FILE_SUFFIX: '.html', 7 | LINK_SUFFIX: '.html', 8 | HAS_SOURCE: true, 9 | SOURCELINK_SUFFIX: '.txt', 10 | NAVIGATION_WITH_KEYS: true, 11 | SHOW_SEARCH_SUMMARY: true, 12 | ENABLE_SEARCH_SHORTCUTS: true, 13 | }; -------------------------------------------------------------------------------- /docs/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/favicon.ico -------------------------------------------------------------------------------- /docs/_static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/favicon.png -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/language_data.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This script contains the language-specific data used by searchtools.js, 3 | * namely the list of stopwords, stemmer, scorer and splitter. 4 | */ 5 | 6 | var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; 7 | 8 | 9 | /* Non-minified version is copied as a separate JS file, if available */ 10 | 11 | /** 12 | * Porter Stemmer 13 | */ 14 | var Stemmer = function() { 15 | 16 | var step2list = { 17 | ational: 'ate', 18 | tional: 'tion', 19 | enci: 'ence', 20 | anci: 'ance', 21 | izer: 'ize', 22 | bli: 'ble', 23 | alli: 'al', 24 | entli: 'ent', 25 | eli: 'e', 26 | ousli: 'ous', 27 | ization: 'ize', 28 | ation: 'ate', 29 | ator: 'ate', 30 | alism: 'al', 31 | iveness: 'ive', 32 | fulness: 'ful', 33 | ousness: 'ous', 34 | aliti: 'al', 35 | iviti: 'ive', 36 | biliti: 'ble', 37 | logi: 'log' 38 | }; 39 | 40 | var step3list = { 41 | icate: 'ic', 42 | ative: '', 43 | alize: 'al', 44 | iciti: 'ic', 45 | ical: 'ic', 46 | ful: '', 47 | ness: '' 48 | }; 49 | 50 | var c = "[^aeiou]"; // consonant 51 | var v = "[aeiouy]"; // vowel 52 | var C = c + "[^aeiouy]*"; // consonant sequence 53 | var V = v + "[aeiou]*"; // vowel sequence 54 | 55 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 56 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 57 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 58 | var s_v = "^(" + C + ")?" + v; // vowel in stem 59 | 60 | this.stemWord = function (w) { 61 | var stem; 62 | var suffix; 63 | var firstch; 64 | var origword = w; 65 | 66 | if (w.length < 3) 67 | return w; 68 | 69 | var re; 70 | var re2; 71 | var re3; 72 | var re4; 73 | 74 | firstch = w.substr(0,1); 75 | if (firstch == "y") 76 | w = firstch.toUpperCase() + w.substr(1); 77 | 78 | // Step 1a 79 | re = /^(.+?)(ss|i)es$/; 80 | re2 = /^(.+?)([^s])s$/; 81 | 82 | if (re.test(w)) 83 | w = w.replace(re,"$1$2"); 84 | else if (re2.test(w)) 85 | w = w.replace(re2,"$1$2"); 86 | 87 | // Step 1b 88 | re = /^(.+?)eed$/; 89 | re2 = /^(.+?)(ed|ing)$/; 90 | if (re.test(w)) { 91 | var fp = re.exec(w); 92 | re = new RegExp(mgr0); 93 | if (re.test(fp[1])) { 94 | re = /.$/; 95 | w = w.replace(re,""); 96 | } 97 | } 98 | else if (re2.test(w)) { 99 | var fp = re2.exec(w); 100 | stem = fp[1]; 101 | re2 = new RegExp(s_v); 102 | if (re2.test(stem)) { 103 | w = stem; 104 | re2 = /(at|bl|iz)$/; 105 | re3 = new RegExp("([^aeiouylsz])\\1$"); 106 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 107 | if (re2.test(w)) 108 | w = w + "e"; 109 | else if (re3.test(w)) { 110 | re = /.$/; 111 | w = w.replace(re,""); 112 | } 113 | else if (re4.test(w)) 114 | w = w + "e"; 115 | } 116 | } 117 | 118 | // Step 1c 119 | re = /^(.+?)y$/; 120 | if (re.test(w)) { 121 | var fp = re.exec(w); 122 | stem = fp[1]; 123 | re = new RegExp(s_v); 124 | if (re.test(stem)) 125 | w = stem + "i"; 126 | } 127 | 128 | // Step 2 129 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 130 | if (re.test(w)) { 131 | var fp = re.exec(w); 132 | stem = fp[1]; 133 | suffix = fp[2]; 134 | re = new RegExp(mgr0); 135 | if (re.test(stem)) 136 | w = stem + step2list[suffix]; 137 | } 138 | 139 | // Step 3 140 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 141 | if (re.test(w)) { 142 | var fp = re.exec(w); 143 | stem = fp[1]; 144 | suffix = fp[2]; 145 | re = new RegExp(mgr0); 146 | if (re.test(stem)) 147 | w = stem + step3list[suffix]; 148 | } 149 | 150 | // Step 4 151 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 152 | re2 = /^(.+?)(s|t)(ion)$/; 153 | if (re.test(w)) { 154 | var fp = re.exec(w); 155 | stem = fp[1]; 156 | re = new RegExp(mgr1); 157 | if (re.test(stem)) 158 | w = stem; 159 | } 160 | else if (re2.test(w)) { 161 | var fp = re2.exec(w); 162 | stem = fp[1] + fp[2]; 163 | re2 = new RegExp(mgr1); 164 | if (re2.test(stem)) 165 | w = stem; 166 | } 167 | 168 | // Step 5 169 | re = /^(.+?)e$/; 170 | if (re.test(w)) { 171 | var fp = re.exec(w); 172 | stem = fp[1]; 173 | re = new RegExp(mgr1); 174 | re2 = new RegExp(meq1); 175 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 176 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 177 | w = stem; 178 | } 179 | re = /ll$/; 180 | re2 = new RegExp(mgr1); 181 | if (re.test(w) && re2.test(w)) { 182 | re = /.$/; 183 | w = w.replace(re,""); 184 | } 185 | 186 | // and turn initial Y back to y 187 | if (firstch == "y") 188 | w = firstch.toLowerCase() + w.substr(1); 189 | return w; 190 | } 191 | } 192 | 193 | -------------------------------------------------------------------------------- /docs/_static/logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/logo-dark.png -------------------------------------------------------------------------------- /docs/_static/logo-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/logo-light.png -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/pygments.css: -------------------------------------------------------------------------------- 1 | html[data-theme="light"] .highlight pre { line-height: 125%; } 2 | html[data-theme="light"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | html[data-theme="light"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | html[data-theme="light"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | html[data-theme="light"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | html[data-theme="light"] .highlight .hll { background-color: #fae4c2 } 7 | html[data-theme="light"] .highlight { background: #fefefe; color: #080808 } 8 | html[data-theme="light"] .highlight .c { color: #515151 } /* Comment */ 9 | html[data-theme="light"] .highlight .err { color: #A12236 } /* Error */ 10 | html[data-theme="light"] .highlight .k { color: #6730C5 } /* Keyword */ 11 | html[data-theme="light"] .highlight .l { color: #7F4707 } /* Literal */ 12 | html[data-theme="light"] .highlight .n { color: #080808 } /* Name */ 13 | html[data-theme="light"] .highlight .o { color: #00622F } /* Operator */ 14 | html[data-theme="light"] .highlight .p { color: #080808 } /* Punctuation */ 15 | html[data-theme="light"] .highlight .ch { color: #515151 } /* Comment.Hashbang */ 16 | html[data-theme="light"] .highlight .cm { color: #515151 } /* Comment.Multiline */ 17 | html[data-theme="light"] .highlight .cp { color: #515151 } /* Comment.Preproc */ 18 | html[data-theme="light"] .highlight .cpf { color: #515151 } /* Comment.PreprocFile */ 19 | html[data-theme="light"] .highlight .c1 { color: #515151 } /* Comment.Single */ 20 | html[data-theme="light"] .highlight .cs { color: #515151 } /* Comment.Special */ 21 | html[data-theme="light"] .highlight .gd { color: #005B82 } /* Generic.Deleted */ 22 | html[data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */ 23 | html[data-theme="light"] .highlight .gh { color: #005B82 } /* Generic.Heading */ 24 | html[data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */ 25 | html[data-theme="light"] .highlight .gu { color: #005B82 } /* Generic.Subheading */ 26 | html[data-theme="light"] .highlight .kc { color: #6730C5 } /* Keyword.Constant */ 27 | html[data-theme="light"] .highlight .kd { color: #6730C5 } /* Keyword.Declaration */ 28 | html[data-theme="light"] .highlight .kn { color: #6730C5 } /* Keyword.Namespace */ 29 | html[data-theme="light"] .highlight .kp { color: #6730C5 } /* Keyword.Pseudo */ 30 | html[data-theme="light"] .highlight .kr { color: #6730C5 } /* Keyword.Reserved */ 31 | html[data-theme="light"] .highlight .kt { color: #7F4707 } /* Keyword.Type */ 32 | html[data-theme="light"] .highlight .ld { color: #7F4707 } /* Literal.Date */ 33 | html[data-theme="light"] .highlight .m { color: #7F4707 } /* Literal.Number */ 34 | html[data-theme="light"] .highlight .s { color: #00622F } /* Literal.String */ 35 | html[data-theme="light"] .highlight .na { color: #912583 } /* Name.Attribute */ 36 | html[data-theme="light"] .highlight .nb { color: #7F4707 } /* Name.Builtin */ 37 | html[data-theme="light"] .highlight .nc { color: #005B82 } /* Name.Class */ 38 | html[data-theme="light"] .highlight .no { color: #005B82 } /* Name.Constant */ 39 | html[data-theme="light"] .highlight .nd { color: #7F4707 } /* Name.Decorator */ 40 | html[data-theme="light"] .highlight .ni { color: #00622F } /* Name.Entity */ 41 | html[data-theme="light"] .highlight .ne { color: #6730C5 } /* Name.Exception */ 42 | html[data-theme="light"] .highlight .nf { color: #005B82 } /* Name.Function */ 43 | html[data-theme="light"] .highlight .nl { color: #7F4707 } /* Name.Label */ 44 | html[data-theme="light"] .highlight .nn { color: #080808 } /* Name.Namespace */ 45 | html[data-theme="light"] .highlight .nx { color: #080808 } /* Name.Other */ 46 | html[data-theme="light"] .highlight .py { color: #005B82 } /* Name.Property */ 47 | html[data-theme="light"] .highlight .nt { color: #005B82 } /* Name.Tag */ 48 | html[data-theme="light"] .highlight .nv { color: #A12236 } /* Name.Variable */ 49 | html[data-theme="light"] .highlight .ow { color: #6730C5 } /* Operator.Word */ 50 | html[data-theme="light"] .highlight .pm { color: #080808 } /* Punctuation.Marker */ 51 | html[data-theme="light"] .highlight .w { color: #080808 } /* Text.Whitespace */ 52 | html[data-theme="light"] .highlight .mb { color: #7F4707 } /* Literal.Number.Bin */ 53 | html[data-theme="light"] .highlight .mf { color: #7F4707 } /* Literal.Number.Float */ 54 | html[data-theme="light"] .highlight .mh { color: #7F4707 } /* Literal.Number.Hex */ 55 | html[data-theme="light"] .highlight .mi { color: #7F4707 } /* Literal.Number.Integer */ 56 | html[data-theme="light"] .highlight .mo { color: #7F4707 } /* Literal.Number.Oct */ 57 | html[data-theme="light"] .highlight .sa { color: #00622F } /* Literal.String.Affix */ 58 | html[data-theme="light"] .highlight .sb { color: #00622F } /* Literal.String.Backtick */ 59 | html[data-theme="light"] .highlight .sc { color: #00622F } /* Literal.String.Char */ 60 | html[data-theme="light"] .highlight .dl { color: #00622F } /* Literal.String.Delimiter */ 61 | html[data-theme="light"] .highlight .sd { color: #00622F } /* Literal.String.Doc */ 62 | html[data-theme="light"] .highlight .s2 { color: #00622F } /* Literal.String.Double */ 63 | html[data-theme="light"] .highlight .se { color: #00622F } /* Literal.String.Escape */ 64 | html[data-theme="light"] .highlight .sh { color: #00622F } /* Literal.String.Heredoc */ 65 | html[data-theme="light"] .highlight .si { color: #00622F } /* Literal.String.Interpol */ 66 | html[data-theme="light"] .highlight .sx { color: #00622F } /* Literal.String.Other */ 67 | html[data-theme="light"] .highlight .sr { color: #A12236 } /* Literal.String.Regex */ 68 | html[data-theme="light"] .highlight .s1 { color: #00622F } /* Literal.String.Single */ 69 | html[data-theme="light"] .highlight .ss { color: #005B82 } /* Literal.String.Symbol */ 70 | html[data-theme="light"] .highlight .bp { color: #7F4707 } /* Name.Builtin.Pseudo */ 71 | html[data-theme="light"] .highlight .fm { color: #005B82 } /* Name.Function.Magic */ 72 | html[data-theme="light"] .highlight .vc { color: #A12236 } /* Name.Variable.Class */ 73 | html[data-theme="light"] .highlight .vg { color: #A12236 } /* Name.Variable.Global */ 74 | html[data-theme="light"] .highlight .vi { color: #A12236 } /* Name.Variable.Instance */ 75 | html[data-theme="light"] .highlight .vm { color: #7F4707 } /* Name.Variable.Magic */ 76 | html[data-theme="light"] .highlight .il { color: #7F4707 } /* Literal.Number.Integer.Long */ 77 | html[data-theme="dark"] .highlight pre { line-height: 125%; } 78 | html[data-theme="dark"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 79 | html[data-theme="dark"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 80 | html[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 81 | html[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 82 | html[data-theme="dark"] .highlight .hll { background-color: #ffd9002e } 83 | html[data-theme="dark"] .highlight { background: #2b2b2b; color: #F8F8F2 } 84 | html[data-theme="dark"] .highlight .c { color: #FFD900 } /* Comment */ 85 | html[data-theme="dark"] .highlight .err { color: #FFA07A } /* Error */ 86 | html[data-theme="dark"] .highlight .k { color: #DCC6E0 } /* Keyword */ 87 | html[data-theme="dark"] .highlight .l { color: #FFD900 } /* Literal */ 88 | html[data-theme="dark"] .highlight .n { color: #F8F8F2 } /* Name */ 89 | html[data-theme="dark"] .highlight .o { color: #ABE338 } /* Operator */ 90 | html[data-theme="dark"] .highlight .p { color: #F8F8F2 } /* Punctuation */ 91 | html[data-theme="dark"] .highlight .ch { color: #FFD900 } /* Comment.Hashbang */ 92 | html[data-theme="dark"] .highlight .cm { color: #FFD900 } /* Comment.Multiline */ 93 | html[data-theme="dark"] .highlight .cp { color: #FFD900 } /* Comment.Preproc */ 94 | html[data-theme="dark"] .highlight .cpf { color: #FFD900 } /* Comment.PreprocFile */ 95 | html[data-theme="dark"] .highlight .c1 { color: #FFD900 } /* Comment.Single */ 96 | html[data-theme="dark"] .highlight .cs { color: #FFD900 } /* Comment.Special */ 97 | html[data-theme="dark"] .highlight .gd { color: #00E0E0 } /* Generic.Deleted */ 98 | html[data-theme="dark"] .highlight .ge { font-style: italic } /* Generic.Emph */ 99 | html[data-theme="dark"] .highlight .gh { color: #00E0E0 } /* Generic.Heading */ 100 | html[data-theme="dark"] .highlight .gs { font-weight: bold } /* Generic.Strong */ 101 | html[data-theme="dark"] .highlight .gu { color: #00E0E0 } /* Generic.Subheading */ 102 | html[data-theme="dark"] .highlight .kc { color: #DCC6E0 } /* Keyword.Constant */ 103 | html[data-theme="dark"] .highlight .kd { color: #DCC6E0 } /* Keyword.Declaration */ 104 | html[data-theme="dark"] .highlight .kn { color: #DCC6E0 } /* Keyword.Namespace */ 105 | html[data-theme="dark"] .highlight .kp { color: #DCC6E0 } /* Keyword.Pseudo */ 106 | html[data-theme="dark"] .highlight .kr { color: #DCC6E0 } /* Keyword.Reserved */ 107 | html[data-theme="dark"] .highlight .kt { color: #FFD900 } /* Keyword.Type */ 108 | html[data-theme="dark"] .highlight .ld { color: #FFD900 } /* Literal.Date */ 109 | html[data-theme="dark"] .highlight .m { color: #FFD900 } /* Literal.Number */ 110 | html[data-theme="dark"] .highlight .s { color: #ABE338 } /* Literal.String */ 111 | html[data-theme="dark"] .highlight .na { color: #FFD900 } /* Name.Attribute */ 112 | html[data-theme="dark"] .highlight .nb { color: #FFD900 } /* Name.Builtin */ 113 | html[data-theme="dark"] .highlight .nc { color: #00E0E0 } /* Name.Class */ 114 | html[data-theme="dark"] .highlight .no { color: #00E0E0 } /* Name.Constant */ 115 | html[data-theme="dark"] .highlight .nd { color: #FFD900 } /* Name.Decorator */ 116 | html[data-theme="dark"] .highlight .ni { color: #ABE338 } /* Name.Entity */ 117 | html[data-theme="dark"] .highlight .ne { color: #DCC6E0 } /* Name.Exception */ 118 | html[data-theme="dark"] .highlight .nf { color: #00E0E0 } /* Name.Function */ 119 | html[data-theme="dark"] .highlight .nl { color: #FFD900 } /* Name.Label */ 120 | html[data-theme="dark"] .highlight .nn { color: #F8F8F2 } /* Name.Namespace */ 121 | html[data-theme="dark"] .highlight .nx { color: #F8F8F2 } /* Name.Other */ 122 | html[data-theme="dark"] .highlight .py { color: #00E0E0 } /* Name.Property */ 123 | html[data-theme="dark"] .highlight .nt { color: #00E0E0 } /* Name.Tag */ 124 | html[data-theme="dark"] .highlight .nv { color: #FFA07A } /* Name.Variable */ 125 | html[data-theme="dark"] .highlight .ow { color: #DCC6E0 } /* Operator.Word */ 126 | html[data-theme="dark"] .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */ 127 | html[data-theme="dark"] .highlight .w { color: #F8F8F2 } /* Text.Whitespace */ 128 | html[data-theme="dark"] .highlight .mb { color: #FFD900 } /* Literal.Number.Bin */ 129 | html[data-theme="dark"] .highlight .mf { color: #FFD900 } /* Literal.Number.Float */ 130 | html[data-theme="dark"] .highlight .mh { color: #FFD900 } /* Literal.Number.Hex */ 131 | html[data-theme="dark"] .highlight .mi { color: #FFD900 } /* Literal.Number.Integer */ 132 | html[data-theme="dark"] .highlight .mo { color: #FFD900 } /* Literal.Number.Oct */ 133 | html[data-theme="dark"] .highlight .sa { color: #ABE338 } /* Literal.String.Affix */ 134 | html[data-theme="dark"] .highlight .sb { color: #ABE338 } /* Literal.String.Backtick */ 135 | html[data-theme="dark"] .highlight .sc { color: #ABE338 } /* Literal.String.Char */ 136 | html[data-theme="dark"] .highlight .dl { color: #ABE338 } /* Literal.String.Delimiter */ 137 | html[data-theme="dark"] .highlight .sd { color: #ABE338 } /* Literal.String.Doc */ 138 | html[data-theme="dark"] .highlight .s2 { color: #ABE338 } /* Literal.String.Double */ 139 | html[data-theme="dark"] .highlight .se { color: #ABE338 } /* Literal.String.Escape */ 140 | html[data-theme="dark"] .highlight .sh { color: #ABE338 } /* Literal.String.Heredoc */ 141 | html[data-theme="dark"] .highlight .si { color: #ABE338 } /* Literal.String.Interpol */ 142 | html[data-theme="dark"] .highlight .sx { color: #ABE338 } /* Literal.String.Other */ 143 | html[data-theme="dark"] .highlight .sr { color: #FFA07A } /* Literal.String.Regex */ 144 | html[data-theme="dark"] .highlight .s1 { color: #ABE338 } /* Literal.String.Single */ 145 | html[data-theme="dark"] .highlight .ss { color: #00E0E0 } /* Literal.String.Symbol */ 146 | html[data-theme="dark"] .highlight .bp { color: #FFD900 } /* Name.Builtin.Pseudo */ 147 | html[data-theme="dark"] .highlight .fm { color: #00E0E0 } /* Name.Function.Magic */ 148 | html[data-theme="dark"] .highlight .vc { color: #FFA07A } /* Name.Variable.Class */ 149 | html[data-theme="dark"] .highlight .vg { color: #FFA07A } /* Name.Variable.Global */ 150 | html[data-theme="dark"] .highlight .vi { color: #FFA07A } /* Name.Variable.Instance */ 151 | html[data-theme="dark"] .highlight .vm { color: #FFD900 } /* Name.Variable.Magic */ 152 | html[data-theme="dark"] .highlight .il { color: #FFD900 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_static/scripts/bootstrap.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v5.3.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5 | */ 6 | -------------------------------------------------------------------------------- /docs/_static/scripts/fontawesome.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | * Copyright 2024 Fonticons, Inc. 5 | */ 6 | -------------------------------------------------------------------------------- /docs/_static/scripts/pydata-sphinx-theme.js: -------------------------------------------------------------------------------- 1 | (()=>{"use strict";function e(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}const t=e=>"string"==typeof e&&/^[v\d]/.test(e)&&o.test(e),n=(e,t,n)=>{u(n);const o=((e,t)=>{const n=r(e),o=r(t),s=n.pop(),a=o.pop(),i=c(n,o);return 0!==i?i:s&&a?c(s.split("."),a.split(".")):s||a?s?-1:1:0})(e,t);return d[n].includes(o)},o=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,r=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(o);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},s=e=>"*"===e||"x"===e||"X"===e,a=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},i=(e,t)=>{if(s(e)||s(t))return 0;const[n,o]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(a(e),a(t));return n>o?1:n{for(let n=0;n":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},l=Object.keys(d),u=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===l.indexOf(e))throw new Error(`Invalid operator, expected one of ${l.join("|")}`)};var m=window.matchMedia("(prefers-color-scheme: dark)");function h(e){document.documentElement.dataset.theme=m.matches?"dark":"light"}function p(e){"light"!==e&&"dark"!==e&&"auto"!==e&&(console.error(`Got invalid theme mode: ${e}. Resetting to auto.`),e="auto");var t=m.matches?"dark":"light";document.documentElement.dataset.mode=e;var n="auto"==e?t:e;document.documentElement.dataset.theme=n,document.querySelectorAll(".dropdown-menu").forEach((e=>{"dark"===n?e.classList.add("dropdown-menu-dark"):e.classList.remove("dropdown-menu-dark")})),localStorage.setItem("mode",e),localStorage.setItem("theme",n),console.log(`[PST]: Changed to ${e} mode using the ${n} theme.`),m.onchange="auto"==e?h:""}function f(){const e=document.documentElement.dataset.defaultMode||"auto",t=localStorage.getItem("mode")||e;var n,o;p(((o=(n=m.matches?["auto","light","dark"]:["auto","dark","light"]).indexOf(t)+1)===n.length&&(o=0),n[o]))}var g=()=>{let e=document.querySelectorAll("form.bd-search");return e.length?(1==e.length?e[0]:document.querySelector(":not(#pst-search-dialog) > form.bd-search")).querySelector("input"):void 0},v=()=>{const e=g(),t=document.getElementById("pst-search-dialog");e===t.querySelector("input")?t.open?t.close():t.showModal():document.activeElement===e?e.blur():(e.focus(),e.select(),e.scrollIntoView({block:"center"}))},y=0===navigator.platform.indexOf("Mac")||"iPhone"===navigator.platform;const E=({currentTarget:e,clientX:t,clientY:n})=>{if(!e.open)return;const{left:o,right:r,top:s,bottom:a}=e.getBoundingClientRect();(t{if(!DOCUMENTATION_OPTIONS.search_as_you_type)return;let e=document.querySelector("#search-results");e&&e.remove(),e=document.createElement("section"),e.classList.add("empty"),e.tabIndex=-1,e.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),v(),w())})),e.id="search-results",document.querySelector("#pst-search-dialog").appendChild(e);const t="URL_ROOT"in DOCUMENTATION_OPTIONS?DOCUMENTATION_OPTIONS.URL_ROOT:document.documentElement.dataset.content_root,n=new MutationObserver((()=>{Array.from(document.querySelectorAll("#search-results .search a")).forEach((e=>{e.tabIndex=0;const n=e.getAttribute("href");n.startsWith(t)||(e.href=`${t}${n}`)}))}));let o=!1;new MutationObserver((()=>{if(o)return;const e=document.querySelector("#search-results .search");e&&(n.observe(e,{childList:!0}),o=!0)})).observe(e,{childList:!0})},b=()=>"dirhtml"==DOCUMENTATION_OPTIONS.BUILDER?DOCUMENTATION_OPTIONS.pagename.endsWith("index")?`${DOCUMENTATION_OPTIONS.pagename.substring(0,DOCUMENTATION_OPTIONS.pagename.length-5)}`:`${DOCUMENTATION_OPTIONS.pagename}/`:`${DOCUMENTATION_OPTIONS.pagename}.html`;async function T(e){document.querySelector("#bd-header-version-warning").remove();const t=DOCUMENTATION_OPTIONS.VERSION,n=new Date,o=JSON.parse(localStorage.getItem("pst_banner_pref")||"{}");console.debug(`[PST] Dismissing the version warning banner on ${t} starting ${n}.`),o[t]=n,localStorage.setItem("pst_banner_pref",JSON.stringify(o))}async function S(e){e.preventDefault();const t=b();let n=e.currentTarget.getAttribute("href"),o=n.replace(t,"");try{(await fetch(n,{method:"HEAD"})).ok?location.href=n:location.href=o}catch(e){location.href=o}}async function O(){var e=document.querySelectorAll(".version-switcher__button");const o=e.length>0,r=DOCUMENTATION_OPTIONS.hasOwnProperty("theme_switcher_json_url"),s=DOCUMENTATION_OPTIONS.show_version_warning_banner;if(r&&(o||s)){const o=await async function(e){const t=b();try{var n=new URL(e)}catch(o){if(!(o instanceof TypeError))throw o;{"file:"==window.location.protocol&&console.info("[PST] looks like you're viewing this site from a local filesystem, so the version switcher won't work unless you've disabled CORS. See https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html");const o=window.location.href.indexOf(t),r=-1==o?window.location.href:window.location.href.substring(0,o);n=new URL(e,r)}}const o=await fetch(n);return await o.json()}(DOCUMENTATION_OPTIONS.theme_switcher_json_url);o&&(function(e,t){const n=b();t.forEach((e=>{e.dataset.activeVersionName="",e.dataset.activeVersion=""}));const o=(e=e.map((e=>(e.match=e.version==DOCUMENTATION_OPTIONS.theme_switcher_version_match,e.preferred=e.preferred||!1,"name"in e||(e.name=e.version),e)))).map((e=>e.preferred&&e.match)).some(Boolean);var r=!1;e.forEach((e=>{const s=document.createElement("a");s.setAttribute("class","dropdown-item list-group-item list-group-item-action py-1"),s.setAttribute("href",`${e.url}${n}`),s.setAttribute("role","option");const a=document.createElement("span");a.textContent=`${e.name}`,s.appendChild(a),s.dataset.versionName=e.name,s.dataset.version=e.version;let i=o&&e.preferred,c=!o&&!r&&e.match;(i||c)&&(s.classList.add("active"),t.forEach((t=>{t.innerText=e.name,t.dataset.activeVersionName=e.name,t.dataset.activeVersion=e.version})),r=!0),document.querySelectorAll(".version-switcher__menu").forEach((e=>{let t=s.cloneNode(!0);t.onclick=S,e.append(t)}))}))}(o,e),s&&function(e){var o=DOCUMENTATION_OPTIONS.VERSION,r=e.filter((e=>e.preferred));if(1!==r.length){const e=0==r.length?"No":"Multiple";return void console.log(`[PST] ${e} versions marked "preferred" found in versions JSON, ignoring.`)}const s=r[0].version,a=r[0].url,i=t(o)&&t(s);if(i&&n(o,s,"="))return void console.log("[PST]: This is the preferred version of the docs, not showing the warning banner.");const c=JSON.parse(localStorage.getItem("pst_banner_pref")||"{}")[o];if(null!=c){const e=new Date(c),t=(new Date-e)/864e5;if(t<14)return void console.info(`[PST] Suppressing version warning banner; was dismissed ${Math.floor(t)} day(s) ago`)}const d=document.querySelector("#bd-header-version-warning"),l=document.createElement("div"),u=document.createElement("div"),m=document.createElement("strong"),h=document.createElement("a"),p=document.createElement("a");l.classList="bd-header-announcement__content ms-auto me-auto",u.classList="sidebar-message",h.classList="btn text-wrap font-weight-bold ms-3 my-1 align-baseline pst-button-link-to-stable-version",h.href=`${a}${b()}`,h.innerText="Switch to stable version",h.onclick=S,p.classList="ms-3 my-1 align-baseline";const f=document.createElement("i");p.append(f),f.classList="fa-solid fa-xmark",p.onclick=T,u.innerText="This is documentation for ";const g=o.includes("dev")||o.includes("rc")||o.includes("pre"),v=i&&n(o,s,">");g||v?m.innerText="an unstable development version":i&&n(o,s,"<")?m.innerText=`an old version (${o})`:m.innerText=o?`version ${o}`:"an unknown version",d.appendChild(l),d.append(p),l.appendChild(u),u.appendChild(m),u.appendChild(document.createTextNode(".")),u.appendChild(h),d.classList.remove("d-none")}(o))}}function I(){const e=()=>{document.querySelectorAll(["pre",".nboutput > .output_area",".cell_output > .output",".jp-RenderedHTMLCommon",".pst-scrollable-table-container"].join(", ")).forEach((e=>{e.tabIndex=e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?0:-1}))},t=N(e,300);window.addEventListener("resize",t),new MutationObserver(t).observe(document.getElementById("main-content"),{subtree:!0,childList:!0}),e()}function N(e,t){let n=null;return(...o)=>{clearTimeout(n),n=setTimeout((()=>{e(...o)}),t)}}async function _(){const e=document.querySelector(".bd-header-announcement"),{pstAnnouncementUrl:t}=e?e.dataset:null;if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`[PST]: HTTP response status not ok: ${n.status} ${n.statusText}`);let o=await n.text();if(o=o.trim(),0===o.length)return void console.log(`[PST]: Empty announcement at: ${t}`);e.innerHTML=`
${o}
`,e.classList.remove("d-none")}catch(e){console.log(`[PST]: Failed to load announcement at: ${t}`),console.error(e)}}e((async function(){await Promise.allSettled([O(),_()]);const e=document.querySelector(".pst-async-banner-revealer");if(!e)return;e.classList.remove("d-none");const t=Array.from(e.children).reduce(((e,t)=>e+t.offsetHeight),0);e.style.setProperty("height",`${t}px`),setTimeout((()=>{e.style.setProperty("height","auto")}),320)})),e((function(){p(document.documentElement.dataset.mode),document.querySelectorAll(".theme-switch-button").forEach((e=>{e.addEventListener("click",f)}))})),e((function(){if(!document.querySelector(".bd-docs-nav"))return;var e=document.querySelector("div.bd-sidebar");let t=parseInt(sessionStorage.getItem("sidebar-scroll-top"),10);if(isNaN(t)){var n=document.querySelector(".bd-docs-nav").querySelectorAll(".active");if(n.length>0){var o=n[n.length-1],r=o.getBoundingClientRect().y-e.getBoundingClientRect().y;if(o.getBoundingClientRect().y>.5*window.innerHeight){let t=.25;e.scrollTop=r-e.clientHeight*t,console.log("[PST]: Scrolled sidebar using last active link...")}}}else e.scrollTop=t,console.log("[PST]: Scrolled sidebar using stored browser position...");window.addEventListener("beforeunload",(()=>{sessionStorage.setItem("sidebar-scroll-top",e.scrollTop)}))})),e((()=>{(()=>{let e=document.querySelectorAll(".search-button__kbd-shortcut");y&&e.forEach((e=>e.querySelector("kbd.kbd-shortcut__modifier").innerText="⌘"))})(),window.addEventListener("keydown",(e=>{let t=g();e.shiftKey||e.altKey||(y?!e.metaKey||e.ctrlKey:e.metaKey||!e.ctrlKey)||!/^k$/i.test(e.key)?document.activeElement===t&&/Escape/i.test(e.key)&&(v(),w()):(e.preventDefault(),v())}),!0),document.querySelectorAll(".search-button__button").forEach((e=>{e.onclick=v})),document.getElementById("pst-search-dialog").addEventListener("click",E)})),e((()=>{if(!DOCUMENTATION_OPTIONS.search_as_you_type)return;if(window.location.pathname.endsWith("/search.html"))return;if(!Search)return;w();let e=null,t="";const n=document.querySelector("#pst-search-dialog input[name=q]");n.addEventListener("keyup",(()=>{const o=n.value;if(""===o)return t="",void w();o!==t&&(w(),t=o,e&&window.clearTimeout(e),e=window.setTimeout((()=>{Search.performSearch(o),document.querySelector("#search-results").classList.remove("empty"),e=null}),300))}))})),e((function(){const e=document.getElementById("pst-primary-sidebar"),t=document.getElementById("pst-secondary-sidebar"),n=document.getElementById("pst-primary-sidebar-modal"),o=document.getElementById("pst-secondary-sidebar-modal"),r=document.querySelector(".primary-toggle"),s=document.querySelector(".secondary-toggle"),a=(e,t)=>{Array.from(e.childNodes).forEach((e=>t.appendChild(e))),Array.from(e.classList).forEach((n=>{e.classList.remove(n),t.classList.add(n)}))};[[r,n,e],[s,o,t]].forEach((([e,t,n])=>{e&&t&&n&&(e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),a(n,t),t.showModal()})),t.addEventListener("click",E),t.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),t.close())})),t.addEventListener("close",(()=>{a(t,n)})))}))})),e((function(){const e=document.querySelector("#pst-page-toc-nav");if(!e)return;const t=Array.from(e.querySelectorAll(".toc-entry")),n=Array.from(e.querySelectorAll("a"));if(0===n.length)return;let o=!1;function r(e){n.forEach((t=>{t===e?(t.classList.add("active"),t.setAttribute("aria-current","true")):(t.classList.remove("active"),t.removeAttribute("aria-current"))})),t.forEach((t=>{t.contains(e)?t.classList.add("active"):t.classList.remove("active")}))}e.addEventListener("click",(e=>{o=!0,r(n.find((t=>t.contains(e.target)))),setTimeout((()=>{o=!1}),1e3)}));const s=new Map;let a;function i(){a&&a.disconnect();const e=document.querySelector("#pst-header").getBoundingClientRect().height;a=new IntersectionObserver((function(e){if(o)return;const t=e.filter((e=>e.isIntersecting)).pop();if(!t)return;const n=t.target;r(s.get(n))}),{root:null,rootMargin:`-${e}px 0px -70% 0px`,threshold:0}),s.keys().forEach((e=>{a.observe(e)}))}n.forEach((e=>{const t=function(e){const t=e.getAttribute("href");if(!t.startsWith("#"))return;const n=t.substring(1);if(!n)return;const o=document.getElementById(n);return o.querySelector(":is(h1,h2,h3,h4,h5,h6)")||o}(e);t&&s.set(t,e)})),window.addEventListener("resize",N(i,300)),i()})),e((()=>{try{!function(){const e=document.getElementById("pst-collapse-sidebar-button"),t=document.getElementById("pst-primary-sidebar");if(!e||!t)return;const n=Array.from(t.children),o=new bootstrap.Tooltip(e,{title:e.querySelector(".pst-expand-sidebar-label").textContent,trigger:"manual",placement:"left",fallbackPlacements:["right"],offset:[0,12]}),r=()=>{"false"===e.getAttribute("aria-expanded")&&o.show()},s=()=>{o.hide()};e.addEventListener("click",(()=>{if("true"===e.dataset.busy)return;e.dataset.busy="true";const o=window.matchMedia("(prefers-reduced-motion)").matches;"true"===e.getAttribute("aria-expanded")?function(o,r){n.forEach((e=>e.style.width=e.getBoundingClientRect().width+"px"));const s=()=>{e.setAttribute("aria-expanded","false"),e.dataset.busy=!1};o?(t.classList.add("pst-squeeze"),s()):(t.addEventListener("transitionend",(function e(){s(),t.removeEventListener("transitionend",e)})),t.classList.add("pst-squeeze"))}(o):function(o,r){s();const a=()=>{n.forEach((e=>e.style.width=null)),e.setAttribute("aria-expanded","true"),e.dataset.busy=!1};o?(t.classList.remove("pst-squeeze"),a()):(t.addEventListener("transitionend",(function e(){a(),t.removeEventListener("transitionend",e)})),t.classList.remove("pst-squeeze"))}(o)})),e.addEventListener("focus",r),e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",s),e.addEventListener("blur",s)}()}catch(e){console.log("[PST] Error setting up collapse sidebar button"),console.error(e)}})),"complete"===document.readyState?I():window.addEventListener("load",I)})(); 2 | //# sourceMappingURL=pydata-sphinx-theme.js.map -------------------------------------------------------------------------------- /docs/_static/snAPI_Flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/snAPI_Flow.png -------------------------------------------------------------------------------- /docs/_static/sphinx_highlight.js: -------------------------------------------------------------------------------- 1 | /* Highlighting utilities for Sphinx HTML documentation. */ 2 | "use strict"; 3 | 4 | const SPHINX_HIGHLIGHT_ENABLED = true 5 | 6 | /** 7 | * highlight a given string on a node by wrapping it in 8 | * span elements with the given class name. 9 | */ 10 | const _highlight = (node, addItems, text, className) => { 11 | if (node.nodeType === Node.TEXT_NODE) { 12 | const val = node.nodeValue; 13 | const parent = node.parentNode; 14 | const pos = val.toLowerCase().indexOf(text); 15 | if ( 16 | pos >= 0 && 17 | !parent.classList.contains(className) && 18 | !parent.classList.contains("nohighlight") 19 | ) { 20 | let span; 21 | 22 | const closestNode = parent.closest("body, svg, foreignObject"); 23 | const isInSVG = closestNode && closestNode.matches("svg"); 24 | if (isInSVG) { 25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 26 | } else { 27 | span = document.createElement("span"); 28 | span.classList.add(className); 29 | } 30 | 31 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 32 | const rest = document.createTextNode(val.substr(pos + text.length)); 33 | parent.insertBefore( 34 | span, 35 | parent.insertBefore( 36 | rest, 37 | node.nextSibling 38 | ) 39 | ); 40 | node.nodeValue = val.substr(0, pos); 41 | /* There may be more occurrences of search term in this node. So call this 42 | * function recursively on the remaining fragment. 43 | */ 44 | _highlight(rest, addItems, text, className); 45 | 46 | if (isInSVG) { 47 | const rect = document.createElementNS( 48 | "http://www.w3.org/2000/svg", 49 | "rect" 50 | ); 51 | const bbox = parent.getBBox(); 52 | rect.x.baseVal.value = bbox.x; 53 | rect.y.baseVal.value = bbox.y; 54 | rect.width.baseVal.value = bbox.width; 55 | rect.height.baseVal.value = bbox.height; 56 | rect.setAttribute("class", className); 57 | addItems.push({ parent: parent, target: rect }); 58 | } 59 | } 60 | } else if (node.matches && !node.matches("button, select, textarea")) { 61 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); 62 | } 63 | }; 64 | const _highlightText = (thisNode, text, className) => { 65 | let addItems = []; 66 | _highlight(thisNode, addItems, text, className); 67 | addItems.forEach((obj) => 68 | obj.parent.insertAdjacentElement("beforebegin", obj.target) 69 | ); 70 | }; 71 | 72 | /** 73 | * Small JavaScript module for the documentation. 74 | */ 75 | const SphinxHighlight = { 76 | 77 | /** 78 | * highlight the search words provided in localstorage in the text 79 | */ 80 | highlightSearchWords: () => { 81 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight 82 | 83 | // get and clear terms from localstorage 84 | const url = new URL(window.location); 85 | const highlight = 86 | localStorage.getItem("sphinx_highlight_terms") 87 | || url.searchParams.get("highlight") 88 | || ""; 89 | localStorage.removeItem("sphinx_highlight_terms") 90 | url.searchParams.delete("highlight"); 91 | window.history.replaceState({}, "", url); 92 | 93 | // get individual terms from highlight string 94 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); 95 | if (terms.length === 0) return; // nothing to do 96 | 97 | // There should never be more than one element matching "div.body" 98 | const divBody = document.querySelectorAll("div.body"); 99 | const body = divBody.length ? divBody[0] : document.querySelector("body"); 100 | window.setTimeout(() => { 101 | terms.forEach((term) => _highlightText(body, term, "highlighted")); 102 | }, 10); 103 | 104 | const searchBox = document.getElementById("searchbox"); 105 | if (searchBox === null) return; 106 | searchBox.appendChild( 107 | document 108 | .createRange() 109 | .createContextualFragment( 110 | '" 114 | ) 115 | ); 116 | }, 117 | 118 | /** 119 | * helper function to hide the search marks again 120 | */ 121 | hideSearchWords: () => { 122 | document 123 | .querySelectorAll("#searchbox .highlight-link") 124 | .forEach((el) => el.remove()); 125 | document 126 | .querySelectorAll("span.highlighted") 127 | .forEach((el) => el.classList.remove("highlighted")); 128 | localStorage.removeItem("sphinx_highlight_terms") 129 | }, 130 | 131 | initEscapeListener: () => { 132 | // only install a listener if it is really needed 133 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; 134 | 135 | document.addEventListener("keydown", (event) => { 136 | // bail for input elements 137 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 138 | // bail with special keys 139 | if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; 140 | if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { 141 | SphinxHighlight.hideSearchWords(); 142 | event.preventDefault(); 143 | } 144 | }); 145 | }, 146 | }; 147 | 148 | _ready(() => { 149 | /* Do not call highlightSearchWords() when we are on the search page. 150 | * It will highlight words from the *previous* search query. 151 | */ 152 | if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); 153 | SphinxHighlight.initEscapeListener(); 154 | }); 155 | -------------------------------------------------------------------------------- /docs/_static/styles/theme.css: -------------------------------------------------------------------------------- 1 | /* Provided by Sphinx's 'basic' theme, and included in the final set of assets */ 2 | @import "../basic.css"; 3 | -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.1.2/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Fonticons, Inc. (https://fontawesome.com) 2 | 3 | -------------------------------------------------------------------------------- 4 | 5 | Font Awesome Free License 6 | 7 | Font Awesome Free is free, open source, and GPL friendly. You can use it for 8 | commercial projects, open source projects, or really almost whatever you want. 9 | Full Font Awesome Free license: https://fontawesome.com/license/free. 10 | 11 | -------------------------------------------------------------------------------- 12 | 13 | # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) 14 | 15 | The Font Awesome Free download is licensed under a Creative Commons 16 | Attribution 4.0 International License and applies to all icons packaged 17 | as SVG and JS file types. 18 | 19 | -------------------------------------------------------------------------------- 20 | 21 | # Fonts: SIL OFL 1.1 License 22 | 23 | In the Font Awesome Free download, the SIL OFL license applies to all icons 24 | packaged as web and desktop font files. 25 | 26 | Copyright (c) 2022 Fonticons, Inc. (https://fontawesome.com) 27 | with Reserved Font Name: "Font Awesome". 28 | 29 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 30 | This license is copied below, and is also available with a FAQ at: 31 | http://scripts.sil.org/OFL 32 | 33 | SIL OPEN FONT LICENSE 34 | Version 1.1 - 26 February 2007 35 | 36 | PREAMBLE 37 | The goals of the Open Font License (OFL) are to stimulate worldwide 38 | development of collaborative font projects, to support the font creation 39 | efforts of academic and linguistic communities, and to provide a free and 40 | open framework in which fonts may be shared and improved in partnership 41 | with others. 42 | 43 | The OFL allows the licensed fonts to be used, studied, modified and 44 | redistributed freely as long as they are not sold by themselves. The 45 | fonts, including any derivative works, can be bundled, embedded, 46 | redistributed and/or sold with any software provided that any reserved 47 | names are not used by derivative works. The fonts and derivatives, 48 | however, cannot be released under any other type of license. The 49 | requirement for fonts to remain under this license does not apply 50 | to any document created using the fonts or their derivatives. 51 | 52 | DEFINITIONS 53 | "Font Software" refers to the set of files released by the Copyright 54 | Holder(s) under this license and clearly marked as such. This may 55 | include source files, build scripts and documentation. 56 | 57 | "Reserved Font Name" refers to any names specified as such after the 58 | copyright statement(s). 59 | 60 | "Original Version" refers to the collection of Font Software components as 61 | distributed by the Copyright Holder(s). 62 | 63 | "Modified Version" refers to any derivative made by adding to, deleting, 64 | or substituting — in part or in whole — any of the components of the 65 | Original Version, by changing formats or by porting the Font Software to a 66 | new environment. 67 | 68 | "Author" refers to any designer, engineer, programmer, technical 69 | writer or other person who contributed to the Font Software. 70 | 71 | PERMISSION & CONDITIONS 72 | Permission is hereby granted, free of charge, to any person obtaining 73 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 74 | redistribute, and sell modified and unmodified copies of the Font 75 | Software, subject to the following conditions: 76 | 77 | 1) Neither the Font Software nor any of its individual components, 78 | in Original or Modified Versions, may be sold by itself. 79 | 80 | 2) Original or Modified Versions of the Font Software may be bundled, 81 | redistributed and/or sold with any software, provided that each copy 82 | contains the above copyright notice and this license. These can be 83 | included either as stand-alone text files, human-readable headers or 84 | in the appropriate machine-readable metadata fields within text or 85 | binary files as long as those fields can be easily viewed by the user. 86 | 87 | 3) No Modified Version of the Font Software may use the Reserved Font 88 | Name(s) unless explicit written permission is granted by the corresponding 89 | Copyright Holder. This restriction only applies to the primary font name as 90 | presented to the users. 91 | 92 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 93 | Software shall not be used to promote, endorse or advertise any 94 | Modified Version, except to acknowledge the contribution(s) of the 95 | Copyright Holder(s) and the Author(s) or with their explicit written 96 | permission. 97 | 98 | 5) The Font Software, modified or unmodified, in part or in whole, 99 | must be distributed entirely under this license, and must not be 100 | distributed under any other license. The requirement for fonts to 101 | remain under this license does not apply to any document created 102 | using the Font Software. 103 | 104 | TERMINATION 105 | This license becomes null and void if any of the above conditions are 106 | not met. 107 | 108 | DISCLAIMER 109 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 110 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 111 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 112 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 113 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 114 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 115 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 116 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 117 | OTHER DEALINGS IN THE FONT SOFTWARE. 118 | 119 | -------------------------------------------------------------------------------- 120 | 121 | # Code: MIT License (https://opensource.org/licenses/MIT) 122 | 123 | In the Font Awesome Free download, the MIT license applies to all non-font and 124 | non-icon files. 125 | 126 | Copyright 2022 Fonticons, Inc. 127 | 128 | Permission is hereby granted, free of charge, to any person obtaining a copy of 129 | this software and associated documentation files (the "Software"), to deal in the 130 | Software without restriction, including without limitation the rights to use, copy, 131 | modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 132 | and to permit persons to whom the Software is furnished to do so, subject to the 133 | following conditions: 134 | 135 | The above copyright notice and this permission notice shall be included in all 136 | copies or substantial portions of the Software. 137 | 138 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 139 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 140 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 141 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 142 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 143 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 144 | 145 | -------------------------------------------------------------------------------- 146 | 147 | # Attribution 148 | 149 | Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font 150 | Awesome Free files already contain embedded comments with sufficient 151 | attribution, so you shouldn't need to do anything additional when using these 152 | files normally. 153 | 154 | We've kept attribution comments terse, so we ask that you do not actively work 155 | to remove them from files, especially code. They're a great way for folks to 156 | learn about Font Awesome. 157 | 158 | -------------------------------------------------------------------------------- 159 | 160 | # Brand Icons 161 | 162 | All brand icons are trademarks of their respective owners. The use of these 163 | trademarks does not indicate endorsement of the trademark holder by Font 164 | Awesome, nor vice versa. **Please do not use brand logos for any purpose except 165 | to represent the company, product, or service to which they refer.** 166 | -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-v4compatibility.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-v4compatibility.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-v4compatibility.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.1.2/webfonts/fa-v4compatibility.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Fonticons, Inc. (https://fontawesome.com) 2 | 3 | -------------------------------------------------------------------------------- 4 | 5 | Font Awesome Free License 6 | 7 | Font Awesome Free is free, open source, and GPL friendly. You can use it for 8 | commercial projects, open source projects, or really almost whatever you want. 9 | Full Font Awesome Free license: https://fontawesome.com/license/free. 10 | 11 | -------------------------------------------------------------------------------- 12 | 13 | # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) 14 | 15 | The Font Awesome Free download is licensed under a Creative Commons 16 | Attribution 4.0 International License and applies to all icons packaged 17 | as SVG and JS file types. 18 | 19 | -------------------------------------------------------------------------------- 20 | 21 | # Fonts: SIL OFL 1.1 License 22 | 23 | In the Font Awesome Free download, the SIL OFL license applies to all icons 24 | packaged as web and desktop font files. 25 | 26 | Copyright (c) 2024 Fonticons, Inc. (https://fontawesome.com) 27 | with Reserved Font Name: "Font Awesome". 28 | 29 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 30 | This license is copied below, and is also available with a FAQ at: 31 | http://scripts.sil.org/OFL 32 | 33 | SIL OPEN FONT LICENSE 34 | Version 1.1 - 26 February 2007 35 | 36 | PREAMBLE 37 | The goals of the Open Font License (OFL) are to stimulate worldwide 38 | development of collaborative font projects, to support the font creation 39 | efforts of academic and linguistic communities, and to provide a free and 40 | open framework in which fonts may be shared and improved in partnership 41 | with others. 42 | 43 | The OFL allows the licensed fonts to be used, studied, modified and 44 | redistributed freely as long as they are not sold by themselves. The 45 | fonts, including any derivative works, can be bundled, embedded, 46 | redistributed and/or sold with any software provided that any reserved 47 | names are not used by derivative works. The fonts and derivatives, 48 | however, cannot be released under any other type of license. The 49 | requirement for fonts to remain under this license does not apply 50 | to any document created using the fonts or their derivatives. 51 | 52 | DEFINITIONS 53 | "Font Software" refers to the set of files released by the Copyright 54 | Holder(s) under this license and clearly marked as such. This may 55 | include source files, build scripts and documentation. 56 | 57 | "Reserved Font Name" refers to any names specified as such after the 58 | copyright statement(s). 59 | 60 | "Original Version" refers to the collection of Font Software components as 61 | distributed by the Copyright Holder(s). 62 | 63 | "Modified Version" refers to any derivative made by adding to, deleting, 64 | or substituting — in part or in whole — any of the components of the 65 | Original Version, by changing formats or by porting the Font Software to a 66 | new environment. 67 | 68 | "Author" refers to any designer, engineer, programmer, technical 69 | writer or other person who contributed to the Font Software. 70 | 71 | PERMISSION & CONDITIONS 72 | Permission is hereby granted, free of charge, to any person obtaining 73 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 74 | redistribute, and sell modified and unmodified copies of the Font 75 | Software, subject to the following conditions: 76 | 77 | 1) Neither the Font Software nor any of its individual components, 78 | in Original or Modified Versions, may be sold by itself. 79 | 80 | 2) Original or Modified Versions of the Font Software may be bundled, 81 | redistributed and/or sold with any software, provided that each copy 82 | contains the above copyright notice and this license. These can be 83 | included either as stand-alone text files, human-readable headers or 84 | in the appropriate machine-readable metadata fields within text or 85 | binary files as long as those fields can be easily viewed by the user. 86 | 87 | 3) No Modified Version of the Font Software may use the Reserved Font 88 | Name(s) unless explicit written permission is granted by the corresponding 89 | Copyright Holder. This restriction only applies to the primary font name as 90 | presented to the users. 91 | 92 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 93 | Software shall not be used to promote, endorse or advertise any 94 | Modified Version, except to acknowledge the contribution(s) of the 95 | Copyright Holder(s) and the Author(s) or with their explicit written 96 | permission. 97 | 98 | 5) The Font Software, modified or unmodified, in part or in whole, 99 | must be distributed entirely under this license, and must not be 100 | distributed under any other license. The requirement for fonts to 101 | remain under this license does not apply to any document created 102 | using the Font Software. 103 | 104 | TERMINATION 105 | This license becomes null and void if any of the above conditions are 106 | not met. 107 | 108 | DISCLAIMER 109 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 110 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 111 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 112 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 113 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 114 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 115 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 116 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 117 | OTHER DEALINGS IN THE FONT SOFTWARE. 118 | 119 | -------------------------------------------------------------------------------- 120 | 121 | # Code: MIT License (https://opensource.org/licenses/MIT) 122 | 123 | In the Font Awesome Free download, the MIT license applies to all non-font and 124 | non-icon files. 125 | 126 | Copyright 2024 Fonticons, Inc. 127 | 128 | Permission is hereby granted, free of charge, to any person obtaining a copy of 129 | this software and associated documentation files (the "Software"), to deal in the 130 | Software without restriction, including without limitation the rights to use, copy, 131 | modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 132 | and to permit persons to whom the Software is furnished to do so, subject to the 133 | following conditions: 134 | 135 | The above copyright notice and this permission notice shall be included in all 136 | copies or substantial portions of the Software. 137 | 138 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 139 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 140 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 141 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 142 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 143 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 144 | 145 | -------------------------------------------------------------------------------- 146 | 147 | # Attribution 148 | 149 | Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font 150 | Awesome Free files already contain embedded comments with sufficient 151 | attribution, so you shouldn't need to do anything additional when using these 152 | files normally. 153 | 154 | We've kept attribution comments terse, so we ask that you do not actively work 155 | to remove them from files, especially code. They're a great way for folks to 156 | learn about Font Awesome. 157 | 158 | -------------------------------------------------------------------------------- 159 | 160 | # Brand Icons 161 | 162 | All brand icons are trademarks of their respective owners. The use of these 163 | trademarks does not indicate endorsement of the trademark holder by Font 164 | Awesome, nor vice versa. **Please do not use brand logos for any purpose except 165 | to represent the company, product, or service to which they refer.** 166 | -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/js/all.min.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | * Copyright 2024 Fonticons, Inc. 5 | */ 6 | -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /docs/_static/webpack-macros.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | {% macro head_pre_assets() %} 7 | 8 | 9 | 10 | {% endmacro %} 11 | 12 | {% macro head_js_preload() %} 13 | 14 | 15 | 16 | 17 | 18 | {% endmacro %} 19 | 20 | {% macro body_post() %} 21 | 22 | 23 | 24 | {% endmacro %} -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/docs/objects.inv -------------------------------------------------------------------------------- /snAPI/PH330Lib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/snAPI/PH330Lib.dll -------------------------------------------------------------------------------- /snAPI/Utils.py: -------------------------------------------------------------------------------- 1 | # Torsten Krause, PicoQuant GmbH, 2023 2 | 3 | class Color: 4 | Rst ='\033[0m' 5 | 6 | # Regular 7 | Bla ='\033[0;30m' 8 | """regular black""" 9 | Red ='\033[0;31m' 10 | """regular red""" 11 | Gre ='\033[0;32m' 12 | """regular green""" 13 | Yel ='\033[0;33m' 14 | """regular yellow""" 15 | Blu ='\033[0;34m' 16 | """regular blue""" 17 | Pur ='\033[0;35m' 18 | """regular purple""" 19 | Cya ='\033[0;36m' 20 | """regular cyan""" 21 | Whi ='\033[0;37m' 22 | """regular white""" 23 | 24 | # Bold 25 | BBla ='\033[1;30m' 26 | """bold black""" 27 | BRed ='\033[1;31m' 28 | """bold red""" 29 | BGre ='\033[1;32m' 30 | """bold green""" 31 | BYel ='\033[1;33m' 32 | """bold yellow""" 33 | BBlu ='\033[1;34m' 34 | """bold blue""" 35 | BPur ='\033[1;35m' 36 | """bold purple""" 37 | BCya ='\033[1;36m' 38 | """bold cyan""" 39 | BWhi ='\033[1;37m' 40 | """bold white""" 41 | 42 | # Underline 43 | UBla ='\033[4;30m' 44 | """underline black""" 45 | URed ='\033[4;31m' 46 | """underline red""" 47 | UGre ='\033[4;32m' 48 | """underline green""" 49 | UYel ='\033[4;33m' 50 | """underline yellow""" 51 | UBlu ='\033[4;34m' 52 | """underline blue""" 53 | UPur ='\033[4;35m' 54 | """underline purple""" 55 | UCya ='\033[4;36m' 56 | """underline cyan""" 57 | UWhi ='\033[4;37m' 58 | """underline white""" 59 | 60 | # High Intensity 61 | IBla ='\033[0;90m' 62 | """high intensity black""" 63 | IRed ='\033[0;91m' 64 | """high intensity red""" 65 | IGre ='\033[0;92m' 66 | """high intensity green""" 67 | IYel ='\033[0;93m' 68 | """high intensity yellow""" 69 | IBlu ='\033[0;94m' 70 | """high intensity blue""" 71 | IPur ='\033[0;95m' 72 | """high intensity purple""" 73 | ICya ='\033[0;96m' 74 | """high intensity cyan""" 75 | IWhi ='\033[0;97m' 76 | """high intensity white""" 77 | 78 | # BoldHigh Intens 79 | BIBla ='\033[1;90m' 80 | """bold high intensity black""" 81 | BIRed ='\033[1;91m' 82 | """bold high intensity red""" 83 | BIGre ='\033[1;92m' 84 | """bold high intensity green""" 85 | BIYel ='\033[1;93m' 86 | """bold high intensity yellow""" 87 | BIBlu ='\033[1;94m' 88 | """bold high intensity blue""" 89 | BIPur ='\033[1;95m' 90 | """bold high intensity purple""" 91 | BICya ='\033[1;96m' 92 | """bold high intensity cyan""" 93 | BIWhi ='\033[1;97m' 94 | """bold high intensity white""" 95 | 96 | # Background 97 | On_Bla ='\033[40m' 98 | """background black""" 99 | On_Red ='\033[41m' 100 | """background red""" 101 | On_Gre ='\033[42m' 102 | """background green""" 103 | On_Yel ='\033[43m' 104 | """background yellow""" 105 | On_Blu ='\033[44m' 106 | """background blue""" 107 | On_Pur ='\033[45m' 108 | """background purple""" 109 | On_Cya ='\033[46m' 110 | """background cyan""" 111 | On_Whi ='\033[47m' 112 | """background white""" 113 | 114 | # High Intensity Backgrounds 115 | On_IBla ='\033[0;100m' 116 | """high intensity background black""" 117 | On_IRed ='\033[0;101m' 118 | """high intensity background red""" 119 | On_IGre ='\033[0;102m' 120 | """high intensity background green""" 121 | On_IYel ='\033[0;103m' 122 | """high intensity background yellow""" 123 | On_IBlu ='\033[0;104m' 124 | """high intensity background blue""" 125 | On_IPur ='\033[0;105m' 126 | """high intensity background purple""" 127 | On_ICya ='\033[0;106m' 128 | """high intensity background cyan""" 129 | On_IWhi ='\033[0;107m' 130 | """high intensity background white""" -------------------------------------------------------------------------------- /snAPI/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/snAPI/__init__.py -------------------------------------------------------------------------------- /snAPI/hhlib64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/snAPI/hhlib64.dll -------------------------------------------------------------------------------- /snAPI/mhlib64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/snAPI/mhlib64.dll -------------------------------------------------------------------------------- /snAPI/snAPI64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/snAPI/snAPI64.dll -------------------------------------------------------------------------------- /snAPI/snAPI64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/snAPI/snAPI64.lib -------------------------------------------------------------------------------- /snAPI/snAPI_lib.h: -------------------------------------------------------------------------------- 1 | #ifndef _WIN32 2 | #define _stdcall 3 | #endif 4 | 5 | /********** snAPI **********/ 6 | extern bool _stdcall initAPI(char* systemIni); 7 | extern void _stdcall exitAPI(); 8 | extern void _stdcall setLogLevel(int logLevel, bool onOff); 9 | extern void _stdcall logExternal(char* message); 10 | extern void _stdcall logError(char* message); 11 | extern bool _stdcall getDeviceIDs(char* names); 12 | extern bool _stdcall getDevice(char* name); 13 | extern void _stdcall closeDevice(bool all); 14 | extern bool _stdcall getFileDevice(char* path); 15 | extern bool _stdcall initDevice(int mode, int refsource); 16 | extern bool _stdcall loadIniConfig(char* fileName); 17 | extern void _stdcall setPTUFilePath(char* filePath); 18 | extern void _stdcall setIniConfig(char* iniData); 19 | extern int _stdcall getDeviceConfig(char* conf); 20 | extern int _stdcall getManisConfig(char* conf); 21 | extern int _stdcall getMeasDescription(char* conf); 22 | 23 | /********** Device **********/ 24 | extern bool _stdcall setInputHysteresis(int hystCode); 25 | extern bool _stdcall setTimingMode(int timingMode); 26 | extern bool _stdcall setStopOverflow(unsigned int stopCount); 27 | extern bool _stdcall setBinning(int binning); 28 | extern bool _stdcall setOffset(int offset); 29 | extern bool _stdcall setHistoLength(int lengthCode); 30 | extern bool _stdcall clearHistMem(); 31 | extern bool _stdcall setMeasControl(int measControl, int startEdge, int stopEdge); 32 | extern bool _stdcall setTriggerOutput(int trigOutput); 33 | 34 | // Sync 35 | extern bool _stdcall setSyncDiv(int div); 36 | extern bool _stdcall setSyncTrigMode(int syncTrigMode); 37 | extern bool _stdcall setSyncEdgeTrig(int trigLvlSync, int trigEdgeSync); 38 | extern bool _stdcall setSyncCFD(int discrLvlSync, int zeroXLvlSync); 39 | extern bool _stdcall setSyncChannelOffset(int syncChannelOffset); 40 | extern bool _stdcall setSyncChannelEnable(int syncChannelEnable); 41 | extern bool _stdcall setSyncDeadTime(int syncChannelEnable); 42 | 43 | // Channel 44 | extern bool _stdcall setInputTrigMode(int iChan, int trigMode); 45 | extern bool _stdcall setInputEdgeTrig(int iChan, int trigLvl, int trigEdge); 46 | extern bool _stdcall setInputCFD(int iChan, int discrLvl, int zeroXLvl); 47 | extern bool _stdcall setInputChannelOffset(int iChan, int chanOffs); 48 | extern bool _stdcall setInputChannelEnable(int iChan, int chanEna); 49 | extern bool _stdcall setInputDeadTime(int iChan, int deadTime); 50 | 51 | /********** Measurements **********/ 52 | extern void _stdcall getCountRates(int* syncRate, int* cntRates); 53 | extern void _stdcall getSyncPeriod(double* syncPeriod); 54 | extern bool _stdcall getHistogram(int tAcq, bool waitFinished, bool savePTU, unsigned int* data, bool* finished); 55 | extern void _stdcall setHistoT2RefChan(unsigned char iChan); 56 | extern void _stdcall setHistoT2BinWidth(unsigned long long binWidth); 57 | extern bool _stdcall getTimeTrace(int tAcq, bool waitFinished, bool savePTU, unsigned int* data, unsigned long long* t0, bool* finished); 58 | extern void _stdcall setTimeTraceNumBins(int numBins); 59 | extern void _stdcall setTimeTraceHistorySize(double historySize); 60 | extern void _stdcall setG2Params(unsigned long long startChannel, unsigned long long clickChannel, double windowSize, double binWidth); 61 | extern void _stdcall setFCSParams(unsigned long long startChannel, unsigned long long clickChannel, unsigned long long* numTaus, unsigned long long intervalLength, double windowSize, double startTime); 62 | extern void _stdcall setFFCSParams(unsigned long long startChannel, unsigned long long clickChannel, unsigned long long* numTaus, unsigned long long intervalLength, double windowSize, double startTime); 63 | extern bool _stdcall getCorrelation(int tAcq, bool waitFinished, bool savePTU, double* data, double* bins, bool* finished); 64 | extern bool _stdcall rawMeasure(int tAcq, bool waitFinished, bool savePTU, unsigned int* data, unsigned long long* dataIdx, unsigned long long dataSize, bool* finished); 65 | extern bool _stdcall rawStartBlock(int tAcq, bool savePTU, unsigned int* data, unsigned long long dataSize, bool* finished); 66 | extern bool _stdcall rawGetBlock(unsigned int* data, unsigned long long* size); 67 | extern bool _stdcall stopMeasure(); 68 | extern bool _stdcall clearMeasure(); 69 | extern bool _stdcall ufMeasure(int tAcq, bool waitFinished, bool savePTU, unsigned long long* times, unsigned char* chans, unsigned long long* idx, unsigned long long dataSize, bool* finished); 70 | extern bool _stdcall ufStartBlock(int tAcq, bool savePTU, unsigned long long* time, unsigned char* chan, unsigned long long dataSize, bool* finished); 71 | extern bool _stdcall ufGetBlock(unsigned long long* times, unsigned char* chans, unsigned long long* size); 72 | extern bool _stdcall getTimesFromChannelUF(unsigned char* channels, unsigned long long* times, unsigned long long* timesOut, int channel, size_t* size); 73 | 74 | /********** Manipulators **********/ 75 | extern int _stdcall getNumAllChans(void); 76 | extern void _stdcall clearManis(void); 77 | extern int _stdcall addMCoincidence(int* chans, int numChans, double windowTime, int mode, int time, bool keepChannels); 78 | extern int _stdcall addMMerge(int* chans, int numChans, bool keepChannels); 79 | extern int _stdcall addMDelay(int chan, double delayTime, bool keepChannel); 80 | extern int _stdcall addMHerald(unsigned char herald, int* chans, int numChans, int delayTime, int windowTime, bool inverted, bool keepChannels); 81 | extern int _stdcall addMCountRate(double windowTime); 82 | extern bool _stdcall getMCountRates(int manisIdx, int* countRatess); 83 | 84 | /********** Marker **********/ 85 | extern bool _stdcall setMarkerEdges(int edge1, int edge2, int edge3, int edge4); 86 | extern bool _stdcall setMarkerEnable(int ena1, int ena2, int ena3, int ena4); 87 | extern bool _stdcall setMarkerHoldoffTime(int holdofftime); 88 | extern bool _stdcall setOflCompression(int holdtime); 89 | 90 | /********** HW-Filter **********/ 91 | extern bool _stdcall setRowEventFilter(int iRow, int timeRange, int matchCount, bool inverse, int useChans, int passChans); 92 | extern bool _stdcall enableRowEventFilter(int iRow, bool enable); 93 | extern bool _stdcall setMainEventFilterParams(int timeRange, int matchCount, bool inverse); 94 | extern bool _stdcall setMainEventFilterChannels(int iRow, int useChans, int passChans); 95 | extern bool _stdcall enableMainEventFilter(bool enable); 96 | extern bool _stdcall setFilterTestMode(bool testMode); 97 | extern bool _stdcall getRowFilteredRates(int* syncRate, int* countRates); 98 | extern bool _stdcall getMainFilteredRates(int* syncRate, int* countRates); 99 | 100 | /********** White Rabbit **********/ 101 | extern bool _stdcall WRabbitGetMAC(char* macAddr); 102 | extern bool _stdcall WRabbitSetMAC(char* macAddr); 103 | extern bool _stdcall WRabbitGetInitScript(char* script); 104 | extern bool _stdcall WRabbitSetInitScript(char* script); 105 | extern bool _stdcall WRabbitGetSFPData(char* sfpNames, int* dTxs, int* dRxs, int* alphas); 106 | extern bool _stdcall WRabbitSetSFPData(char* sfpNames, int* dTxs, int* dRxs, int* alphas); 107 | extern bool _stdcall WRabbitSetMode(int bootFromScript, int reinitWithMode, int mode); 108 | extern bool _stdcall WRabbitSetTime(unsigned long long time); 109 | extern bool _stdcall WRabbitGetTime(unsigned long long* time, unsigned char* subSec16ns); 110 | extern bool _stdcall WRabbitGetStatus(unsigned char* status); 111 | extern bool _stdcall WRabbitGetTermOutput(char* termOutput); 112 | extern bool _stdcall WRabbitInitLink(int onOff); -------------------------------------------------------------------------------- /snAPI/system.ini: -------------------------------------------------------------------------------- 1 | [Paths] 2 | # the path where the device configurations are stored 3 | Config = C:\Data\PicoQuant\Configs 4 | 5 | # the path, where the data (default.ptu) files are stored if no path is specified by `setPTUFilePath` 6 | # this folder and a subfolder named `log` will automatically generated by `initAPI` 7 | Data = C:\Data\PicoQuant 8 | 9 | [Log] 10 | # log to files 11 | File = 1 12 | # log to std out 13 | Console = 1 14 | 15 | # select witch parts should be logged 16 | [LogLevel] 17 | Api = 1 18 | Config = 1 19 | Device = 1 20 | DataFile = 1 21 | Manipulators = 1 22 | 23 | # buffer size in number of blocks of 1048576 Bytes 24 | [Params] 25 | BufferSize = 32 -------------------------------------------------------------------------------- /snAPI/th260lib64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/snAPI/th260lib64.dll -------------------------------------------------------------------------------- /tools/Tool_PlotCountRateByTriggerLevel.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import time 4 | 5 | from snAPI.Main import * 6 | import matplotlib 7 | import matplotlib.pyplot as plt 8 | matplotlib.use('TkAgg',force=True) 9 | print("Switched to:",matplotlib.get_backend()) 10 | 11 | if(__name__ == "__main__"): 12 | 13 | sn = snAPI() 14 | sn.getDevice() 15 | sn.initDevice() 16 | sn.loadIniConfig("config\PH330_Edge.ini") 17 | 18 | numChans = sn.deviceConfig["NumChans"] 19 | x, sync = [],[] 20 | chan = [[] for _ in range(numChans)] 21 | 22 | plt.show(block=False) 23 | init = True 24 | # set start, stop, step for the trigger level scan 25 | for trigLvl in range(-500, 0, 1): 26 | if sn.deviceConfig["SyncTrigMode"] == "Edge": 27 | sn.device.setInputEdgeTrig(-1, trigLvl, 0) 28 | sn.device.setSyncEdgeTrig(trigLvl, 0) 29 | elif sn.deviceConfig["SyncTrigMode"] == "CFD": 30 | sn.device.setInputCFD(-1, trigLvl, 0) 31 | sn.device.setSyncCFD(trigLvl, 0) 32 | 33 | if init: 34 | init = False 35 | time.sleep(0.1) 36 | 37 | cntRs = sn.getCountRates() 38 | 39 | sn.logPrint(trigLvl, cntRs) 40 | x.append(trigLvl) 41 | sync.append(cntRs[0]) 42 | for i in range(numChans): 43 | chan[i].append(cntRs[i+1]) 44 | 45 | plt.clf() 46 | plt.plot(x, chan[0], linewidth=2.0, label='sync') 47 | for i in range(numChans): 48 | plt.plot(x, chan[i], linewidth=2.0, label=f"chan{str(i)}") 49 | 50 | plt.xlabel('Trigger Level [mV]') 51 | plt.ylabel('Counts') 52 | plt.legend() 53 | plt.title("Counts / Trigger Level") 54 | plt.pause(0.2) 55 | 56 | plt.show(block=True) -------------------------------------------------------------------------------- /tools/Tool_ReadPTU.py: -------------------------------------------------------------------------------- 1 | from snAPI.Main import * 2 | 3 | if(__name__ == "__main__"): 4 | 5 | # PTU data 6 | start = 0 7 | length = 10 8 | 9 | sn = snAPI() 10 | sn.getFileDevice(r"C:\Data\PicoQuant\default.ptu") 11 | sn.getDeviceConfig() 12 | sn.logPrint(json.dumps(sn.deviceConfig, indent=2)) 13 | 14 | sn.getMeasDescription() 15 | sn.logPrint(json.dumps(sn.measDescription, indent=2)) 16 | 17 | sn.unfold.measure(acqTime=1000, size=int(sn.measDescription["NumRecs"]), waitFinished=True) 18 | times, channels = sn.unfold.getData() 19 | sn.logPrint(f"Unfold data records: {len(times)}") 20 | sn.logPrint(" channel | absTime") 21 | sn.logPrint("--------------------") 22 | 23 | for i in range(start,start+length): 24 | sn.logPrint(f"{channels[i]:9} | {times[i]:8}") -------------------------------------------------------------------------------- /vids/CountRateByTriggerLevel.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PicoQuant/snAPI/65e0d4983c476e044777d0f5692f615a8cd8004f/vids/CountRateByTriggerLevel.mov --------------------------------------------------------------------------------