allensdk.internal.brain_observatory.ophys_session_decomposition module

allensdk.internal.brain_observatory.ophys_session_decomposition.export_frame_to_hdf5(raw_filename, data_hdf5_filename, auxiliary_hdf5_filename, frame_meta, compression='gzip', compression_opts=9)[source]

Export a frame from raw to hdf5.

Data with the channel_description data is stored in the data_hdf5_filename, while any other data is stored in the auxiliary_hdf5_filename

allensdk.internal.brain_observatory.ophys_session_decomposition.load_frame(raw_filename, json_meta, use_memmap=False)[source]

Load a frame of a multi-frame raw file.

allensdk.internal.brain_observatory.ophys_session_decomposition.open_view_on_binary(file_like, dtype=<class 'numpy.uint8'>, mode='r', offset=0, shape=None, order='C', strides=None)[source]

Open a view into a memory-mapped binary file.

Parameters:
file_like{string, file object}

File to open.

dtypenumpy.dtype

Numpy dtype to open the memory-mapped array as.

modestring

Mode to open the file in.

offsetinteger

Offset (in bytes) into the file at which to start the memory map.

shape{tuple, list}

Shape of the array.

order{“C”, “F”}

C or Fortran ordering.

strides{tuple, list}

Strides along each axis for reading the array.

Returns:
numpy.memmap

Strided view into memory-mapped array.

allensdk.internal.brain_observatory.ophys_session_decomposition.read_strided(filename, dtype, offset, shape, strides)[source]

Load a frame without memory-mapping.