Skip to content

Commit f1ba596

Browse files
authored
Fix file not in shift (#214)
* Pass files which not in shift.json during shift * Bump version
1 parent 361383f commit f1ba596

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "py_build_cmake.build"
44

55
[project]
66
name = "vstarstack"
7-
version = "0.3.7.10"
7+
version = "0.3.7.11"
88
requires-python = ">=3.10"
99
authors = [{name="Vladislav Tsendrovskii", email="vtcendrovskii@gmail.com"}]
1010
description = 'Stacking astrophotos'

src/vstarstack/tool/shift.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,12 @@ def apply_shift(project: vstarstack.tool.cfg.Project, argv: list[str]):
125125

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

128-
args = [(name, filename, shifts[name], os.path.join(shifted_dir, name + ".zip"), interpolate if name in shifts else None)
129-
for name, filename in images]
128+
args = []
129+
for name, filename in images:
130+
if name not in shifts:
131+
continue
132+
args.append((name, filename, shifts[name], os.path.join(shifted_dir, name + ".zip"), interpolate))
133+
130134
with mp.Pool(ncpu) as pool:
131135
pool.starmap(_make_shift_same_size, args)
132136

0 commit comments

Comments
 (0)