Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
ae1c294
Add pixi files
celiafish Oct 23, 2025
383f2c1
Merge branch 'NSLS2:master' into master
celiafish Nov 5, 2025
c0b970c
update pixi files
celiafish Nov 5, 2025
27cdbe3
Update the description
celiafish Nov 6, 2025
585ba70
remove author info
celiafish Nov 6, 2025
54c7173
Update pixi files
celiafish Nov 7, 2025
481ad8a
Fix pdb to allow spaces
psavery Oct 6, 2025
7076179
Load all extracted XRF elements as arrays
psavery Oct 7, 2025
b7871ad
Change C++ standard to C++20
psavery Oct 8, 2025
27481fc
Added enable_if and visible_if to InterfaceBuilder
psavery Oct 7, 2025
e2d31f9
Add "save file" option to interface builder
psavery Oct 8, 2025
39f58b7
Remove conversion to Fortran warning
psavery Oct 8, 2025
6250113
Fix DFT reconstruction methods
psavery Oct 14, 2025
9011994
Prevent possible segmentation fault
psavery Oct 15, 2025
d34fda7
Add decorator to apply transform to all arrays
psavery Oct 16, 2025
6bb2a67
Add context to delete another signal
psavery Oct 17, 2025
1868eb1
Remember old values for combo boxes and paths
psavery Oct 17, 2025
c8390d9
Add PyStackReg image alignment operator
psavery Oct 6, 2025
c3d06b4
Add new "Workflows" menu containing PyXRF workflow
psavery Oct 21, 2025
dbd3104
Only transpose data exchange keys if present
psavery Oct 21, 2025
a5d1320
Ensure output directory exists
psavery Oct 21, 2025
50db866
Simplify functions for finding child widgets
psavery Oct 21, 2025
a576976
Revert back to C++17
psavery Oct 23, 2025
7a2bf34
Add "fix_pdb" to installed Python modules
psavery Oct 23, 2025
39ad4c0
Implement necessary fixes for importing pyxrf data
psavery Oct 28, 2025
5281f96
Forward stdout/stderr from PyXRF GUI
psavery Oct 28, 2025
b470309
Convert `np.lib.pad` to `np.pad`
psavery Oct 31, 2025
ef9b888
Add test for PyXRF workflow
psavery Nov 3, 2025
8ed962c
Rename "operator.py" to avoid name conflict
psavery Nov 3, 2025
86b1fe9
Avoid name conflict in ctest error upload
psavery Nov 3, 2025
0c3a739
Fix directory path issues
psavery Nov 3, 2025
c513add
Raise an exception if PyXRF import fails in tests
psavery Nov 3, 2025
86680aa
Add hxntools to the runtime requirements
psavery Nov 3, 2025
1001c70
Use QJsonObjects properly
psavery Nov 7, 2025
c52d356
Add option to rotate XRF datasets
psavery Nov 7, 2025
ea6c0c0
Update np.int to np.int64
psavery Nov 7, 2025
8d1d32c
Fix PyXRF workflow test with latest updates
psavery Nov 7, 2025
c5606ad
Automatically apply pad to each array
psavery Nov 7, 2025
15cd0e1
Add `@apply_to_each_array` to several operators
psavery Nov 7, 2025
0bbf138
Move pad_array and depad_array to utils
psavery Nov 7, 2025
9a45d7a
Add multi-array support to auto tilt axis shift
psavery Nov 7, 2025
3edd732
Update Tomviz build instructions
psavery Nov 7, 2025
fea74da
Add test for new PyStackReg operator
psavery Nov 7, 2025
a436668
Make "Delete Slices" a regular Python operator
psavery Nov 10, 2025
9fcdc1e
Apply circle mask filter to all arrays
psavery Nov 10, 2025
f78285b
Allow user input for num slices in shift alignment
psavery Nov 10, 2025
87f32ab
Fix a crashing issue that occurred rarely
psavery Nov 10, 2025
7b2beba
Make constrainted DFT recon work with multi-arrays
psavery Nov 10, 2025
de77b03
Save EMD file so tvsm state files load properly
psavery Nov 10, 2025
351df51
Fix Recon_DFT to work with multiple arrays
psavery Nov 10, 2025
2399562
Add loguru for printing stack traces on crash
psavery Nov 10, 2025
47175f4
Set sys.executable to a valid Python executable
psavery Nov 10, 2025
ba21876
Update tomviz acquisition to have unique import
psavery Nov 10, 2025
6c44727
Fix Python executable on root import
psavery Nov 10, 2025
a3bba69
Generalize Python version when fixing import paths
psavery Nov 10, 2025
5f3e0ab
Don't modify test PYTHONPATH in conda environment
psavery Nov 11, 2025
636afc0
Go back to previous dialogs on errors
psavery Nov 11, 2025
362ac12
Do not find Python twice
psavery Nov 11, 2025
25031fd
Update test dataset shas
psavery Nov 12, 2025
f4f9d64
Use point rather than position for getting voxel
psavery Nov 12, 2025
34c6b4b
Force full messages to be shown
psavery Nov 12, 2025
57d1598
Allow apply_to_all_arrays in external mode
psavery Nov 12, 2025
58ba989
A couple more fixes for external executors
psavery Nov 12, 2025
6686119
Ensure Tomviz functions show up on stack traces
psavery Nov 13, 2025
69150d3
Don't allow invalid slices to be deleted
psavery Nov 13, 2025
bc3d99a
Remove docs task
celiafish Nov 13, 2025
f6a0cdf
Replace coverage and flake8 with ruff
celiafish Nov 13, 2025
d30d3a8
Update pixi files for dev env
celiafish Nov 13, 2025
6362257
Merge pull request #1 from celiafish/master
padraic-shafer Nov 13, 2025
e9e999b
Produce an error if angle selected more than once
psavery Nov 13, 2025
3a5c818
Add voxel sizes to Data Properties Panel
psavery Nov 13, 2025
ddb2205
Fix translation alignment for different pixel size
psavery Nov 13, 2025
9460485
A couple minor improvements to auto path loading
psavery Nov 14, 2025
46ea7b1
Read pixel sizes in PyXRF workflow
psavery Nov 14, 2025
a0c277b
Update test file output name
psavery Nov 14, 2025
6c8d81c
Load log file from settings if empty
psavery Nov 14, 2025
2d4010e
Allow saving and loading shift alignments
psavery Nov 14, 2025
2ac3122
Allow all 3x3 transforms with different pixel size
psavery Nov 14, 2025
a938127
Create initial Ptycho workflow
psavery Nov 12, 2025
26ad7a9
Add test for Ptycho workflow
psavery Nov 12, 2025
2dcf21f
Fix environment for running ptycho GUI
psavery Nov 13, 2025
6f15c42
Rename a few array/dataset names in ptychography
psavery Nov 13, 2025
0a9aeba
Write out stacked_ptycho_info.txt file as well
psavery Nov 13, 2025
9329f38
Add probe phase to ptycho output
psavery Nov 14, 2025
2a92cc1
Read in pixel sizes from ptycho files
psavery Nov 14, 2025
17de5f2
Update acquistion requirement for security
celiafish Nov 14, 2025
6914799
Merge branch 'NSLS2:master' into master
celiafish Nov 14, 2025
c4903ac
Upgrade requests for acquisition requirement
celiafish Nov 14, 2025
1231f3f
Merge pull request #9 from celiafish/master
padraic-shafer Nov 14, 2025
c0853a5
Merge pull request #8 from psavery/pyxrf-workflow
celiafish Nov 18, 2025
5cff7d3
Reformat Ptycho dialog SID selection mechanisms
psavery Nov 19, 2025
6688b40
Update with changes needed for new dataset
psavery Nov 19, 2025
79e8d46
Sort by SID rather than by angle
psavery Nov 19, 2025
7dfd64e
Eliminate old unused function
psavery Nov 20, 2025
da54b42
Use 0th order result if multiple orders present
psavery Nov 20, 2025
1022c70
Merge pull request #10 from psavery/ptycho-workflow
celiafish Nov 20, 2025
e8e775c
Allow PyXRF to run in its own separate environment
psavery Nov 18, 2025
ed681fc
Fix issue where Tomviz freezes when exiting
psavery Nov 19, 2025
c5ea51a
Add ability to remake CSV file in PyXRF workflow
psavery Nov 20, 2025
c77a8e0
Fix compile warning
psavery Nov 20, 2025
12170c5
Remove unused class
psavery Nov 20, 2025
af6a2a7
Add SID filtering to XRF process dialog
psavery Nov 20, 2025
b110ed6
Get modules to re-use their own views
psavery Nov 20, 2025
b648413
Add some cleanup to remove invalid data sources
psavery Nov 20, 2025
6803e11
Apply cross correlation to all arrays
psavery Nov 20, 2025
377b833
Allow apply_to_each_array to be on methods too
psavery Nov 20, 2025
d860392
Add hatchling to pyxrf test dependencies
psavery Nov 20, 2025
fb14ec9
Add setuptools for python3.13
psavery Nov 20, 2025
12337bb
Install setuptools for Python3.13
psavery Nov 20, 2025
5e58f85
Allow xcorr to be saved/loaded from files
psavery Nov 20, 2025
2716031
Wait indefinitely for processes to finish
psavery Nov 20, 2025
b06b56c
Run QProcesses in main thread
psavery Nov 21, 2025
8948aad
Fix log extensions for examples
psavery Nov 21, 2025
b0b6964
Fix PyXRF workflow test
psavery Nov 21, 2025
d591389
Fix Python console loading
psavery Nov 21, 2025
b9b9fe6
Get "apply_to_each_array" to work for recon ops
psavery Nov 21, 2025
3233fc1
Import correct Dataset
psavery Nov 21, 2025
20ef19e
Avoid seg fault for invalid arrays
psavery Nov 21, 2025
ca603c0
Add multi-array Python test
psavery Nov 21, 2025
9449883
Warn on duplicate angles, but allow proceeding
psavery Nov 21, 2025
d1de85d
Make constraint-based DFT deterministic
psavery Nov 21, 2025
a0bbef7
Add several more tests for new features
psavery Nov 21, 2025
803c863
Add dev environment to pyxrf-utils pixi.toml
psavery Nov 21, 2025
194d9ca
Add lint task to pyxrf-utils dev environment
psavery Nov 21, 2025
d98275b
Update Tomviz pixi dependencies
psavery Nov 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
15 changes: 12 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
test:
name: ${{ matrix.config.name }} (Python ${{ matrix.python-version}})
name: ${{ matrix.config.name }} (Python ${{ matrix.python-version }})
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -65,15 +65,24 @@ jobs:
conda install -y --override-channels -c conda-forge --file tomviz/tests/python/requirements-dev.txt
pip install --no-build-isolation --no-deps -U tomviz/tomviz/python
pip install --no-build-isolation --no-deps -U tomviz/acquisition
# These do not have to be in the same environment as Tomviz, but the dependencies
# are so far compatible and we'll just let it go for the tests.
conda install -y --override-channels -c conda-forge --file tomviz/.github/workflows/pyxrf_requirements.txt
pip install --no-build-isolation --no-deps -U tomviz/tomviz/python/tomviz/pyxrf/pyxrf-utils

