Skip to content

Commit 54492fa

Browse files
authored
Merge pull request #272 from cabouman/prerelease
merge for release 0.3.1
2 parents ef555f7 + 8f5c57a commit 54492fa

23 files changed

+82
-43
lines changed

clean.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
echo "Running clean.sh"
4+
/bin/rm -v -r dist 2> /dev/null
5+
/bin/rm -v -r build 2> /dev/null
6+
/bin/rm -v -r svmbir.egg-info 2> /dev/null
7+
/bin/rm -v svmbir/*.so 2> /dev/null
8+
/bin/rm -v svmbir/interface_cy_c.c 2> /dev/null

demo.zip

-4 Bytes
Binary file not shown.

demo/demo_3D_shepp_logan.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818
tilt_angle = np.pi/2 # Tilt range of +-90deg
1919

2020
# Reconstruction parameters
21-
snr_db = 30.0
22-
sharpness = 0.0
21+
snr_db = 40.0
22+
sharpness = 1.0
2323
T = 0.1
24-
p = 1.2
2524

2625
# Display parameters
2726
vmin = 1.0
@@ -40,7 +39,7 @@
4039
(num_views, num_slices, num_channels) = sino.shape
4140

4241
# Perform fixed resolution MBIR reconstruction
43-
recon = svmbir.recon(sino, angles, T=T, p=p, sharpness=sharpness, snr_db=snr_db)
42+
recon = svmbir.recon(sino, angles, sharpness=sharpness, snr_db=snr_db, T=T)
4443

4544
# Compute Normalized Root Mean Squared Error
4645
nrmse = svmbir.phantom.nrmse(recon, phantom)

dev_scripts/build_dist.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Builds the sdist and wheels for python 3.8, 3.9, 3.10
3+
# Builds the sdist and wheels for python 3.7-3.10
44
#
55
# RUN AS: source build_dist.sh
66
# NOT AS: ./build_dist.sh
@@ -9,15 +9,17 @@
99
# NOTES:
1010
# * Principally for macOS wheels. For linux, build using 'manylinux' from docker image
1111
#
12-
# * starting in v0.3.0, numpy dependency is pinned to 1.22.*, which supports Python 3.8-3.10
12+
# * Building with numpy==1.21.6, wheels appear compatible with numpy 1.21-1.23.5 at least
13+
# The install requirement numpy>=1.21 then allows support of python 3.7-3.10
1314
#
1415
# * macOS/x86_64: Run build on macOS 10.14 for binaries to be compatibile with macOS>=10.14.
1516
# Wheels are delocated to fix a library incompatibility across macOS>=10.14.
1617
#
17-
# * macOS/arm64 (M1,M2): Limited to python >= 3.8. 'delocation' section will be skipped.
18+
# * macOS/arm64 (M1,M2): Limited to python >= 3.8.
19+
# Wheels are delocated to include any linked libraries (OpenMP).
1820
#
1921

20-
python_versions=("3.8" "3.9" "3.10")
22+
python_versions=("3.7" "3.8" "3.9" "3.10")
2123
CC=gcc
2224

2325
# check for a valid compiler
@@ -48,6 +50,8 @@ for pyv in ${python_versions[@]}; do
4850
echo "**** Create environment ${pyv} *****"
4951
conda create --name sv${pyv} python=$pyv --yes
5052
conda activate sv${pyv}
53+
# see note above about numpy version
54+
pip install numpy==1.21.6
5155
pip install -r requirements.txt
5256
pip install setuptools
5357

@@ -71,8 +75,8 @@ pip install -r requirements.txt
7175
pip install setuptools
7276
python setup.py sdist
7377

74-
# section for pre-M1 macs only
75-
if [ $(uname -s) = "Darwin" ] && [ $(uname -m) = "x86_64" ]; then
78+
# Delocate to add libgomp.dylib to wheel (macOS only)
79+
if [ $(uname -s) = "Darwin" ]; then
7680
pip install delocate
7781
echo "******* Delocating wheels *******"
7882
cd dist

dev_scripts/manylinux.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ function repair_wheel {
3030

3131
# Compile wheels
3232
#for PYBIN in /opt/python/*/bin; do
33-
for PYBIN in /opt/python/{cp38,cp39,cp310,pp38,pp39}*/bin; do
33+
for PYBIN in /opt/python/{cp37,cp38,cp39,cp310,pp37,pp38,pp39}*/bin; do
3434
echo "***"
3535
echo "*** building for $PYBIN"
3636
#"${PYBIN}/pip" install -r /io/dev_scripts/dev-requirements.txt
37+
"${PYBIN}/pip" install numpy==1.21.6 # build with 1.21.6 seems compatible w/ numpy 1.21-1.23
3738
CC=gcc "${PYBIN}/pip" wheel /io/ --no-deps -w wheelhouse/
3839
#CC=gcc "${PYBIN}/python" setup.py bdist_wheel
3940
done

dev_scripts/test_pypi.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#
99
# Set these accordingly:
1010

11-
python_versions=("3.8" "3.9" "3.10")
12-
svmbir_version=0.3.0
11+
python_versions=("3.7" "3.8" "3.9" "3.10")
12+
svmbir_version=0.3.1
1313

1414
echo "*********************************************************"
1515
echo "**** Test install "

docs/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.png filter=lfs diff=lfs merge=lfs -text

docs/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Features
1212

1313
System Requirements
1414
-------------------
15-
* Python 3.8-3.10
15+
* Python 3.7-3.10
1616

1717
Local builds also require,
1818

docs/source/figs/geom-fan-curved.png

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)