5.1. from_video

This method extracts frames from a video file and creates a FitsArray object.


FitsArray.from_video(cls, path: str, start_time: Time | float | None = None, logger: Logger | None = None, verbose: bool = False) Self

Creates a FitsArray from frames of a video.

Notes

This method extracts frames from a video file and creates a FitsArray object.

Parameters

pathstr

The path of the video file as a string.

start_timeOptional[Union[Time, float]]

The start time of the video. It can be a Time object or a float representing the start time in seconds. If None, the first frame’s MY_RELJD is considered zero (0).

loggerOptional[Logger]

An optional logger for logging messages during the operation.

verbosebool, optional, default=False

If set to True, additional information will be displayed during processing.

Returns

FitsArray

A FitsArray object containing the frames extracted from the video.

Raises

FileNotFoundError

Raised when the specified video file does not exist.


5.1.1. Example:

from myraflib import FitsArray

fa = FitsArray.from_video("PATH/TO/VIDEO")