Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
0fd0eee
refactored to use ezinput
brunomsaraiva Apr 1, 2025
542ebc5
notebook update
brunomsaraiva Apr 1, 2025
1bad4ff
re adding 3D changes
brunomsaraiva Apr 9, 2025
0aaf732
added 3.13 support
brunomsaraiva Apr 22, 2025
58f1fb5
version bump to current
brunomsaraiva Apr 22, 2025
c76d688
version bum to current
brunomsaraiva Apr 22, 2025
43a281f
Merge remote-tracking branch 'origin/main' into esrrf_update
brunomsaraiva Apr 22, 2025
203b052
updating to add 3.13 support
brunomsaraiva Apr 22, 2025
5dc62de
Merge branch 'ezinput_refactor' into updates
brunomsaraiva Apr 22, 2025
c33822f
notebooks update
brunomsaraiva Apr 22, 2025
588bd7d
version bump
brunomsaraiva Apr 22, 2025
73741ef
added new parameters
brunomsaraiva Apr 22, 2025
b5464d6
further updates but cl time projection is still bugged
brunomsaraiva Apr 24, 2025
a43a150
adding fixes to cpu run_types
brunomsaraiva Apr 24, 2025
a60ab43
time projection fixes, still some bugs in CL
brunomsaraiva Apr 29, 2025
fd27189
adding new interpolations
brunomsaraiva Apr 30, 2025
100b769
Rewriting 3D gradient calculations for simple central differences
antmsbrito May 5, 2025
6aadbe4
Merge branch 'updates' of https://github.com/HenriquesLab/NanoPyx int…
antmsbrito May 5, 2025
d84a9a4
new z interpolator
brunomsaraiva May 5, 2025
271934d
Fixing an offset in esrrf's CR interpolation
antmsbrito May 5, 2025
6551d53
readding interpolation
brunomsaraiva May 5, 2025
387935c
iterative changes
brunomsaraiva May 6, 2025
f6a4c2a
interpolation fixes
brunomsaraiva May 6, 2025
e53ba0d
reverting to catmull rom interpolation
brunomsaraiva May 6, 2025
5297d26
updated default benchmarks
brunomsaraiva May 6, 2025
3697073
Added esrrd3d to benchmark_all_le_methods
antmsbrito May 6, 2025
015c9c4
Deleted old file
antmsbrito May 6, 2025
742cdb5
Added a eSRRF3D workflow function
antmsbrito May 6, 2025
f3f5d4d
Added eSRR3D to init of core.transform
antmsbrito May 6, 2025
fc35a44
Started adding esrrf3d unit tests
antmsbrito May 6, 2025
d0ea755
Overloading compare_runs on esrrf3D
antmsbrito May 7, 2025
f071869
tests update
brunomsaraiva May 7, 2025
5406953
formatting
brunomsaraiva May 7, 2025
81838c6
added deprecation warning to easy_gui
brunomsaraiva May 8, 2025
42fc646
bugfixing
brunomsaraiva May 8, 2025
d346cfd
added eSRRF3D as high level import
brunomsaraiva May 12, 2025
5f3d14f
changed mac os to use nox
brunomsaraiva May 12, 2025
70ad99b
actions updates
brunomsaraiva May 12, 2025
eb8856c
name update
brunomsaraiva May 12, 2025
6026eb9
trigger updates
brunomsaraiva May 12, 2025
b0f762a
removed source testing
brunomsaraiva May 12, 2025
705c502
fix for nox wheel building on mac
brunomsaraiva May 12, 2025
bc6031f
fix for windows
brunomsaraiva May 12, 2025
44f42bb
new fix
brunomsaraiva May 12, 2025
a4709f3
anoda wane
brunomsaraiva May 12, 2025
af6ef7f
added exception handling
brunomsaraiva May 13, 2025
02611f0
added compile esrrf3d file
brunomsaraiva May 13, 2025
18f8e9c
fixing exceptions
brunomsaraiva May 13, 2025
c29af9d
updating actions for mac os wheel building
brunomsaraiva May 13, 2025
d9d12f5
updated cibuildwheel version
brunomsaraiva May 13, 2025
451136c
another try
brunomsaraiva May 13, 2025
ae17ab5
tentative fix
brunomsaraiva May 13, 2025
7d961c5
fixing handling of bigger radius than allowed
brunomsaraiva May 13, 2025
5b76dc5
actions update
brunomsaraiva May 13, 2025
938dd67
fixed issues with macropixels
brunomsaraiva May 14, 2025
d9a9503
fixed a miscalculation of tSS_z
brunomsaraiva May 15, 2025
ace21d0
reducing search space to only the size of the radius
brunomsaraiva May 15, 2025
d0f55b3
added 2D macropixel correction
brunomsaraiva May 15, 2025
f2e0931
added macro pixel correction to SRRF
brunomsaraiva May 16, 2025
17b96df
made nanopyx.methods srrf and esrrf return the output array and not a…
brunomsaraiva May 16, 2025
75eb29c
fixed a bug in macro pixel correction
brunomsaraiva May 19, 2025
f7a955f
notebook recipes update
brunomsaraiva May 19, 2025
5f3422b
updated recipes
brunomsaraiva May 19, 2025
44fa5a8
notebooks update
brunomsaraiva May 19, 2025
6b34882
disabling package level test for esrrf
brunomsaraiva May 19, 2025
db6da2d
reverting
brunomsaraiva May 19, 2025
4cff2ee
fixed margins
brunomsaraiva May 19, 2025
4dff62f
added type casting
brunomsaraiva May 19, 2025
3ea41fb
disabling macro pixel correction for test
brunomsaraiva May 19, 2025
09ee6e0
adding missing fix
brunomsaraiva May 19, 2025
69a0fbc
changing defaults
brunomsaraiva May 20, 2025
445cbab
type casting
brunomsaraiva May 20, 2025
8eb736f
updated compiled file
antmsbrito May 20, 2025
7f6c825
Merge branch 'updates' of https://github.com/HenriquesLab/NanoPyx int…
brunomsaraiva May 20, 2025
04593a3
adding cast to array
brunomsaraiva May 20, 2025
5fca0b8
Clamping numpy version <2
antmsbrito May 20, 2025
bd8e62b
fix for mpcorrector
May 20, 2025
3be0ec9
Adding a clamp to the search space to make sure the xyoffset doesn't …
antmsbrito May 20, 2025
5bbf74b
changing radius_z default value
brunomsaraiva May 20, 2025
7710675
removing 3.13 from actions
brunomsaraiva May 20, 2025
5513426
removing 3.13 changes
brunomsaraiva May 20, 2025
bd233f9
removing 3.13
brunomsaraiva May 20, 2025
2126a3d
Removing debugging comments
antmsbrito May 21, 2025
59e30e2
Removing unused imports
antmsbrito May 21, 2025
2ae4e6d
Updating docstrings
antmsbrito May 21, 2025
f81bc57
Removing all mentions to python 3.13
antmsbrito May 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
omit =
*/convolution.py
*/_transonic.py
*/_le_template_simple_.py
*/benchmark.py
2 changes: 1 addition & 1 deletion .github/workflows/build_test_deploy_all_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.BMS_DEPLOY_PYPI_TOKEN }}
packages-dir: ./final_dist/
packages-dir: ./final_dist/
56 changes: 56 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: (self-hosted) Build and Publish Wheels