- name: Run Tests
env:
# Make sure the Qt tests run offscreen
QT_QPA_PLATFORM: offscreen
TOMVIZ_REQUIRE_PYXRF: true
run: |
cd tomviz-build
TOMVIZ_TEST_PYTHON_EXECUTABLE=$(which python3) ctest --output-on-failure
export TOMVIZ_TEST_PYTHON_EXECUTABLE=$(which python3)
ctest --output-on-failure

- name: Upload CTest Log (On Failure Only)
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: TomvizCTestLog.log
name: TomvizCTestLog_${{ matrix.config.name }}_Py${{ matrix.python-version }}.log
path: tomviz-build/Testing/Temporary/LastTest.log
2 changes: 2 additions & 0 deletions .github/workflows/build_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ vtk
libxml2-devel=2.14*
# This is needed for building the tests
gtest
# This is needed for installing stuff on Python3.13
setuptools
9 changes: 9 additions & 0 deletions .github/workflows/pyxrf_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# These are PyXRF workflow dependencies
hxntools
pyxrf
xrf-tomo
xraylib
scikit-beam
tomopy
# These are required for installing the pyxrf-utils environment
hatchling
6 changes: 0 additions & 6 deletions .github/workflows/runtime_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,4 @@ jsonpointer
pyfftw
pygments
pystackreg
# These are PyXRF workflow dependencies
h5py
pyxrf
xrf-tomo
xraylib
scikit-beam
tomopy
25 changes: 5 additions & 20 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Building Tomviz
===============

