Skip to content

Commit

Permalink
fixed names of _targets
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlib committed Dec 22, 2024
1 parent 251cc1a commit 0724080
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions pyptv/ptv.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ def py_correspondences_proc_c(exp):

# Save targets only after they've been modified:
for i_cam in range(exp.n_cams):
exp.detections[i_cam].write(exp.spar.get_img_base_name(i_cam), frame)
base_name = exp.spar.get_img_base_name(i_cam).decode()
filename = base_name.split('%')[0] + base_name.split('d')[-1]
exp.detections[i_cam].write(filename.encode(), frame)

print("Frame " + str(frame) + " had " +
repr([s.shape[1] for s in sorted_pos]) + " correspondences.")
Expand Down Expand Up @@ -284,10 +286,9 @@ def py_sequence_loop(exp):
# Save targets only after they've been modified:
# this is a workaround of the proper way to construct _targets name
for i_cam in range(n_cams):
detections[i_cam].write(
spar.get_img_base_name(i_cam),
frame
)
base_name = spar.get_img_base_name(i_cam).decode()
filename = base_name.split('%')[0] + base_name.split('d')[-1]
detections[i_cam].write(filename.encode(), frame)

print("Frame " + str(frame) + " had " +
repr([s.shape[1] for s in sorted_pos]) + " correspondences.")
Expand Down
2 changes: 1 addition & 1 deletion pyptv/pyptv_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ def main():
# exp_path = software_path.parent / "test_cavity"
# exp_path = Path('/home/user/Downloads/one-dot-example/working_folder')
# exp_path = Path('/home/user/Downloads/test_crossing_particle')
exp_path = Path('/home/user/Documents/repos/multiplane_example_2')
exp_path = Path('../test_cavity')
print(f"Without input, PyPTV fallbacks to a default {exp_path} \n")

if not exp_path.is_dir() or not exp_path.exists():
Expand Down

0 comments on commit 0724080

Please sign in to comment.