Skip to content

Commit

Permalink
version update
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasprobst committed Mar 21, 2024
1 parent 72419ce commit 4f6caeb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "https://spdx.org/licenses/MIT",
"codeRepository": "https://github.com/MatthiasProbst/synpivimage",
"name": "synpivimage",
"version": "1.0.0a2",
"version": "1.0.0a3",
"description": "Tool to build synthetic Particle Image Velocimetry (PIV) images",
"applicationCategory": "Engineering",
"programmingLanguage": [
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = synpivimage
version = 1.0.0a2
version = 1.0.0a3
author = Matthias Probst
author_email = matthias.probst@kit.edu
description = Tool to build synthetic Particle Image Velocimetry (PIV) images
Expand Down
2 changes: 1 addition & 1 deletion synpivimage/gui/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(self, root_dir):
self.particle_image_diameter.setMinimum(0.5)
self.particle_image_diameter.setMaximum(10)
self.particle_image_diameter.setValue(2.5)

self.laser_width.setMinimum(0)
self.laser_width.setValue(2)
self.laser_shape_factor.setMinimum(1)
Expand Down
9 changes: 5 additions & 4 deletions synpivimage/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def __enter__(self):

image_dir.mkdir(parents=True, exist_ok=True)
(image_dir / 'imgs').mkdir(parents=True, exist_ok=True)
(image_dir / 'particles').mkdir(parents=True, exist_ok=True)

if self.camera:
self.camera.save_jsonld(image_dir / 'camera.json')
Expand Down Expand Up @@ -112,11 +111,13 @@ def write(self, index: int, img: np.ndarray, ab: Optional[Literal['A', 'B']] = N
cv2.imwrite(str(img_filename), np.asarray(img))

if particles:
particle_filename = self.image_dir / 'particles' / f'particles_{index:06d}{ab}.json'
particles.save_jsonld(self.image_dir / 'particles' / f'particles_{index:06d}{ab}.json')
particle_dir = (self.image_dir / 'particles')
particle_dir.mkdir(parents=True, exist_ok=True)
particle_filename = particle_dir / f'particles_{index:06d}{ab}.json'
particles.save_jsonld(particle_dir / f'particles_{index:06d}{ab}.json')
self.particle_filenames.append(particle_filename)

self.img_filenames.append(img_filename)
self.particle_filenames.append(particle_filename)
return img_filename

def writeA(self, index: int, img: np.ndarray, particles: Particles = None) -> pathlib.Path:
Expand Down
2 changes: 1 addition & 1 deletion synpivimage/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def generate_particles(ppp: float,
assert len(xe) == N + Nadd

N += Nadd

if N > N_max:
raise ValueError(f'Number of particles exceeded maximum of {N_max}. '
f'Consider increasing the number of iterations or the particle size')
Expand Down

0 comments on commit 4f6caeb

Please sign in to comment.