Skip to content

Commit eedd992

Browse files
committed
1 parent 0ed803d commit eedd992

File tree

63 files changed

+259
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+259
-259
lines changed
Binary file not shown.

docs/main/_downloads/1b3c132ff7b40bb13bb60712fdfbc4bc/phasorpy_io.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"cell_type": "markdown",
195195
"metadata": {},
196196
"source": [
197-
"## PicoQuant PTU\n\nPicoQuant PTU files are written by PicoQuant SymPhoTime, Leica LAS X, and\nother software. The files contain time-correlated single-photon\ncounting (TCSPC) measurement data and instrumentation parameters.\n\nPhasorPy supports reading TCSPC histograms from PTU files acquired in T3\nimaging mode via the [ptufile](https://github.com/cgohlke/ptufile/)\nlibrary.\n\nThe :py:func:`phasorpy.io.signal_from_ptu` function is used to read\nthe TCSPC histogram from a PTU file exported from the [FLIM_testdata LIF\ndataset](https://dx.doi.org/10.6084/m9.figshare.22336594.v1).\nFor phasor analysis, all photons in periods with multiple photons must\nbe discarded before exporting to PTU format. In the Leica LAS X software,\nselect the \"FLIM\" tab, click on the \"Phasor\" button, and under\n\"Specialist Settings\" select the option \"Standard (High Speed)\".\nThe first channel in the first frame is read from the PTU file:\n\n"
197+
"## PicoQuant PTU\n\nPicoQuant PTU files are written by PicoQuant SymPhoTime, Leica LAS X, and\nother software. The files contain time-correlated single-photon\ncounting (TCSPC) measurement data and instrumentation parameters.\n\nPhasorPy supports reading TCSPC histograms from PTU files acquired in T3\nimaging mode via the [ptufile](https://github.com/cgohlke/ptufile/)\nlibrary.\n\nThe :py:func:`phasorpy.io.signal_from_ptu` function is used to read\nthe TCSPC histogram from a PTU file exported from the [FLIM_testdata LIF\ndataset](https://dx.doi.org/10.6084/m9.figshare.22336594.v1).\nFor phasor analysis, periods containing multiple photons must have all\ntheir photons discarded before exporting to PTU format. In the Leica\nLAS X software, select the \"FLIM\" tab, click on the \"Phasor\" button,\nand under \"Specialist Settings\" select the option \"Standard (High Speed)\".\nThe first channel in the first frame is read from the PTU file:\n\n"
198198
]
199199
},
200200
{
@@ -309,7 +309,7 @@
309309
"cell_type": "markdown",
310310
"metadata": {},
311311
"source": [
312-
"## Becker & Hickl SDT\n\nSDT files are written by Becker & Hickl software.\nThey may contain TCSPC histograms and metadata from laser-scanning\nmicroscopy.\n\nPhasorPy supports reading TCSPC histograms from FBD files via the\n[lfdfiles](https://github.com/cgohlke/lfdfiles/) library.\n\nThe :py:func:`phasorpy.io.signal_from_sdt` function is used to read a\nTCSPC histogram from a SDT file:\n\n"
312+
"## Becker & Hickl SDT\n\nSDT files are written by Becker & Hickl software.\nThey may contain TCSPC histograms and metadata from laser-scanning\nmicroscopy.\n\nPhasorPy supports reading TCSPC histograms from SDT files via the\n[sdtfile](https://github.com/cgohlke/sdtfile/) library.\n\nThe :py:func:`phasorpy.io.signal_from_sdt` function is used to read a\nTCSPC histogram from a SDT file:\n\n"
313313
]
314314
},
315315
{
@@ -352,7 +352,7 @@
352352
"cell_type": "markdown",
353353
"metadata": {},
354354
"source": [
355-
"## FLIMbox FBD\n\nFLIMbox data files, FBD, are written by SimFCS and ISS software.\nThey contain encoded cross-correlation phase histograms from digital\nfrequency-domain measurements acquired with a FLIMbox device.\nNewer file versions also contain metadata.\n\nThe FBD file format is undocumented, not standardized, and files are\nfrequently found corrupted. It is recommended to export FLIMbox data to\nanother format from the software used to acquire the data.\n\nPhasorPy supports reading some FLIMbox FBD files via the\n[lfdfiles](https://github.com/cgohlke/lfdfiles/) library.\n\nThe :py:func:`phasorpy.io.signal_from_fbd` function is used to read\na phase histograms from the\n[Convallaria FBD dataset](https://zenodo.org/records/14026720), which was\nacquired at the second harmonic. The dataset is a time series of two\nchannels. Since the photon count is low and the second channel empty,\nonly the first channel is read and the time-axis integrated:\n\n"
355+
"## FLIMbox FBD\n\nFLIMbox data files, FBD, are written by SimFCS and ISS software.\nThey contain encoded cross-correlation phase histograms from digital\nfrequency-domain measurements acquired with a FLIMbox device.\nNewer file versions also contain metadata.\n\nThe FBD file format is undocumented, not standardized, and files are\nfrequently found corrupted. Therefore, it is recommended to export FLIMbox\nfiles to another format from the software used to acquire the data.\n\nPhasorPy supports reading some FLIMbox FBD files via the\n[lfdfiles](https://github.com/cgohlke/lfdfiles/) library.\n\nThe :py:func:`phasorpy.io.signal_from_fbd` function is used to read\na phase histograms from the\n[Convallaria FBD dataset](https://zenodo.org/records/14026720), which was\nacquired at the second harmonic. The dataset is a time series of two\nchannels. Since the photon count is low and the second channel empty,\nonly the first channel is read and the time-axis integrated:\n\n"
356356
]
357357
},
358358
{
@@ -568,7 +568,7 @@
568568
"cell_type": "markdown",
569569
"metadata": {},
570570
"source": [
571-
"Three main lifetime components are expected in the sample:\nfree NADH (~0.4 ns), bound NADH (3.4 ns) and a long lifetime species (~8 ns).\nIt appears the calibration is off in this sample.\n\n"
571+
"Three main lifetime components are expected in the sample: free\nNADH (~0.4 ns), bound NADH (3.4 ns), and a long lifetime species (~8 ns).\nIt appears the calibration is off in this sample.\n\n"
572572
]
573573
},
574574
{
@@ -629,7 +629,7 @@
629629
"cell_type": "markdown",
630630
"metadata": {},
631631
"source": [
632-
"## PhasorPy OME-TIFF\n\nPhasorPy can store phasor coordinates and select metadata in\n[OME-TIFF](https://ome-model.readthedocs.io/en/stable/ome-tiff/)\nformatted files, which are compatible with Bio-Formats, Fiji, and other\nsoftware. The implementation is based on the\n[tifffile](https://github.com/cgohlke/tifffile/) library.\n\nIn comparison with the SimFCS R64 format, OME-TIFF can store higher\ndimensional, higher precision images of any size, any number of harmonics,\nand select metadata.\n\nPhasorPy OME-TIFF files are intended for temporarily exchanging phasor\ncoordinates with other software, not as a long-term storage solution.\nAlways preserve original data files in their native formats.\n\nThe :py:func:`phasorpy.io.phasor_to_ometiff` and\n:py:func:`phasorpy.io.phasor_from_ometiff` functions are used to write and\nread back calibrated phasor coordinates to/from PhasorPy OME-TIFF files:\n\n"
632+
"## PhasorPy OME-TIFF\n\nPhasorPy can store phasor coordinates and select metadata in\n[OME-TIFF](https://ome-model.readthedocs.io/en/stable/ome-tiff/)\nformatted files, which are compatible with Bio-Formats, Fiji, and other\nsoftware. The implementation is based on the\n[tifffile](https://github.com/cgohlke/tifffile/) library.\n\nCompared to the SimFCS R64 format, OME-TIFF offers several advantages.\nIt can store higher-dimensional, higher-precision images of any size,\nany number of harmonics, and selected metadata.\n\nPhasorPy OME-TIFF files are intended for temporarily exchanging phasor\ncoordinates with other software, not as a long-term storage solution.\nAlways preserve original data files in their native formats.\n\nThe :py:func:`phasorpy.io.phasor_to_ometiff` and\n:py:func:`phasorpy.io.phasor_from_ometiff` functions are used to write and\nread back calibrated phasor coordinates to/from PhasorPy OME-TIFF files:\n\n"
633633
]
634634
},
635635
{
@@ -640,7 +640,7 @@
640640
},
641641
"outputs": [],
642642
"source": [
643-
"from phasorpy.io import phasor_from_ometiff, phasor_to_ometiff\n\nfilename = f'{filename}.ome.tiff'\n\nwith TemporaryDirectory() as tmpdir:\n\n phasor_to_ometiff(\n filename,\n mean,\n real,\n imag,\n frequency=frequency,\n dims='YX',\n description='Written by PhasorPy',\n )\n\n mean1, real1, imag1, attrs = phasor_from_ometiff(filename, harmonic='all')\n assert_allclose(mean, mean1)\n assert attrs['frequency'] == frequency\n assert attrs['harmonic'] == [1, 2]\n assert attrs['description'] == 'Written by PhasorPy'"
643+
"from phasorpy.io import phasor_from_ometiff, phasor_to_ometiff\n\nwith TemporaryDirectory() as tmpdir:\n\n filename = os.path.join(tmpdir, 'capillaries1001.ome.tif')\n\n phasor_to_ometiff(\n filename,\n mean,\n real,\n imag,\n frequency=frequency,\n dims='YX',\n description='Written by PhasorPy',\n )\n\n mean1, real1, imag1, attrs = phasor_from_ometiff(filename, harmonic='all')\n assert_allclose(mean, mean1)\n assert attrs['frequency'] == frequency\n assert attrs['harmonic'] == [1, 2]\n assert attrs['description'] == 'Written by PhasorPy'"
644644
]
645645
},
646646
{
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/main/_downloads/7a852d16dd787759c626e759efa1dd52/phasorpy_io.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@
206206
# The :py:func:`phasorpy.io.signal_from_ptu` function is used to read
207207
# the TCSPC histogram from a PTU file exported from the `FLIM_testdata LIF
208208
# dataset <https://dx.doi.org/10.6084/m9.figshare.22336594.v1>`_.
209-
# For phasor analysis, all photons in periods with multiple photons must
210-
# be discarded before exporting to PTU format. In the Leica LAS X software,
211-
# select the "FLIM" tab, click on the "Phasor" button, and under
212-
# "Specialist Settings" select the option "Standard (High Speed)".
209+
# For phasor analysis, periods containing multiple photons must have all
210+
# their photons discarded before exporting to PTU format. In the Leica
211+
# LAS X software, select the "FLIM" tab, click on the "Phasor" button,
212+
# and under "Specialist Settings" select the option "Standard (High Speed)".
213213
# The first channel in the first frame is read from the PTU file:
214214

215215
from phasorpy.io import signal_from_ptu
@@ -327,8 +327,8 @@
327327
# They may contain TCSPC histograms and metadata from laser-scanning
328328
# microscopy.
329329
#
330-
# PhasorPy supports reading TCSPC histograms from FBD files via the
331-
# `lfdfiles <https://github.com/cgohlke/lfdfiles/>`_ library.
330+
# PhasorPy supports reading TCSPC histograms from SDT files via the
331+
# `sdtfile <https://github.com/cgohlke/sdtfile/>`_ library.
332332
#
333333
# The :py:func:`phasorpy.io.signal_from_sdt` function is used to read a
334334
# TCSPC histogram from a SDT file:
@@ -368,8 +368,8 @@
368368
# Newer file versions also contain metadata.
369369
#
370370
# The FBD file format is undocumented, not standardized, and files are
371-
# frequently found corrupted. It is recommended to export FLIMbox data to
372-
# another format from the software used to acquire the data.
371+
# frequently found corrupted. Therefore, it is recommended to export FLIMbox
372+
# files to another format from the software used to acquire the data.
373373
#
374374
# PhasorPy supports reading some FLIMbox FBD files via the
375375
# `lfdfiles <https://github.com/cgohlke/lfdfiles/>`_ library.
@@ -592,8 +592,8 @@
592592
)
593593

