-
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/topo_mean' into 'branch/default'
topology mean See merge request fluiddyn/fluidimage!109
- Loading branch information
Showing
34 changed files
with
758 additions
and
206 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from pathlib import Path | ||
from shutil import rmtree | ||
|
||
from pyinstrument import Profiler | ||
from pyinstrument.renderers import ConsoleRenderer | ||
|
||
from fluidimage.topologies.mean import Topology | ||
|
||
path_images = Path("/fsnet/project/watu/2022/22INTERNAL_F/DATA/EXP44/PCO_50mm") | ||
path_images = Path("/data/PCO_50mm") | ||
rmtree(path_images.parent / "PCO_50mm.mean", ignore_errors=True) | ||
|
||
params = Topology.create_default_params() | ||
params.images.path = str(path_images / "im*.png") | ||
params.images.str_subset = ":100" | ||
|
||
topology = Topology(params) | ||
executor = "exec_sequential" | ||
executor = "exec_async_sequential" | ||
# executor = "multi_exec_sync" | ||
executor = "multi_exec_async" | ||
|
||
profiler = Profiler() | ||
profiler.start() | ||
topology.compute(executor=executor, nb_max_workers=4) | ||
profiler.stop() | ||
|
||
print( | ||
profiler.output( | ||
renderer=ConsoleRenderer( | ||
unicode=True, | ||
color=True, | ||
show_all=False, | ||
# time="percent_of_total", | ||
# flat=True, # buggy with pyinstrument 4.6.2! | ||
) | ||
) | ||
) |
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,8 @@ | ||
# Commands | ||
|
||
Fluidimage provides few useful commands: | ||
|
||
- `fluidimage-monitor`: monitor Fluidimage computations. | ||
- `fluidimviewer`: visualize images. | ||
- `fluidpivviewer`: visualize PIV fields. | ||
- `fluidimage-mean`: compute the mean of images. |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/data/pivchallenge | ||
/data1/pivchallenge | ||
/fsnet/project/meige/2016/16FLUIDIMAGE/samples/pivchallenge | ||
/storage2/pivchallenge | ||
~/pivchallenge |
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,36 @@ | ||
from shutil import rmtree | ||
|
||
from path_images import get_path | ||
from pyinstrument import Profiler | ||
from pyinstrument.renderers import ConsoleRenderer | ||
|
||
from fluidimage.topologies.mean import Topology | ||
|
||
path_images = get_path("2005C") | ||
rmtree(path_images.parent / "Images.mean", ignore_errors=True) | ||
|
||
params = Topology.create_default_params() | ||
params.images.path = str(path_images / "c*.bmp") | ||
|
||
topology = Topology(params) | ||
executor = "exec_sequential" | ||
# executor = "exec_async_sequential" | ||
executor = "multi_exec_sync" | ||
# executor = "multi_exec_async" | ||
|
||
profiler = Profiler() | ||
profiler.start() | ||
topology.compute(executor=executor, nb_max_workers=2) | ||
profiler.stop() | ||
|
||
print( | ||
profiler.output( | ||
renderer=ConsoleRenderer( | ||
unicode=True, | ||
color=True, | ||
show_all=False, | ||
# time="percent_of_total", | ||
# flat=True, # buggy with pyinstrument 4.6.2! | ||
) | ||
) | ||
) |
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ overview | |
install | ||
tutorial | ||
examples | ||
commands | ||
build-from-source | ||
``` | ||
|
||
|
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
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.