-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/default/fluidpivviewer' into 'branch/default'
New files for fluidpivviewer Closes #32 See merge request fluiddyn/fluidimage!85
- Loading branch information
Showing
25 changed files
with
407 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""To be run in IPython to find a good set of parameters""" | ||
|
||
from fluidimage.piv import Work | ||
|
||
params = Work.create_default_params() | ||
|
||
params.series.path = "../../image_samples/Karman/Images" | ||
|
||
params.mask.strcrop = "50:350, 0:380" | ||
|
||
params.fix.correl_min = 0.4 | ||
params.fix.threshold_diff_neighbour = 2.0 | ||
|
||
params.piv0.shape_crop_im0 = 32 | ||
params.piv0.displacement_max = 5 | ||
params.piv0.nb_peaks_to_search = 2 | ||
|
||
params.multipass.number = 2 | ||
params.multipass.use_tps = "last" | ||
|
||
work = Work(params=params) | ||
|
||
piv = work.process_1_serie() | ||
|
||
# piv.display(show_interp=True, scale=0.3, show_error=False) | ||
piv.display(show_interp=False, scale=1, show_error=True) | ||
|
||
# piv.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./piv_0000a-b.h5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ build-backend = 'mesonpy' | |
|
||
[project] | ||
name = "fluidimage" | ||
version = "0.4.2" | ||
version = "0.4.3" | ||
description = "Fluid image processing with Python." | ||
authors = [ | ||
{name = "Pierre Augier", email = "[email protected]"}, | ||
|
@@ -55,6 +55,7 @@ Homepage = "https://foss.heptapod.net/fluiddyn/fluidimage" | |
fluidimviewer-pg = "fluidimage.gui.pg_main:main" | ||
fluidimviewer = "fluidimage.gui.imviewer:main" | ||
fluidimlauncher = "fluidimage.gui.launcher.main:main" | ||
fluidpivviewer = "fluidimage.gui.piv_viewer:main" | ||
|
||
[project.optional-dependencies] | ||
pims = ["pims"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,10 @@ | |
.. autosummary:: | ||
:toctree: | ||
base_matplotlib | ||
imviewer | ||
launcher | ||
pg_main | ||
piv_viewer | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"""Base class using matplotlib widgets | ||
""" | ||
|
||
from matplotlib.widgets import Button, TextBox | ||
|
||
|
||
class AppMatplotlibWidgets: | ||
|
||
_buttons: dict | ||
_textboxes: dict | ||
|
||
def __init__(self): | ||
self._buttons = {} | ||
self._textboxes = {} | ||
|
||
def _create_button(self, fig, rect, text, func): | ||
ax = fig.add_axes(rect) | ||
button = Button(ax, text) | ||
button.on_clicked(func) | ||
self._buttons[text] = button | ||
return button | ||
|
||
def _create_text_box(self, fig, rect, name, func, initial): | ||
ax = fig.add_axes(rect) | ||
textbox = TextBox(ax, name, initial=initial) | ||
textbox.on_submit(func) | ||
self._textboxes[name] = textbox | ||
return textbox | ||
|
||
def get_textbox(self, key): | ||
return self._textboxes[key] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.