Skip to content

Commit

Permalink
fix gui
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasprobst committed Oct 17, 2024
1 parent dfbd7f6 commit c0d0006
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For running tests:
pip install .[test]
```

For using the GUI:
For using the GUI (experimentally at this stage!!! see [gui doc section](#gui)):
```cmd
pip install .[gui]
```
Expand Down Expand Up @@ -123,6 +123,12 @@ with synpivimage.HDF5Writer(case_name="test_case",
hw.writeB(0, imgB, partB)
```

## GUI
Is experimental and more for demonstrating and debugging purposes.


Go to `synpivimage/gui` and run `python core.py` to start the GUI.

## Developers

### Testing
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ test =
pylint
gui =
PyQt5
xarray
complete =
%(gui)s
%(test)s


Expand Down
7 changes: 5 additions & 2 deletions synpivimage/gui/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ def generate_images(self, take_existing_particles=False):
else:
particle_dataA = synpivimage.particles.Particles.generate(
dx_max=dx_max, dy_max=dy_max, dz_max=dz_max,
size=2., # TODO: should not be default
camera=cam,
laser=laser,
ppp=self.particle_density.value(),
Expand Down Expand Up @@ -468,13 +469,15 @@ def _plot_correlation(self):
self.axes[3][0].plot(z, laser_intensity)
# self.axes[4][0].plot(z, laser_intensity)

self.axes[3][1].scatter(self.particle_dataA[self.curr_img_index].z, self.particle_dataA[self.curr_img_index].y,
self.axes[3][1].scatter(self.particle_dataA[self.curr_img_index].z,
self.particle_dataA[self.curr_img_index].y,
color='b', alpha=0.5, s=10, marker='o')
# draw vlines for laser
self.axes[3][1].vlines(-self.laser_width.value() / 2, 0, self.nx.value(), color='k', linestyle='--')
self.axes[3][1].vlines(self.laser_width.value() / 2, 0, self.nx.value(), color='k', linestyle='--')

self.axes[3][1].scatter(self.particle_dataB[self.curr_img_index].z, self.particle_dataB[self.curr_img_index].y,
self.axes[3][1].scatter(self.particle_dataB[self.curr_img_index].z,
self.particle_dataB[self.curr_img_index].y,
color='r', alpha=0.5, s=10, marker='o')
self.axes[3][1].vlines(-self.laser_width.value() / 2, 0, self.nx.value(), color='k', linestyle='--')
self.axes[3][1].vlines(self.laser_width.value() / 2, 0, self.nx.value(), color='k', linestyle='--')
Expand Down

0 comments on commit c0d0006

Please sign in to comment.