Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hamamatsu signal type #209

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ``TransientSpec`` when Hamamatsu ``.img`` files are read and LumiSpy is installed.