esmraldi.imzlio_mmap

Module Contents

Functions

get_filename_mmap(filename)

get_filename_h5(filename)

build_h5(imzml)

load_h5(imzml)

load_mmap(imzml)

build_mmap(imzml)

chunk_process(array, fn, max_iter, chunk_size, **kwds)

fn_coordinates(array, i, next_index, out_i, max_iter, ...)

fn_pixel_numbers(array, i, next_index, out_i, ...)

fn_image(array, i, next_index, out_i, max_iter, **kwds)

fn_unique(array, i, next_index, out_i, max_iter, **kwds)

fn_flatten(array, i, next_index, out_i, max_iter, **kwds)

get_spectra_mmap(imzml, mdict[, pixel_numbers])

get_spectra_reduced_mmap(imzml, unique, indices_mzs, mdict)

unique_mmap(spectra, mdict)

get_full_spectra_mmap(imzml, mdict)

get_images_from_spectra_mmap(spectra, shape, mdict)

Extracts image as a numpy array from

get_full_spectra_h5(imzml, f)

esmraldi.imzlio_mmap.get_filename_mmap(filename)
esmraldi.imzlio_mmap.get_filename_h5(filename)
esmraldi.imzlio_mmap.build_h5(imzml)
esmraldi.imzlio_mmap.load_h5(imzml)
esmraldi.imzlio_mmap.load_mmap(imzml)
esmraldi.imzlio_mmap.build_mmap(imzml)
esmraldi.imzlio_mmap.chunk_process(array, fn, max_iter, chunk_size, **kwds)
esmraldi.imzlio_mmap.fn_coordinates(array, i, next_index, out_i, max_iter, **kwds)
esmraldi.imzlio_mmap.fn_pixel_numbers(array, i, next_index, out_i, max_iter, **kwds)
esmraldi.imzlio_mmap.fn_image(array, i, next_index, out_i, max_iter, **kwds)
esmraldi.imzlio_mmap.fn_unique(array, i, next_index, out_i, max_iter, **kwds)
esmraldi.imzlio_mmap.fn_flatten(array, i, next_index, out_i, max_iter, **kwds)
esmraldi.imzlio_mmap.get_spectra_mmap(imzml, mdict, pixel_numbers=[])
esmraldi.imzlio_mmap.get_spectra_reduced_mmap(imzml, unique, indices_mzs, mdict, pixel_numbers=[])
esmraldi.imzlio_mmap.unique_mmap(spectra, mdict)
esmraldi.imzlio_mmap.get_full_spectra_mmap(imzml, mdict)
esmraldi.imzlio_mmap.get_images_from_spectra_mmap(spectra, shape, mdict)

Extracts image as a numpy array from spectra intensities and the shape of the image, i.e the tuple (width, height)

Parameters
spectra: np.ndarray

spectra as numpy array [mz*I]

shape: tuple

shape of the image

Returns
np.ndarray

image

esmraldi.imzlio_mmap.get_full_spectra_h5(imzml, f)