{ "cells": [ { "cell_type": "markdown", "id": "f98d567f-d2bf-4eb8-826a-6d71866ff6b5", "metadata": {}, "source": [ "# Reading Photon-HDF5\n", "\n", "Example files can be found [here](https://figshare.com/articles/dataset/Example_smFRET_data_files_in_Photon_HDF5_format/1456362)" ] }, { "cell_type": "markdown", "id": "d49231b4-de49-4452-b6eb-d0a4caa113cd", "metadata": {}, "source": [ "Download the file (might take a bit):" ] }, { "cell_type": "code", "execution_count": null, "id": "2d5bd197-9592-4503-a8ae-be6d2f3d6067", "metadata": {}, "outputs": [], "source": [ "import requests\n", "import pathlib\n", "\n", "if not pathlib.Path('test_photon_file.hdf5').exists():\n", " r = requests.get('https://figshare.com/ndownloader/files/2182602')\n", "\n", " with open('test_photon_file.hdf5', 'wb') as f:\n", " f.write(r.content)" ] }, { "cell_type": "code", "execution_count": null, "id": "4ae8dba2-a98a-4b6d-84c7-e180751d4bde", "metadata": {}, "outputs": [], "source": [ "import h5rdmtoolbox as h5tbx" ] }, { "cell_type": "code", "execution_count": null, "id": "0cb048fc-f741-4c18-81b9-797f06409fba", "metadata": {}, "outputs": [], "source": [ "h5tbx.dump('test_photon_file.hdf5', collapsed=False)" ] }, { "cell_type": "code", "execution_count": null, "id": "e6b69070-6a9b-4155-b91c-28a75a18a15d", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.8.18" } }, "nbformat": 4, "nbformat_minor": 5 }