Skip to content

Commit

Permalink
adding more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
miayh committed Oct 24, 2023
1 parent a0b1e63 commit 2b6a194
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pytrackmate/trackmate_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import glob as gb

def process_videos_parallel(args):
def process_video_parallel(args):
'''
Processes a single video in parallel.
Expand Down Expand Up @@ -51,8 +51,7 @@ def run_trackmate_parallel(path, trackmate_fn, trackmate_fn_args, num_threads=mp
Outputs
----------
Tracking results from each tif file (i.e. a Tuple of csv files, where each element
of the Tuple is the tracking data csv from a video.
Tracking results from each tif file.
'''

threads_avail = mp.cpu_count()
Expand All @@ -75,10 +74,7 @@ def run_trackmate_parallel(path, trackmate_fn, trackmate_fn_args, num_threads=mp
# create the arguments that `process_videos_parallel` will take
args = [(video, trackmate_fn, trackmate_fn_args) for video in videos]

pool.starmap(process_videos_parallel, args)

# pool.apply_async(process_videos_parallel, args=(videos, trackmate_fn, trackmate_fn_args))
# pool.apply(process_videos_parallel, args=trackmate_args)
pool.starmap(process_video_parallel, args)

finish_time = time.perf_counter()
print(f"Program finished in {finish_time-start_time} seconds.")
Expand Down

0 comments on commit 2b6a194

Please sign in to comment.