594594
# %%
595-
# Three main lifetime components are expected in the sample:
596-
# free NADH (~0.4 ns), bound NADH (3.4 ns) and a long lifetime species (~8 ns).
595+
# Three main lifetime components are expected in the sample: free
596+
# NADH (~0.4 ns), bound NADH (3.4 ns), and a long lifetime species (~8 ns).
597597
# It appears the calibration is off in this sample.
598598

599599
# %%
@@ -679,9 +679,9 @@
679679
# software. The implementation is based on the
680680
# `tifffile <https://github.com/cgohlke/tifffile/>`_ library.
681681
#
682-
# In comparison with the SimFCS R64 format, OME-TIFF can store higher
683-
# dimensional, higher precision images of any size, any number of harmonics,
684-
# and select metadata.
682+
# Compared to the SimFCS R64 format, OME-TIFF offers several advantages.
683+
# It can store higher-dimensional, higher-precision images of any size,
684+
# any number of harmonics, and selected metadata.
685685
#
686686
# PhasorPy OME-TIFF files are intended for temporarily exchanging phasor
687687
# coordinates with other software, not as a long-term storage solution.
@@ -693,10 +693,10 @@
693693

694694
from phasorpy.io import phasor_from_ometiff, phasor_to_ometiff
695695

696-
filename = f'{filename}.ome.tiff'
697-
698696
with TemporaryDirectory() as tmpdir:
699697

698+
filename = os.path.join(tmpdir, 'capillaries1001.ome.tif')
699+
700700
phasor_to_ometiff(
701701
filename,
702702
mean,
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)