on: workflow_dispatch

jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- os: macOS-ARM
runner: [self-hosted, macOS, ARM64]
archs: arm64
cibw_build: cp39-macosx_arm64 cp310-macosx_arm64 cp311-macosx_arm64 cp312-macosx_arm64
- os: manylinux
runner: [self-hosted, Ubuntu, Native]
archs: auto
cibw_build: cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64
- os: windows
runner: [self-hosted, Windows]
archs: auto
cibw_build: cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: 3.9 # Works as bootstrap for cibuildwheel

- name: Install cibuildwheel and nox
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel==2.16.2
python -m pip install nox

- name: Build sdist (only on Windows)
if: matrix.os == 'windows'
run: python -m nox --sessions build_sdist

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_ARCHS: ${{ matrix.archs }}

- name: Test wheels (only on macOS ARM64)
if: matrix.os == 'macOS-ARM'
run: python -m nox --sessions test_wheel

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*
2 changes: 1 addition & 1 deletion .github/workflows/buildtest_mac_arm_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
env:
CIBW_BUILD: cp39-macosx_arm64 cp310-macosx_arm64 cp311-macosx_arm64 cp312-macosx_arm64
CIBW_BUILD: cp39-macosx_arm64 cp310-macosx_arm64 cp311-macosx_arm64 cp312-macosx_arm64 cp313-macosx_arm64
CIBW_ARCHS: arm64