Building Tomviz is an advanced process that requires compiling ParaView,
as well as ensuring all necessary dependencies are in place. Most users
Building Tomviz can be an advanced process that requires
ensuring that all necessary dependencies are in place. Most users
ought to install Tomviz from the conda-forge packages rather than
building it. These instructions are primarily for developers who wish
to make contributions.
Expand All @@ -16,14 +16,10 @@ conda create -n tomviz -y
conda activate tomviz
```

First, we need to ensure that ParaView and tomviz are cloned into the
current repository. Run the following bash code to do so:
First, we need to ensure that tomviz is cloned into the current repository.
Run the following bash code to do so:

```bash
if ! [ -e "paraview" ]; then
git clone -b v6.0.1 --recursive https://gitlab.kitware.com/paraview/paraview
fi

if ! [ -e "tomviz" ]; then
git clone --recursive https://github.com/NSLS2/tomviz
fi
Expand All @@ -36,12 +32,6 @@ conda-forge. Thus we will use those lists for installation.
conda install -y --override-channels -c conda-forge --file tomviz/.github/workflows/build_requirements.txt
```

Next, build ParaView. This may take some time.

```bash
bash tomviz/.github/workflows/scripts/build_paraview.sh
```

Now, build Tomviz.

```bash
Expand All @@ -65,19 +55,14 @@ Tomviz may then be ran as follows:
All of the build instructions above put into a single script are as follows:

