{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Summary\n", "\n", "
\n", "This notebook computes the auto and cross-correlation between spots and pixels\n", "from a smFRET experiment on a 48-spot smFRET-PAX setup.\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Find data file" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "fname = 'data/pax-2017-07-11_06_12d_22d_mix_D200mW_A400mW.hdf5'" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'2017-07-11_06_12d'" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from pathlib import Path\n", "fname = Path(fname)\n", "assert fname.is_file(), 'File not found.'\n", "mlabel = '_'.join(fname.stem.replace('pax-', '').replace('alex-', '').split('_')[:3])\n", "mlabel" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'Tue Oct 31 11:23:26 2017'" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import time\n", "time.ctime()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Imports" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import os\n", "import numpy as np\n", "from IPython.display import display, HTML, Math\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "from ipywidgets import interact, interactive, fixed, interact_manual\n", "import ipywidgets as widgets\n", "from tqdm import tnrange, tqdm_notebook\n", "\n", "%matplotlib inline\n", "plt.rcParams['font.sans-serif'].insert(0, 'Arial')\n", "plt.rcParams['font.size'] = 14\n", "plt.rcParams['path.simplify'] = True\n", "plt.rcParams['path.simplify_threshold'] = 1" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'0.1.0'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pycorrelate as pyc\n", "pyc.__version__" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " - Optimized (cython) burst search loaded.\n", " - Optimized (cython) photon counting loaded.\n", "--------------------------------------------------------------\n", " You are running FRETBursts (version 0.6.5).\n", "\n", " If you use this software please cite the following paper:\n", "\n", " FRETBursts: An Open Source Toolkit for Analysis of Freely-Diffusing Single-Molecule FRET\n", " Ingargiola et al. (2016). http://dx.doi.org/10.1371/journal.pone.0160716 \n", "\n", "--------------------------------------------------------------\n" ] } ], "source": [ "from fretbursts import *" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": true }, "outputs": [], "source": [ "skip_ch = (12, 13)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "save_figures = True\n", "savefigdir = 'figures'\n", "highres = False" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Define functions" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def info_html(d):\n", " \"\"\"Display measurement info in the notebook\"\"\"\n", " Dex, Aex = d.setup['excitation_input_powers']*1e3\n", " s = \"\"\"\n", "\n", "{descr}
\n", "12d ~6nM 22d ~620pM\n", "12d:22d mixed 1:2, then diluted 10x\n", "same gasket as measurement 5\n", "powers: D200mW_A400mW\n", "