def __init__(self,
                 results_head_path=Path('./data/calibration_data'),
                 results_data_dir_name='frame_rate_calculation'):
        assert self.__class__.CLOCK_VIDEO_PATH.resolve().is_file(), \
               f'No video found at {self.__class__.CLOCK_VIDEO_PATH.resolve}'

        self._results_head_path = results_head_path
        self._results_data_dir_name = results_data_dir_name

        self._ifvg = ImageFromVideoGrabber(self.__class__.CLOCK_VIDEO_PATH)
        self._cdf = CalibrationDataFiler(self._results_head_path)

        self._start_frame_num = 10

        # Lazy init
        self._results = None
        self._end_frame_num = None
    def __init__(
            self,
            session_dir: str,
            input_data_head_path=Path('/Volumes/WD'),
            results_head_path=Path('.') / 'data/calibration_data',
            cache_dir_path=Path('/Volumes/WD/image_cache'),
            num_points=1,
    ):
        self._session_dir = session_dir
        self._input_data_head_path = input_data_head_path
        self._results_head_path = results_head_path
        self._cache_dir_path = cache_dir_path
        self._num_points = num_points

        # Helpers
        self._ldfh = LDFH(self._input_data_head_path)
        self._calibration_data_filer = CalibrationDataFiler(
            self._results_head_path)

        self.maxima_text_color = 'red'
        self.minima_text_color = 'green'
        self.fontsize = 8

        # Lazy initializers
        self._pan_motor_read_data_series = None
        self._base_time_series = None
        self._motor_maxima = None
        self._motor_minima = None
        self._motor_maxima_from_series = None
        self._motor_minima_from_series = None
        self._motor_maxima_from_archive = None
        self._motor_minima_from_archive = None
        self._archived_results = None
        self._selected_frames_from_archive = None

        # State
        self._base_time = None
        self._motor_idx = None
        self._min_or_max = None
        self._alignment_results = []
    def __init__(self,
                 session_dir: str,
                 input_data_head_path=Path('/Volumes/WD'),
                 results_head_path=Path('.')  / 'data/calibration_data',
                 cache_dir_path=Path('/Volumes/WD/image_cache'),
                ):
        self._session_dir = session_dir
        self._input_data_head_path = input_data_head_path
        self._results_head_path = results_head_path
        self._cache_dir_path = cache_dir_path

        # helpers
        self._ldfh = LDFH(self._input_data_head_path)
        self._calibration_data_filer = CalibrationDataFiler(self._results_head_path)

        # state
        self._alignment_data = []

        # lazy inits
        self._latitude_series = None
        self._longitude_series = None
        self._time_series = None
    def __init__(
            self,
            session_dir: str,
            input_data_head_path=Path('/Volumes/WD'),
            results_head_path=Path('.') / 'data/calibration_data',
            cache_dir_path=Path('/Volumes/WD/image_cache'),
    ):
        self._session_dir = session_dir
        self._input_data_head_path = input_data_head_path
        self._results_head_path = results_head_path
        self._cache_dir_path = cache_dir_path

        # settings
        self._anotation_color = 'green'
        self._anotation_fontsize = '8'

        self._ldfh = LDFH(self._input_data_head_path)
        self._calibration_data_filer = CalibrationDataFiler(
            self._results_head_path)

        # lazy inits
        self._fov_time_series = None
        self._fov_data_series = None
        self._unique_fovs = None
        self._transition_indexes = None
        self._transition_levels = None
        self._unique_transitions = None

        # state
        self._alignment_results = {}
        self._current_transition = None
        self._alignment_stats_delays = []
        self._alignment_stats_durations = []
        self._alignment_stats_zoom_out_delays = []
        self._alignment_stats_zoom_out_durations = []
        self._alignment_stats_zoom_in_delays = []
        self._alignment_stats_zoom_in_durations = []
Ejemplo n.º 5
0
 def setUp(self):
     self.cdf = CalibrationDataFiler(self.__class__.TOP_LEVEL_PATH)
     self.remove_data_dir_and_top_level_dir()