photon_mosaic_pipeline.preprocessing.stiminterpolation#

Photonstimulation artefact removal step for photon-mosaic-pipeline.

This module provides a function to remove artefacts by holographic photostimulation using the stiminterp package.

Functions

parse_si_metadata(tiff_path)

Reads metadata from a Scanimage TIFF and return a dictionary with specified key values.

run(dataset_folder, output_folder, tiff_name)

Photostimulation artefact removal using stiminterp.

photon_mosaic_pipeline.preprocessing.stiminterpolation.run(dataset_folder, output_folder, tiff_name, path_to_stim_h5=None, save_metadata=True, **kwargs)[source]#

Photostimulation artefact removal using stiminterp.

Runs stiminterp on the input TIFF and saves the processed TIFF and its ScanImage metadata as a JSON file to the output folder if required.

Parameters:
  • dataset_folder (Path) – Path to the dataset folder containing the input TIFF files.

  • output_folder (Path) – Path to the output folder where symlinks will be created.

  • tiff_name (str) – Name of the TIFF file to process.

  • path_to_stim_h5 (str | None) – Path to the stimulation TTL HDF5 file. Defaults to None.

  • save_metadata (bool) – Whether to save metadata as separate json file

  • **kwargs (dict) – Additional keyword arguments for stiminterp pipeline.

photon_mosaic_pipeline.preprocessing.stiminterpolation.parse_si_metadata(tiff_path)[source]#

Reads metadata from a Scanimage TIFF and return a dictionary with specified key values.

Parameters:

tiff_path – path to TIFF or directory containing tiffs

Returns:

dictionary of SI parameters

Return type:

dict