```bash
if ! [ -e "paraview" ]; then
git clone -b v6.0.1 --recursive https://gitlab.kitware.com/paraview/paraview
fi

if ! [ -e "tomviz" ]; then
git clone --recursive https://github.com/NSLS2/tomviz
fi

# Install build requirements
conda install -y --override-channels -c conda-forge --file tomviz/.github/workflows/build_requirements.txt

# Build ParaView and Tomviz
bash tomviz/.github/workflows/scripts/build_paraview.sh
# Build Tomviz
bash tomviz/.github/workflows/scripts/build_tomviz.sh

# Install runtime dependencies
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ file(RELATIVE_PATH
set(CMAKE_MODULE_PATH "${tomviz_SOURCE_DIR}/cmake")

# Request C++11 standard, using new CMake variables.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS False)

Expand Down Expand Up @@ -146,7 +146,7 @@ endif()

find_package(ITK 4.9)

set(PYBIND11_CPP_STANDARD "-std=c++11" CACHE STRING "")
set(PYBIND11_CPP_STANDARD "-std=c++17" CACHE STRING "")
add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/pybind11)

option(tomviz_ENABLE_LOOKING_GLASS "Enable the looking glass plugin" OFF)
Expand Down
9 changes: 5 additions & 4 deletions acquisition/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
pytest==3.0.6
requests==2.20.0
Pillow==8.3.2
pytest>=8.3
requests>=2.32.4
Pillow==10.3.0
# Need this for testing so we can stop there server, change when the required
# get into a release.
https://github.com/bottlepy/bottle/archive/41ed6965.zip
# https://github.com/bottlepy/bottle/archive/41ed6965.zip
bottle>=0.13.2
mock==2.0.0
diskcache==3.0.1
-e git+https://[email protected]/cjh1/pydm3reader.git@filelike#egg=dm3_lib
2 changes: 1 addition & 1 deletion acquisition/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
entry_points={
'console_scripts': [
'tomviz-acquisition = tomviz.acquisition.cli:main',
'tomviz-acquisition = tomviz_acquisition.acquisition.cli:main',
'tomviz-tiltseries-writer = tests.mock.tiltseries.writer:main'
]
}
Expand Down
2 changes: 1 addition & 1 deletion acquisition/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from threading import Thread
from bottle import default_app, WSGIRefServer

from tomviz.acquisition import server
from tomviz_acquisition.acquisition import server
from .mock.tiltseries import TIFFWriter, DM3Writer


Expand Down
6 changes: 3 additions & 3 deletions acquisition/tests/fei_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
import sys
import os

from tomviz.jsonrpc import jsonrpc_message
from tomviz_acquisition.jsonrpc import jsonrpc_message

# Add mock modules to path
mock_dir = os.path.join(os.path.dirname(__file__), '..', 'tomviz',
mock_dir = os.path.join(os.path.dirname(__file__), '..', 'tomviz_acquisition',
'acquisition', 'vendors', 'fei', 'mock')
sys.path.append(mock_dir)


@pytest.fixture(scope="module")
def fei_acquisition_server(acquisition_server):
acquisition_server.setup('tomviz.acquisition.vendors.fei.FeiAdapter')
acquisition_server.setup('tomviz_acquisition.acquisition.vendors.fei.FeiAdapter')
yield acquisition_server


Expand Down
2 changes: 1 addition & 1 deletion acquisition/tests/fixtures/source1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tempfile
import os
from tomviz.acquisition import AbstractSource
from tomviz_acquisition.acquisition import AbstractSource


class ApiAdapter1(AbstractSource):
Expand Down
2 changes: 1 addition & 1 deletion acquisition/tests/fixtures/source2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tempfile
import os
from tomviz.acquisition import AbstractSource
from tomviz_acquisition.acquisition import AbstractSource


class ApiAdapter2(AbstractSource):
Expand Down
2 changes: 1 addition & 1 deletion acquisition/tests/jsonrpc_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from tomviz.jsonrpc import JsonRpcHandler, jsonrpc_message
from tomviz_acquisition.jsonrpc import JsonRpcHandler, jsonrpc_message


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion acquisition/tests/mock/mock_api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import time
from PIL import Image
from . import test_image, test_black_image, angle_to_page
from tomviz.acquisition.utility import tobytes
from tomviz_acquisition.acquisition.utility import tobytes

img = Image.open(test_image())
black = test_black_image().read()
Expand Down
4 changes: 2 additions & 2 deletions acquisition/tests/mock/source.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tomviz.acquisition import AbstractSource
from tomviz_acquisition.acquisition import AbstractSource
from . import mock_api
from tomviz.acquisition import describe
from tomviz_acquisition.acquisition import describe


class ApiAdapter(AbstractSource):
Expand Down
6 changes: 3 additions & 3 deletions acquisition/tests/passive_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from PIL import Image
import dm3_lib as dm3

from tomviz.jsonrpc import jsonrpc_message
from tomviz_acquisition.jsonrpc import jsonrpc_message
from .mock import test_image, test_dm3_tilt_series
from tomviz.acquisition.utility import tobytes
from tomviz_acquisition.acquisition.utility import tobytes

# Add mock modules to path
mock_dir = os.path.join(os.path.dirname(__file__), '..', 'tomviz',
Expand All @@ -19,7 +19,7 @@

@pytest.fixture(scope="module")
def passive_acquisition_server(acquisition_server):
source = 'tomviz.acquisition.vendors.passive.PassiveWatchSource'
source = 'tomviz_acquisition.acquisition.vendors.passive.PassiveWatchSource'
acquisition_server.setup(source)
yield acquisition_server

Expand Down
2 changes: 1 addition & 1 deletion acquisition/tests/server_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
import inspect

from tomviz.jsonrpc import jsonrpc_message
from tomviz_acquisition.jsonrpc import jsonrpc_message
from tests.mock.source import ApiAdapter


Expand Down
1 change: 0 additions & 1 deletion acquisition/tomviz/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import argparse
from tomviz.utility import logging
from tomviz_acquisition.utility import logging


def main():
Expand All @@ -23,7 +23,7 @@ def main():
if args.redirect:
logging.setup_std_loggers()

from tomviz.acquisition import server
from tomviz_acquisition.acquisition import server

logging.setup_loggers(args.debug, args.redirect)
server_params = vars(args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
import bottle
from bottle import run, route, request, HTTPResponse, Bottle

import tomviz
from tomviz import jsonrpc
from tomviz.utility import inject
from tomviz.acquisition import AbstractSource
from tomviz_acquisition import jsonrpc
from tomviz_acquisition.utility import inject
from tomviz_acquisition.acquisition import AbstractSource
import shutil

# For python 3
Expand All @@ -26,7 +25,7 @@
PORT = 8080
LOG_BUF_SIZE = 65536

logger = logging.getLogger('tomviz')
logger = logging.getLogger('tomviz_acquisition')
app = Bottle()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import os
import dm3_lib as dm3

from tomviz.acquisition import AbstractSource
from tomviz.acquisition import describe
from tomviz.acquisition.utility import tobytes
from tomviz_acquisition.acquisition import AbstractSource
from tomviz_acquisition.acquisition import describe
from tomviz_acquisition.acquisition.utility import tobytes
from .filesystem import Monitor

try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def setup_std_loggers():


def setup_loggers(debug=False, redirect=False):
logger = logging.getLogger('tomviz')
logger = logging.getLogger('tomviz_acquisition')
logger.setLevel(logging.DEBUG if debug else logging.INFO)

file_handler = logging.handlers.RotatingFileHandler(
Expand Down
Loading
Loading