Skip to content

Instantly share code, notes, and snippets.

@tritemio
Last active November 8, 2016 20:15
Show Gist options
  • Save tritemio/734347586bc999f39f9ffe0ac5ba0e66 to your computer and use it in GitHub Desktop.
Save tritemio/734347586bc999f39f9ffe0ac5ba0e66 to your computer and use it in GitHub Desktop.
Jupyter Notebook for decoding PicoQuant PTU files in python
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Decoding PTU files\n",
"\n",
"Reference:\n",
"\n",
"- https://github.com/PicoQuant/PicoQuant-Time-Tagged-File-Format-Demos/blob/master/PTU/cc/ptudemo.cc\n",
"\n",
"See also [this github issue](https://github.com/Photon-HDF5/phconvert/issues/12) for discussion."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"filename = 'data/Cy3+Cy5_diff_PIE-FRET.ptu'"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"filename = 'data/ncodina/20161027_DM1_1nM_pH7_20MHz1.ptu'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The next cell will check if the `filename` location is correct:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Data file found, you can proceed.\n"
]
}
],
"source": [
"import os\n",
"try: \n",
" with open(filename): pass\n",
" print('Data file found, you can proceed.')\n",
"except IOError:\n",
" print('ATTENTION: Data file not found, please check the filename.\\n'\n",
" ' (current value \"%s\")' % filename)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Initial imports and definitions"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"phconvert version: 0.7.2\n"
]
}
],
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import phconvert as phc\n",
"print('phconvert version: ' + phc.__version__)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from collections import OrderedDict, namedtuple\n",
"import time"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Constants\n",
"TTTRTagTTTRRecType = \"TTResultFormat_TTTRRecType\"\n",
"TTTRTagNumRecords = \"TTResult_NumberOfRecords\" # Number of TTTR Records in the File;\n",
"TTTRTagRes = \"MeasDesc_Resolution\" # Resolution for the Dtime (T3 Only)\n",
"TTTRTagGlobRes = \"MeasDesc_GlobalResolution\" # Global Resolution of TimeTag(T2) /NSync (T3)\n",
"FileTagEnd = \"Header_End\" # Always appended as last tag (BLOCKEND)\n",
"\n",
"# Tag Types\n",
"tag_type = dict(\n",
" tyEmpty8 = 0xFFFF0008,\n",
" tyBool8 = 0x00000008,\n",
" tyInt8 = 0x10000008,\n",
" tyBitSet64 = 0x11000008,\n",
" tyColor8 = 0x12000008,\n",
" tyFloat8 = 0x20000008,\n",
" tyTDateTime = 0x21000008,\n",
" tyFloat8Array = 0x2001FFFF,\n",
" tyAnsiString = 0x4001FFFF,\n",
" tyWideString = 0x4002FFFF,\n",
" tyBinaryBlob = 0xFFFFFFFF,\n",
" )\n",
"\n",
"# Record Types\n",
"rec_type = dict(\n",
" rtPicoHarpT3 = 0x00010303, # (SubID = $00 ,RecFmt: $01) (V1), T-Mode: $03 (T3), HW: $03 (PicoHarp)\n",
" rtPicoHarpT2 = 0x00010203, # (SubID = $00 ,RecFmt: $01) (V1), T-Mode: $02 (T2), HW: $03 (PicoHarp)\n",
" rtHydraHarpT3 = 0x00010304, # (SubID = $00 ,RecFmt: $01) (V1), T-Mode: $03 (T3), HW: $04 (HydraHarp)\n",
" rtHydraHarpT2 = 0x00010204, # (SubID = $00 ,RecFmt: $01) (V1), T-Mode: $02 (T2), HW: $04 (HydraHarp)\n",
" rtHydraHarp2T3 = 0x01010304, # (SubID = $01 ,RecFmt: $01) (V2), T-Mode: $03 (T3), HW: $04 (HydraHarp)\n",
" rtHydraHarp2T2 = 0x01010204, # (SubID = $01 ,RecFmt: $01) (V2), T-Mode: $02 (T2), HW: $04 (HydraHarp)\n",
" rtTimeHarp260NT3 = 0x00010305, # (SubID = $00 ,RecFmt: $01) (V1), T-Mode: $03 (T3), HW: $05 (TimeHarp260N)\n",
" rtTimeHarp260NT2 = 0x00010205, # (SubID = $00 ,RecFmt: $01) (V1), T-Mode: $02 (T2), HW: $05 (TimeHarp260N)\n",
" rtTimeHarp260PT3 = 0x00010306, # (SubID = $00 ,RecFmt: $01) (V1), T-Mode: $03 (T3), HW: $06 (TimeHarp260P)\n",
" rtTimeHarp260PT2 = 0x00010206, # (SubID = $00 ,RecFmt: $01) (V1), T-Mode: $02 (T2), HW: $06 (TimeHarp260P)\n",
" )\n",
"\n",
"# Reverse mappings\n",
"tag_type_r = {v: k for k, v in tag_type.items()}\n",
"rec_type_r = {v: k for k, v in rec_type.items()}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Open file and read magic and version"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"f = open(filename, 'rb')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"s = f.read() # reads all file in memory"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(b'PQTTTR', b'1.0.00')"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"magic = s[:8].rstrip(b'\\0')\n",
"version = s[8:16].rstrip(b'\\0')\n",
"magic, version"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"if magic != b'PQTTTR':\n",
" raise IOError(\"This file is not a valid PTU file. \"\n",
" \"Magic: '%s'.\" % header['Magic'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Read header\n",
"\n",
"Header is made of \"tags\" on unequal sizes. The following function\n",
"decodes a single tag:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import struct\n",
"\n",
"def _ptu_read_tag(s, offset):\n",
" tagdata = None\n",
" # Get the header struct as a tuple\n",
" # Struct fields: 32-char string, int32, uint32, int64\n",
" tag_struct = struct.unpack('32s i I q', s[offset:offset+48])\n",
" offset += 48\n",
" # and save it into a dict\n",
" tagname = tag_struct[0].rstrip(b'\\0').decode()\n",
" keys = ('idx', 'type', 'value')\n",
" tag = {k: v for k, v in zip(keys, tag_struct[1:])}\n",
" # Recover the name of the type (a string)\n",
" tag['type'] = tag_type_r[tag['type']]\n",
" \n",
" # Some tag types need conversion\n",
" if tag['type'] == 'tyFloat8':\n",
" tag['value'] = np.int64(tag['value']).view('float64')\n",
" elif tag['type'] == 'tyBool8':\n",
" tag['value'] = bool(tag['value'])\n",
" elif tag['type'] == 'tyTDateTime':\n",
" TDateTime = np.uint64(tag['value']).view('float64')\n",
" t = time.gmtime(_ptu_TDateTime_to_time_t(TDateTime))\n",
" tag['value'] = time.strftime(\"%Y-%m-%d %H:%M:%S\", t)\n",
" \n",
" # Some tag types have additional data\n",
" if tag['type'] == 'tyAnsiString':\n",
" tag['data'] = s[offset: offset + tag['value']].rstrip(b'\\0').decode()\n",
" offset += tag['value']\n",
" elif tag['type'] == 'tyFloat8Array':\n",
" tag['data'] = np.frombuffer(s, dtype='float', count=tag['value']/8)\n",
" offset += tag['value']\n",
" elif tag['type'] == 'tyWideString':\n",
" # WideString use type WCHAR in the original C++ demo code.\n",
" # WCHAR size is not fixed by C++ standard, but on windows \n",
" # is 2 bytes and the default encoding is UTF-16.\n",
" # I'm assuming this is what the PTU requires.\n",
" tag['data'] = s[offset: offset + tag['value']*2].decode('utf16')\n",
" offset += tag['value']\n",
" elif tag['type'] == 'tyBinaryBlob':\n",
" tag['data'] = s[offset: offset + tag['value']]\n",
" offset += tag['value']\n",
" \n",
" return tagname, tag, offset\n",
"\n",
"def _ptu_TDateTime_to_time_t(TDateTime):\n",
" EpochDiff = 25569 # days between 30/12/1899 and 01/01/1970\n",
" SecsInDay = 86400 # number of seconds in a day\n",
" return (TDateTime - EpochDiff) * SecsInDay"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Decode the header and put data in an (ordered) dictionary (`tags`):"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"offset = 16\n",
"tag_end_offset = s.find(FileTagEnd.encode())\n",
"\n",
"tags = OrderedDict()\n",
"tagname, tag, offset = _ptu_read_tag(s, offset)\n",
"tags[tagname] = tag\n",
"while offset < tag_end_offset:\n",
" tagname, tag, offset = _ptu_read_tag(s, offset)\n",
" tags[tagname] = tag"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's print a table of all tags in the header:"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"File_GUID 40 -1 tyAnsiString {CB047DA3-C1BE-4BCA-BFC9-60A31E50A8BA}\n",
"File_CreatingTime 2016-10-27 15:31:42 -1 tyTDateTime \n",
"Measurement_SubMode 1 -1 tyInt8 \n",
"File_Comment 168 -1 tyAnsiString coat cover-slip with BSA previously, to avoid surface adsorption\r\n",
"Laser 485 nm: 50000 au, 20MHz\r\n",
"objective: 60x/1.2NA\r\n",
"50 um pinhole\r\n",
"585 dichroic, 525/50, 645/75\n",
"TTResult_StopReason 0 -1 tyInt8 \n",
"Fast_Load_End 0 -1 tyEmpty8 \n",
"CreatorSW_Name 16 -1 tyAnsiString SymPhoTime 64\n",
"CreatorSW_Version 8 -1 tyAnsiString 2.1\n",
"CreatorSW_SVNBuild 3813 -1 tyInt8 \n",
"CreatorSW_Modules 0 -1 tyInt8 \n",
"ImgHdr_Dimensions 1 -1 tyInt8 \n",
"ImgHdr_Ident 6 -1 tyInt8 \n",
"ImgHdr_X0 40 -1 tyFloat8 \n",
"ImgHdr_Y0 40 -1 tyFloat8 \n",
"UsrPulseCfg 16 -1 tyAnsiString Standard\n",
"UsrPulseCfgIdx 0 -1 tyInt8 \n",
"UsrHeadName 24 1 tyAnsiString 594.0nm (LDH-D-TA-595)\n",
"Sep2_SerialNo 1027452 1304064 tyInt8 \n",
"Sep2_FirmwareVersion 1 1304064 tyInt8 \n",
"Sep2_SCM_000_SerialNo 1026939 1304064 tyInt8 \n",
"Sep2_SOM_100_SerialNo 1027866 1304064 tyInt8 \n",
"Sep2_SOM_100_BaseOscFreq 80000000 1304064 tyInt8 \n",
"Sep2_SOM_100_Divider 4 1304064 tyInt8 \n",
"Sep2_SOM_100_PreSync 0 1304064 tyInt8 \n",
"Sep2_SOM_100_SyncMask 1 1304064 tyInt8 \n",
"Sep2_SOM_100_InvSyncMask -1 1304064 tyInt8 \n",
"Sep2_SOM_100_Seq_BurstLen 0 7 tyInt8 \n",
"Sep2_SOM_100_Seq_EnaOutput -1 7 tyInt8 \n",
"Sep2_SOM_100_Seq_EnaSync 0 7 tyInt8 \n",
"Sep2_SLM_200_SerialNo 1028447 0 tyInt8 \n",
"Sep2_SLM_200_TriggerIndex 7 0 tyInt8 \n",
"Sep2_SLM_200_FineIntensity 60 0 tyInt8 \n",
"Sep2_SLM_200_CW_PulseDisable 0 0 tyInt8 \n",
"Sep2_SLM_200_HeadType 0 0 tyInt8 \n",
"Sep2_SLM_300_SerialNo 1028448 1 tyInt8 \n",
"Sep2_SLM_300_TriggerIndex 7 1 tyInt8 \n",
"Sep2_SLM_300_FineIntensity 0 1 tyInt8 \n",
"Sep2_SLM_300_CW_PulseDisable 0 1 tyInt8 \n",
"Sep2_SLM_300_HeadType 0 1 tyInt8 \n",
"Measurement_Mode 3 -1 tyInt8 \n",
"HW_Type 16 -1 tyAnsiString HydraHarp\n",
"HW_SerialNo 8 -1 tyAnsiString 1028074\n",
"HW_Version 8 -1 tyAnsiString 3.11\n",
"HW_ExternalRefClock 0 -1 tyBool8 \n",
"HW_Modules 4 -1 tyInt8 \n",
"HWModule_TypeCode 1040 3 tyInt8 \n",
"HWModule_VersCode 18153994 3 tyInt8 \n",
"HW_Markers 4 -1 tyInt8 \n",
"HWMarkers_Enabled 1 3 tyBool8 \n",
"HWMarkers_RisingEdge 0 3 tyBool8 \n",
"HW_BaseResolution 1e-12 -1 tyFloat8 \n",
"MeasDesc_BinningFactor 16 -1 tyInt8 \n",
"MeasDesc_Resolution 1.6e-11 -1 tyFloat8 \n",
"HWSync_CFDLevel 150 -1 tyInt8 \n",
"HWSync_CFDZeroCross 10 -1 tyInt8 \n",
"HWSync_Offset 89800 -1 tyInt8 \n",
"HWSync_Divider 8 -1 tyInt8 \n",
"HW_InpChannels 5 -1 tyInt8 \n",
"HWInpChan_CFDLevel 150 3 tyInt8 \n",
"HWInpChan_CFDZeroCross 10 3 tyInt8 \n",
"HWInpChan_Offset 420 3 tyInt8 \n",
"HWInpChan_Enabled 1 3 tyBool8 \n",
"HWInpChan_ModuleIdx 3 3 tyInt8 \n",
"TTResult_SyncRate 20000000 -1 tyInt8 \n",
"TTResult_InputRate 0 3 tyInt8 \n",
"MeasDesc_GlobalResolution 5e-08 -1 tyFloat8 \n",
"TTResult_NumberOfRecords 24731887 -1 tyInt8 \n",
"MeasDesc_AcquisitionTime 600000 -1 tyInt8 \n",
"TTResult_StopAfter 600000 -1 tyInt8 \n",
"TTResultFormat_TTTRRecType 16843524 -1 tyInt8 \n",
"TTResultFormat_BitsPerRecord 32 -1 tyInt8 \n",
"UsrPowerDiode 2.383e+04 -1 tyFloat8 \n"
]
}
],
"source": [
"line = '{:30s} %s {:8} {:12} '\n",
"for n in tags:\n",
" value_fmt = '{:>20}'\n",
" if tags[n]['type'] == 'tyFloat8':\n",
" value_fmt = '{:20.4g}'\n",
" endline = '\\n'\n",
" if tags[n]['type'] == 'tyAnsiString':\n",
" endline = tags[n]['data'] + '\\n'\n",
" print((line % value_fmt).format(n, tags[n]['value'], tags[n]['idx'], tags[n]['type']), \n",
" end=endline)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Some useful metadata extracted from the header:"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"5e-08"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"timestamps_unit = 1/tags['TTResult_SyncRate']['value']\n",
"timestamps_unit"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"1.5999999936067155e-11"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"nanotimes_unit = tags['MeasDesc_Resolution']['value']\n",
"nanotimes_unit"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"600.0"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"acquisition_duration = tags['MeasDesc_AcquisitionTime']['value']*1e-3\n",
"acquisition_duration"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Read T3records\n",
"\n",
"Read and decode the \"T3records\":"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'rtHydraHarp2T3'"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"record_type = rec_type_r[tags[TTTRTagTTTRRecType]['value']]\n",
"record_type"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"24731887"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"num_records = tags[TTTRTagNumRecords]['value']\n",
"num_records"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"t3records = np.frombuffer(s, dtype='uint32', count=num_records, offset=offset)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"24731887"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(t3records)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"With the proper parameters, phconvert's function `process_t3records` ([doc](http://phconvert.readthedocs.io/en/latest/pqreader.html#phconvert.pqreader.process_t3records))\n",
"should be able to cover all cases. So far we handle only a few record types\n",
"for which example files have been provided. \n",
"\n",
"If you want to add support for a new\n",
"record type, please open an [issue on github](https://github.com/Photon-HDF5/phconvert/issues) and send and example data file."
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"if record_type == 'rtPicoHarpT3':\n",
" detectors, timestamps, nanotimes = \\\n",
" phc.pqreader.process_t3records(\n",
" t3records, time_bit=16, dtime_bit=12, ch_bit=4, special_bit=False)\n",
"elif record_type == 'rtHydraHarp2T3':\n",
" detectors, timestamps, nanotimes = \\\n",
" phc.pqreader.process_t3records(\n",
" t3records, time_bit=10, dtime_bit=15, ch_bit=6, special_bit=True,)\n",
"else:\n",
" raise NotImplementedError('Sorry, decoding \"%s\" record type is not implemented!' % \n",
" record_type)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> **NOTE** Additional `record_types` may require using the proper parameters for `process_t3records`. You can find those paramenters in this [PicoQuant demo code](https://github.com/PicoQuant/PicoQuant-Time-Tagged-File-Format-Demos/blob/master/PTU/cc/ptudemo.cc)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Plots"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(array([ 0, 1, 34, 50, 68, 127], dtype=uint8),\n",
" array([ 6023938, 11473517, 1, 1, 2, 7234428]))"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.unique(detectors, return_counts=True)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEGCAYAAACevtWaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAENRJREFUeJzt3X+M5HV9x/HnC0/aKkWqVon8FBG1VHtgg1e1dBEaTkWu\nf9jmTttSqsS0okZjC9Y0HGnTiP2Btv6otIii4rVgY7GBelIcU6LoVTiB84ATDNwBpQEx1NaaE979\nYwac7s3uzO59b2f30+cjmWS+M5/5zOuW3dd+5jPzXVJVSJLast+0A0iSume5S1KDLHdJapDlLkkN\nstwlqUGWuyQ1aMnLPcnFSe5PctMEY/8iyY1JbkhyW5LvLEVGSVrpstSfc0/ycuB7wKVV9aIFPO5s\nYHVVvXGfhZOkRiz5yr2qrgMeGr4tyVFJrk6yJcmXkhwz4qEbgE8vSUhJWuFWTTvAwEXAm6rqjiQn\nAB8GTn7sziSHA0cC104nniStLFMv9yRPBl4KXJ4kg5ufOGvYeuCK8m8lSNJEpl7u9LeGHqqq4+cZ\nsx743SXKI0kr3tg993GfbknyuiTfSLI1yXVJXjjB82Zwoar+E/h2ktcOzfmioevPAw6qqusnmFeS\nxGRvqF4CnDrP/XcCJ1bVauCPgb+Zb7IklwFfBo5JcneSM4HXA28Y/IK4BTh96CHrgU0T5JQkDUz0\nUcgkRwCfG/fRxSQHATdX1WEd5ZMkLULXH4V8I3B1x3NKkhaoszdUk5wEnAm8vKs5JUmL00m5D94A\nvQhYW1UPzTPOjzJK0iJUVcaP+pFJt2Ue/3TLHnf0TzD6DPAbVXXHuImqatlfzjvvvKlnMKc5V2pG\nc3Z/WYyxK/fBp1tmgKcluRs4D9i/39N1EfCHwFOBDw1OQtpdVScsKo0kqRNjy72qXjfm/rOAszpL\nJEnaa/499xFmZm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Q2ws6punnaWMY4B\nTkxyfZIvJvn5cQ9YqnKf5ESoZSPJAfT/jMLbBiv4ZSPJq4H7B68wwuiv7XKwCjge+GBVHQ/8N/0t\nhWUlyUH0V8NHAM8CDkjyuummakeSdwO7q+qyaWeZbbDYeDdw3vDNU4ozzirgoKpaA/w+8PfjHrBU\n5b4LGP5LkYeyTF76zjZ4aX4F8Imq+sdp5xnhZcDpSe4EPg2clOTSKWcaZRf9FdG/DY6voF/2y80p\nwJ1V9Z3Bn874B+ClU840n/uTPBMgycHAf0w5z5ySnEF/+3C5/rJ8DnAk8I0k36bfS19PsscJmMvA\nTvrfm1TVFuDRJE+b7wFLVe6Pnwg1+CTCemC5fsrjo8A3q+r90w4ySlX9QVUdXlVH0f86XltVvznt\nXLMNtg52JjlmcNPJLM83gO8G1iT58SShn3M5vfE7+9XZlcBvDa6fASyXBcj/yZlkLf0V5ulV9YOp\npdrT4zmr6paqOriqjqqqZ9NfkBxXVcvhF+bs/+6fZfAHGQc/U0+sqgfnm2BJyn2wInrsRKhtwKaq\nWk4/QAAkeRnweuAVSW4c7BWvnXauFeytwKeSbKX/aZk/mXKePVTV1+i/qrgR+Ab9H6iLphpqIMll\nwJeBY5LcneRM4D3ALye5jf6rjrEfidvX5sj5V8ABwBcGP0cfmmpI5sw5rFgG2zJz5PwocFSSm4HL\ngLELOk9ikqQG+b/Zk6QGWe6S1CDLXZIaZLlLUoMsd0lqkOUuSQ2y3CWpQZa7JDXofwGIN4RTDTn1\nygAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x115e5af28>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.hist(detectors, bins=np.arange(16));"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAETCAYAAAD53IeuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/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ramnJz80sxlm1uLpoZptIiKS\nATPrBSwFHnf3Ls143/mEharObMnnq/IWEcnAuhYhM7P2ZjbMzMab2btm1mEdbz0e+HtLPz/yQzoi\nIpLWA8DZ7v5Z6knJe2mwumpqj4PtyMLT50reIiJZYGabAXsCz5rZD8sjbNTosL7Ac56FfrWSt4hI\ndrQCFrl79/Uc0xfon60PExGRzKxZhMzdlwCfm9kxa35o1qXB6x2Bn7r7+9n4YCVvEZEMpBYhGwN0\nMLNZZnYaYQGqM1KbsEwBDm/wlr6EXbey8/maKigiUnxUeYuIFCElbxGRIqTkLSJShJS8RUSKkJK3\niEgRUvIWESlCSt4iIkVIyVtEpAj9P6xXi+nRZFx3AAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x13b8e37f0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(timestamps);"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAECCAYAAAAYfWtSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8FHX+x/HXd1OAgIQSASUClhOQA8VCEdAo3oFygigo\nKBYU7+A4QWw0kSAWLD+FEzuIIiJ4qCgnHuppBMSCHggqVaRJUXoLIcl+f3/Mpm/CJtkyyb6fj0ce\nmfnu7Mwns5v97LfMd4y1FhERiU6eSAcgIiKRoyQgIhLFlARERKKYkoCISBRTEhARiWJKAiIiUUxJ\nQEQkiikJiIhEsZAkAWPMxcaYhcaY540xF4XiGCIiUn6hqglY4CBQBdgaomOIiEg5BZQEjDFTjTE7\njTErCpV3NcasNsasNcYMzym31i601nYDRgAPBjdkEREJlkBrAtOALvkLjDEeYLKvvAXQ1xjTrNDz\n9gHx5Q1SRERCIzaQjay1i40xjQsVtwHWWWs3ARhjZgE9gNXGmJ44ySERJ1GIiIgLBZQEitEQ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sTOUwkxheU8BTyBnIiIVD66x7CISBRTEhARiWJKAiIiUUxJQEQk\niikJiIhEMSUBEZEopiQgIhLF/h9nnkV4OneHzAAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x13bdb4438>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.hist(nanotimes[detectors == 0], bins=np.arange(4096), histtype='step');\n",
"plt.hist(nanotimes[detectors == 1], bins=np.arange(4096), histtype='step');\n",
"plt.yscale('log')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"It works!"
]
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [default]",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment