Module for generating movies from 2p images
(c) 2015 C. Schmidt-Hieber GPLv3
movies.get_normbright(arr, mid=16.0)[source]¶Create 3-point calibration curve. Returns 3 points of input brightness that will be mapped to 0, 0.5, and 1.0 output
| Parameters: |
|
|---|---|
| Returns: | normcurve – 3 points of input brightness that will be mapped to 0, 0.5, and 1.0 output |
| Return type: | 3-tuple of floats |
movies.html_movie(fn)[source]¶Converts an mp4 movie to an html tag containing the complete encoded movie
| Parameters: | fn (str) – Full path to movie file name |
|---|---|
| Returns: | html_movie – An html tag containing the complete movie |
| Return type: | str |
movies.make_movie(tiff_trunk, out_file, fps, normbright=None, scalebarframe=None, verbose=False, scale=None, crf=30, ffmpeg='ffmpeg')[source]¶Produce a movie from a directory with individual tiffs at given frame rate
| Parameters: |
|
|---|---|
| Returns: | html_movie – An html tag containing the complete movie |
| Return type: | str |
movies.numpy_movie(fn)[source]¶Converts a movie to a numpy array
| Parameters: | fn (str) – Full path to movie file name |
|---|---|
| Returns: | array – Numpy array of shape (nframes, npixels_x, npixels_y) |
| Return type: | numpy.ndarray |
movies.save_scale_bar(png_name, scale_length_int, scale_length_px, xpx, ypx)[source]¶Save a png with transparent background showing a white scale bar with white label that can be added to a movie.
| Parameters: |
|
|---|