papylio.Movie#
- class papylio.Movie(filepath, rot90=0)#
- __init__(filepath, rot90=0)#
Methods
__init__(filepath[, rot90])apply_corrections(frames, frame_indices)flatten_channels(frames)frames_to_xarray_dataarray(frames, frame_indices)get_channel(image[, channel])get_channel_from_name(channel_name)Get the channel index belonging to a specific channel (name) If
get_channel_indices_from_names(channel_names)get_channels_from_names(channel_names)Get the channel index belonging to a specific channel (name) If
get_illumination_from_name(illumination_name)Get the channel index belonging to a specific channel (name) If
get_illuminations_from_names(illumination_names)Get the channel index belonging to a specific channel (name) If
image_info_from_filename(filename)image_info_to_filename(filename[, ...])make_average_image(**kwargs)Construct an average image Determine average image for a number_of_frames starting at start_frame.
make_maximum_projection(**kwargs)Construct a maximum projection image Determine maximum projection image for a number_of_frames starting at start_frame.
make_projection_image([projection_type, ...])Construct a projection image Determine a projection image for a number_of_frames starting at start_frame.
make_projection_images([projection_type, ...])read_frame(frame_index, **kwargs)read_frames([frame_indices, ...])save_corrections(**kwargs)separate_channels(frames)show()show_correction(correction_name[, save])Attributes
number of channels in the movie
number of channels in the movie
number of channels in the movie
- apply_corrections(frames, frame_indices)#
- property bitdepth#
- property boundaries_metric#
- property boundaries_stage#
- property bytes_per_frame#
- property channel_arrangement#
- property channel_columns#
- property channel_indices#
- property channel_rows#
- property corrections#
- property corrections_filepath#
- property data_type#
- determine_general_background_correction(method='median', frame_range=(0, 20), use_existing=False)#
- determine_spatial_background_correction(method='median_filter', frame_range=(0, 20), use_existing=False, **kwargs)#
- determine_temporal_background_correction(method='median', use_existing=False)#
- flatten_channels(frames)#
- property frame_indices#
- frames_to_xarray_dataarray(frames, frame_indices)#
- get_channel(image, channel='d')#
- get_channel_from_name(channel_name)#
Get the channel index belonging to a specific channel (name) If
- Parameters:
channel (
strorint) – The name or number of a channel- Returns:
i (
int) – The index of the channel to which the channel name belongs
- get_channel_indices_from_names(channel_names)#
- get_channels_from_names(channel_names)#
Get the channel index belonging to a specific channel (name) If
- Parameters:
channel (
strorint) – The name or number of a channel- Returns:
i (
int) – The index of the channel to which the channel name belongs
- classmethod get_illumination_from_name(illumination_name)#
Get the channel index belonging to a specific channel (name) If
- Parameters:
channel (
strorint) – The name or number of a channel- Returns:
i (
int) – The index of the channel to which the channel name belongs
- classmethod get_illumination_indices_from_names(illumination_names)#
- classmethod get_illuminations_from_names(illumination_names)#
Get the channel index belonging to a specific channel (name) If
- Parameters:
channel (
strorint) – The name or number of a channel- Returns:
i (
int) – The index of the channel to which the channel name belongs
- property height_metric#
- property illumination_arrangement#
- property illumination_index_per_frame#
- property illumination_indices#
- property illumination_indices_in_movie#
- illuminations = [Illumination(green), Illumination(red)]#
- classmethod image_info_from_filename(filename)#
- classmethod image_info_to_filename(filename, fov_index=None, projection_type=None, frame_range=None, illumination=None, apply_corrections=None)#
- make_average_image(**kwargs)#
Construct an average image Determine average image for a number_of_frames starting at start_frame. i.e. [start_frame, start_frame + number_of_frames)
- Parameters:
start_frame (
int) – Frame to start withnumber_of_frames (
int) – Number of frames to average overwrite (
bool) – If true, the a tif file will be saved in the writepath
- Returns:
np.ndarray– 2d image array with the average image
- make_maximum_projection(**kwargs)#
Construct a maximum projection image Determine maximum projection image for a number_of_frames starting at start_frame. i.e. [start_frame, start_frame + number_of_frames)
- Parameters:
start_frame (
int) – Frame to start withnumber_of_frames (
int) – Number of frames to average overwrite (
bool) – If true, the a tif file will be saved in the writepath
- Returns:
np.ndarray– 2d image array with the maximum projection image
- make_projection_image(projection_type='average', frame_range=(0, 20), apply_corrections=True, illumination=None, write=False, return_image=True, flatten_channels=True, intensity_range=None, color_map='gray')#
Construct a projection image Determine a projection image for a number_of_frames starting at start_frame. i.e. [start_frame, start_frame + number_of_frames)
- Parameters:
projection_type (
str) – ‘average’ for average image ‘maximum’ for maximum projection imagestart_frame (
int) – Frame to start withnumber_of_frames (
int) – Number of frames to average overwrite (
bool) – If true, a tif file will be saved in writepath
- Returns:
np.ndarray– 2d image array with the projected image
- make_projection_images(projection_type='average', frame_range=(0, 20))#
- property number_of_channels#
number of channels in the movie
Setting the number of channels will divide the image horizontally in equally spaced channels.
- Type:
int
- property number_of_channels_per_frame#
- property number_of_illuminations#
number of channels in the movie
Setting the number of channels will divide the image horizontally in equally spaced channels.
- Type:
int
- property number_of_illuminations_in_movie#
number of channels in the movie
Setting the number of channels will divide the image horizontally in equally spaced channels.
- Type:
int
- property pixel_to_stage_coordinates_transformation#
- property pixels_per_frame#
- read_frame(frame_index, **kwargs)#
- read_frames(frame_indices=None, apply_corrections=True, xarray=True, flatten_channels=False)#
- read_header()#
- reset_corrections()#
- save_corrections(**kwargs)#
- saveas_tif()#
- separate_channels(frames)#
- show()#
- show_correction(correction_name, save=True, **kwargs)#
- property time#
- classmethod type_dict()#
- property width_metric#