Skip to content

Commit

Permalink
Fix shifting image
Browse files Browse the repository at this point in the history
  • Loading branch information
vladtcvs committed Dec 17, 2024
1 parent 617f389 commit 4281b0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vstarstack/tool/shift.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def _make_shift_same_size(name : str, filename : str,
logger.info(f"Loaded {name}")
result = vstarstack.library.movement.move_image.move_dataframe(dataframe, shift, interpolate=interpolate)
logger.info(f"Transformed {name}")
logger.info(f"Saving {outfname}")
vstarstack.tool.common.check_dir_exists(outfname)
result.store(outfname)
logger.info(f"Saved {name}")
Expand Down Expand Up @@ -122,7 +123,7 @@ def apply_shift(project: vstarstack.tool.cfg.Project, argv: list[str]):

images = vstarstack.tool.common.listfiles(npy_dir, ".zip")

args = [(name, filename, shifts[name], interpolate if name in shifts else None, os.path.join(shifted_dir, name + ".zip"))
args = [(name, filename, shifts[name], os.path.join(shifted_dir, name + ".zip"), interpolate if name in shifts else None)
for name, filename in images]
with mp.Pool(ncpu) as pool:
pool.starmap(_make_shift_same_size, args)
Expand Down

0 comments on commit 4281b0f

Please sign in to comment.