- name: Test wheels
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildtest_manylinux_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64
CIBW_BUILD: cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildtest_windows_x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64
CIBW_BUILD: cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64 cp313-win_amd64
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value
Expand Down
29 changes: 16 additions & 13 deletions notebooks/ChannelRegistration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "313252b6",
"id": "21d1e58b",
"metadata": {},
"source": [
"# NanoPyx \"Codeless\" Jupyter Notebook\n",
Expand All @@ -22,7 +22,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a7fd8e2a",
"id": "b3c2a12b",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -54,7 +54,10 @@
"from IPython.display import display, clear_output\n",
"from matplotlib import pyplot as plt\n",
"\n",
"from nanopyx.core.utils.easy_gui import EasyGui\n",
"try:\n",
" from ezinput import EZInput as EasyGui\n",
"except ImportError:\n",
" from nanopyx.core.utils.easy_gui import EasyGui\n",
"from nanopyx.core.utils.find_files import find_files\n",
"from nanopyx.data.download import ExampleDataManager\n",
"\n",
Expand All @@ -77,7 +80,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "321413ab",
"id": "a5c09b00",
"metadata": {
"cellView": "form"
},
Expand All @@ -91,7 +94,7 @@
"\n",
"def on_button_select_own(b):\n",
" clear_output()\n",
" gui_data.add_label(\"Select data to use:\")\n",
" gui_data.add_label(value=\"Select data to use:\")\n",
" gui_data.add_file_upload(\"upload\")\n",
" gui_data.add_dropdown(\"cmaps\", description=\"Colormap:\",\n",
" options=sorted(list(mpl.colormaps)),\n",
Expand All @@ -102,7 +105,7 @@
"\n",
"def on_button_select_example(b):\n",
" clear_output()\n",
" gui_data.add_label(\"Select data to use:\")\n",
" gui_data.add_label(value=\"Select data to use:\")\n",
" gui_data.add_dropdown(\"data_source\", options=image_files,\n",
" value=\"Example dataset: \"+example_datasets[4], remember_value=True)\n",
" gui_data.add_dropdown(\"cmaps\", description=\"Colormap:\",\n",
Expand Down Expand Up @@ -161,7 +164,7 @@
},
{
"cell_type": "markdown",
"id": "a84604a2",
"id": "535b3d44",
"metadata": {},
"source": [
"# Channel Registration Parameters: \n",
Expand All @@ -179,7 +182,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7a99907f",
"id": "5c4e28f4",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -229,7 +232,7 @@
" gui_reg._main_display.children = gui_reg._main_display.children + (stackview.slice(dataset_registered, colormap=gui_reg[\"cmaps\"].value, continuous_update=True),)\n",
"\n",
"\n",
"gui_reg.add_label(\"Channel Registration parameters:\")\n",
"gui_reg.add_label(value=\"Channel Registration parameters:\")\n",
"gui_reg.add_int_slider(\"ref\", description=\"Reference channel\", min=0, max=dataset_original.shape[0]-1, value=0)\n",
"gui_reg.add_int_slider(\"max\", description=\"Max expected drift\", min=0, max=1000, value=10)\n",
"gui_reg.add_int_slider(\"blocks\", description=\"Blocks per axis\", min=1, max=10, value=5)\n",
Expand All @@ -247,7 +250,7 @@
},
{
"cell_type": "markdown",
"id": "eefc7618",
"id": "ae281b8a",
"metadata": {},
"source": [
"## Use the following cell only if you have a previously calculated translation mask\n",
Expand All @@ -257,7 +260,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "55cdcf4f",
"id": "c0e91c8c",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -312,9 +315,9 @@
" gui_reg_apply[\"Register Image\"].description = \"Align\"\n",
" gui_reg_apply._main_display.children = gui_reg_apply._main_display.children + (stackview.slice(aligned_image, colormap=gui_reg_apply[\"cmaps\"].value, continuous_update=True),)\n",
"\n",
"gui_reg_apply.add_label(\"Load translation mask:\")\n",
"gui_reg_apply.add_label(value=\"Load translation mask:\")\n",
"gui_reg_apply.add_file_upload(\"upload\")\n",
"gui_reg_apply.add_label(\"Load image to register:\")\n",
"gui_reg_apply.add_label(value=\"Load image to register:\")\n",
"gui_reg_apply.add_file_upload(\"upload image\")\n",
"gui_reg_apply.add_dropdown(\"cmaps\", description=\"Colormap:\",\n",
" options=sorted(list(mpl.colormaps)),\n",
Expand Down
58 changes: 22 additions & 36 deletions notebooks/DriftCorrection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "065b6c17",
"id": "4a8ab58f",
"metadata": {},
"source": [
"# NanoPyx \"Codeless\" Jupyter Notebook\n",
Expand All @@ -22,7 +22,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7f4d7a86",
"id": "80886110",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -54,7 +54,10 @@
"from IPython.display import display, clear_output\n",
"from matplotlib import pyplot as plt\n",
"\n",
"from nanopyx.core.utils.easy_gui import EasyGui\n",
"try:\n",
" from ezinput import EZInput as EasyGui\n",
"except ImportError:\n",
" from nanopyx.core.utils.easy_gui import EasyGui\n",
"from nanopyx.core.utils.find_files import find_files\n",
"from nanopyx.data.download import ExampleDataManager\n",
"\n",
Expand All @@ -77,7 +80,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7e22c6f0",
"id": "7d8288ff",
"metadata": {
"cellView": "form"
},
Expand All @@ -91,7 +94,7 @@
"\n",
"def on_button_select_own(b):\n",
" clear_output()\n",
" gui_data.add_label(\"Select data to use:\")\n",
" gui_data.add_label(value=\"Select data to use:\")\n",
" gui_data.add_file_upload(\"upload\")\n",
" gui_data.add_dropdown(\"cmaps\", description=\"Colormap:\",\n",
" options=sorted(list(mpl.colormaps)),\n",
Expand All @@ -102,7 +105,7 @@
"\n",
"def on_button_select_example(b):\n",
" clear_output()\n",
" gui_data.add_label(\"Select data to use:\")\n",
" gui_data.add_label(value=\"Select data to use:\")\n",
" gui_data.add_dropdown(\"data_source\", options=image_files,\n",
" value=\"Example dataset: \"+example_datasets[4], remember_value=True)\n",
" gui_data.add_dropdown(\"cmaps\", description=\"Colormap:\",\n",
Expand Down Expand Up @@ -161,7 +164,7 @@
},
{
"cell_type": "markdown",
"id": "9b2595dc",
"id": "c800a0e9",
"metadata": {},
"source": [
"# Drift Correction Parameters: \n",
Expand All @@ -178,7 +181,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4aeea0dc",
"id": "e2d6671a",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -254,30 +257,13 @@
" )\n",
"\n",
"\n",
"gui_drift.add_label(\"Drift Correction parameters:\")\n",
"gui_drift.add_dropdown(\n",
" \"ref\",\n",
" description=\"Reference frame\",\n",
" options=[\"First frame\", \"Previous frame\"],\n",
" value=\"First frame\",\n",
")\n",
"gui_drift.add_int_slider(\n",
" \"max\", description=\"Max expected drift\", min=0, max=1000, value=10\n",
")\n",
"gui_drift.add_int_slider(\n",
" \"time_averaging\",\n",
" description=\"Time averaging\",\n",
" min=1,\n",
" max=dataset_original.shape[0],\n",
" value=1,\n",
")\n",
"gui_drift.add_dropdown(\n",
" \"cmaps\",\n",
" description=\"Colormap:\",\n",
" options=sorted(list(mpl.colormaps)),\n",
" value=\"viridis\",\n",
" remember_value=True,\n",
")\n",
"gui_drift.add_label(value=\"Drift Correction parameters:\")\n",
"gui_drift.add_dropdown(\"ref\", description=\"Reference frame\", options=[\"First frame\", \"Previous frame\"], value=\"First frame\")\n",
"gui_drift.add_int_slider(\"max\", description=\"Max expected drift\", min=0, max=1000, value=10)\n",
"gui_drift.add_int_slider(\"time_averaging\", description=\"Time averaging\", min=1, max=dataset_original.shape[0], value=1)\n",
"gui_drift.add_dropdown(\"cmaps\", description=\"Colormap:\",\n",
" options=sorted(list(mpl.colormaps)),\n",
" value=\"viridis\", remember_value=True)\n",
"gui_drift.add_checkbox(\"save\", description=\"Save Output\", value=True)\n",
"gui_drift.add_button(\"align\", description=\"Align\")\n",
"gui_drift[\"align\"].on_click(on_button_align)\n",
Expand All @@ -288,7 +274,7 @@
},
{
"cell_type": "markdown",
"id": "5678e56d",
"id": "60fc5a28",
"metadata": {},
"source": [
"## Use the following cell only if you have a previously calculated drift table\n",
Expand All @@ -298,7 +284,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3bdca2b8",
"id": "45dc3ea1",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -355,9 +341,9 @@
" gui_drift_apply[\"Align image\"].description = \"Align\"\n",
" gui_drift_apply._main_display.children = gui_drift_apply._main_display.children + (stackview.slice(aligned_image, colormap=gui_drift_apply[\"cmaps\"].value, continuous_update=True),)\n",
"\n",
"gui_drift_apply.add_label(\"Load drift table:\")\n",
"gui_drift_apply.add_label(value=\"Load drift table:\")\n",
"gui_drift_apply.add_file_upload(\"upload\")\n",
"gui_drift_apply.add_label(\"Load image to align:\")\n",
"gui_drift_apply.add_label(value=\"Load image to align:\")\n",
"gui_drift_apply.add_file_upload(\"upload image\")\n",
"gui_drift_apply.add_dropdown(\"cmaps\", description=\"Colormap:\",\n",
" options=sorted(list(mpl.colormaps)),\n",
Expand Down
Loading