Hi!
Thank you for your the code, it is really helpful.
I am currently trying to use the split_fov option. We have a single Kastl machine (from loopbio), and using square 96-well plates as used in Barlow et al., 2022.
I saw the the 'HYDRA_96WP_UPRIGHT.json' file in the 'tierpsy\extras\splitfov_param_files' dir specifies serial numbers of cameras and also number of HYDRA. Since we have only one hydra and different serial numbers for the six cameras, I edited and saved a new json file (same dir). When creating the parameters file for the analysis I pick 'custom' under MWP_mapping and provide the path in the relevant box.
When I try to analyze, first it is extracting video metadata, and when done counting number of frames, I get this:
loading json C:\Users-----\Tierpsy\tierpsy-tracker\tierpsy\extras\splitfov_param_files\MOS_96WP_UPRIGHT.json for split fov
ERROR:
RuntimeError: The map-like callable must be of the form f(func, iterable), returning a sequence of numbers the same length as 'iterable'
Traceback (most recent call last):
File "C:\Users----\miniconda3\envs\tierpsy\lib\site-packages\scipy\optimize_differentialevolution.py", line 789, in _calculate_population_energies
parameters_pop[0:nfevs]))
File "C:\Users----\miniconda3\envs\tierpsy\lib\site-packages\scipy\optimize_differentialevolution.py", line 1028, in call
return self.f(x, *self.args)
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\analysis\split_fov\FOVMultiWellsSplitter.py", line 320, in fun_to_minimise
template_shape=self.well_shape,
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\analysis\split_fov\helper.py", line 357, in simulate_wells_lattice
dtype_out='float')
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\analysis\split_fov\helper.py", line 234, in make_square_template
x = np.linspace(-0.5, 0.5, n_pxls)
File "<array_function internals>", line 6, in linspace
File "C:\Users----\miniconda3\envs\tierpsy\lib\site-packages\numpy\core\function_base.py", line 124, in linspace
raise ValueError("Number of samples, %s, must be non-negative." % num)
ValueError: Number of samples, -2379, must be non-negative.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\processing\ProcessWorker.py", line 108, in
ProcessWorker(**args, cmd_original = subprocess.list2cmdline(sys.argv))
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\processing\ProcessWorker.py", line 38, in init
self.execAllPoints()
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\processing\ProcessWorker.py", line 66, in execAllPoints
cmd_original = self.cmd_original)
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\processing\trackProvenance.py", line 28, in execThisPoint
func(**argkws)
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\analysis\compress\processVideo.py", line 142, in processVideo
compressVideo(video_file, masked_image_file, **compress_vid_param)
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\analysis\compress\compressVideo.py", line 318, in compressVideo
wells_map=mwp_map
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\analysis\split_fov\FOVMultiWellsSplitter.py", line 133, in init
self.constructor_from_image(fname_or_img)
File "c:\users----\tierpsy\tierpsy-tracker\tierpsy\analysis\split_fov\FOVMultiWellsSplitter.py", line 178, in constructor_from_image
self.find_wells_on_grid()
File "c:\users-----\tierpsy\tierpsy-tracker\tierpsy\analysis\split_fov\FOVMultiWellsSplitter.py", line 344, in find_wells_on_grid
fun_to_minimise, bounds, polish=True)
File "C:\Users----\miniconda3\envs\tierpsy\lib\site-packages\scipy\optimize_differentialevolution.py", line 276, in differential_evolution
ret = solver.solve()
File "C:\Users----\miniconda3\envs\tierpsy\lib\site-packages\scipy\optimize_differentialevolution.py", line 688, in solve
self.population)
File "C:\Users----\miniconda3\envs\tierpsy\lib\site-packages\scipy\optimize_differentialevolution.py", line 794, in _calculate_population_energies
raise RuntimeError("The map-like callable must be of the"
RuntimeError: The map-like callable must be of the form f(func, iterable), returning a sequence of numbers the same length as 'iterable'
"C:\Users----\miniconda3\envs\tierpsy\python.exe" "c:\users-----\tierpsy\tierpsy-tracker\tierpsy\processing\ProcessWorker.py" "C:\Users----\Tracker Files test\96-well plates agar\agar- 10 fps\kk_031023_96well_agar_10fps_20231003_150608.24536747\kk_031023_96well_agar_10fps_20231003_150608.24536747.mp4" --masks_dir "C:\Users----\Tmp\MaskedVideos" --results_dir "C:\Users----\Tmp\Results" --json_file "C:\Users----\Tracker Files test\96-well plates agar\agar - 10 fps\kk_031023_96well_agar_10fps_20231003_150608.24536747\kk_031023_96well_agar_10fps_20231003_150608.24536747.json" --analysis_checkpoints "COMPRESS" "TRAJ_CREATE" "TRAJ_JOIN" "SKE_INIT" "BLOB_FEATS" "SKE_CREATE" "SKE_FILT" "SKE_ORIENT" "INT_PROFILE" "INT_SKE_ORIENT" "FEAT_INIT" "FEAT_TIERPSY"
Tasks: 1 finished, 0 remaining. Total_time 0:01:41.
Please, any help to make it work properly will be much appreciated. I want to use the well annotator program as well.
Thanks in advance,
Asaf