Skip to content

Commit

Permalink
Merge pull request #209 from jlaehne/hamamtsu-signal
Browse files Browse the repository at this point in the history
Fix hamamatsu signal type
  • Loading branch information
jlaehne authored Nov 3, 2024
2 parents 88923bf + e1f6458 commit 3fb0bfe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
14 changes: 8 additions & 6 deletions doc/user_guide/supported_formats/hamamatsu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ Hamamatsu

Reader for spectroscopy data saved in ``.img`` (ITEX) files from the HPD-TA
(High Performance Digital Temporal Analyzer) or HiPic (High Performance image control)
softwares from Hamamatsu, e.g. for streak cameras or high performance CCD cameras.
softwares from Hamamatsu, e.g. for images from streak cameras or high performance
CCD cameras.

If `LumiSpy <https://lumispy.org>`_ is installed, ``Luminescence`` will be
used as the ``signal_type``.
If `LumiSpy <https://lumispy.org>`_ is installed, ``LumiTransientSpectrum`` will be
used as the ``signal_type``, which is intended for streak camera images with
both wavelength and time axes.

.. Note::

Reading files containing multiple channels or multiple images per channel
is not implemented.
Currently, reading files containing multiple channels or multiple images per
channel is not implemented.

API functions
^^^^^^^^^^^^^

.. automodule:: rsciio.hamamatsu
:members:
:members:
6 changes: 4 additions & 2 deletions rsciio/hamamatsu/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def _map_signal_md(self):
)
signal["signal_type"] = ""
else:
signal["signal_type"] = "Luminescence" # pragma: no cover
signal["signal_type"] = "LumiTransientSpectrum" # pragma: no cover

try:
quantity = self.original_metadata["Comment"]["Acquisition"]["ZAxisLabel"]
Expand Down Expand Up @@ -497,7 +497,9 @@ def map_metadata(self):

def file_reader(filename, lazy=False, use_uniform_signal_axes=False, **kwds):
"""
Read Hamamatsu's ``.img`` file.
Read Hamamatsu's ``.img`` file, e.g. for streak camera images. In case
LumiSpy is installed, the signal type is automatically set to
``LumiTransientSpectrum``.
Parameters
----------
Expand Down
1 change: 1 addition & 0 deletions upcoming_changes/209.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set ``signal_type`` to ``LumiTransientSpectrum`` when Hamamatsu ``.img`` files are read and LumiSpy is installed.

0 comments on commit 3fb0bfe

Please sign in to comment.