Skip to content

Commit 96a9833

Browse files
authored
bump version, merge pull request #16 from NiftyPET/devel
2 parents 69fe6e5 + 60e7b93 commit 96a9833

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

.github/workflows/test.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ jobs:
5353
- run: pip install -U .[dev]
5454
- run: pytest --cov=$HOME/.niftypet
5555
- run: codecov
56-
env:
57-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5856
deploy:
5957
needs: [check, test]
6058
name: PyPI Deploy
@@ -67,8 +65,7 @@ jobs:
6765
- id: dist
6866
uses: casperdcl/deploy-pypi@v2
6967
with:
70-
requirements: twine setuptools wheel setuptools_scm[toml] tqdm miutil[web]
71-
build: true
68+
pip: true
7269
password: ${{ secrets.PYPI_TOKEN }}
7370
upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}
7471
- name: Changelog

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ MANIFEST
1111

1212
/.coverage*
1313
/coverage.xml
14+
/.pytest_cache/

niftypet/ninst/install_tools.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ def download_dcm2niix(Cnt, dest):
305305

306306
Cnt["DCM2NIIX"] = fspath(next(binpath.glob("dcm2niix*")))
307307
# ensure the permissions are given to the executable
308-
os.chmod(Cnt["DCM2NIIX"], 755)
308+
try:
309+
os.chmod(Cnt["DCM2NIIX"], 0o755)
310+
except PermissionError:
311+
pass
309312
# update the resources.py file in ~/.niftypet
310313
Cnt = update_resources(Cnt)
311314
return Cnt

niftypet/ninst/raw/resources.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Resources file for NiftyPET NIPET and NIMPA etc."""
22
__author__ = ("Pawel J. Markiewicz", "Casper O. da Costa-Luis")
33
__copyright__ = "Copyright 2018-20"
4+
45
from math import ceil, pi
56

67
try:
@@ -104,6 +105,15 @@ def array(x):
104105
RNG_STRT = 0
105106
RNG_END = 64
106107

108+
109+
# ------------------------------------------------------
110+
# > scatter axial ring definition
111+
sct_irng = [0, 10, 19, 28, 35, 44, 53, 63]
112+
# > resulting number of rings used for scatter modelling
113+
NSRNG = len(sct_irng)
114+
# ------------------------------------------------------
115+
116+
107117
# no of sinos in a segment out of 11 segments
108118
seg = array([127, 115, 115, 93, 93, 71, 71, 49, 49, 27, 27])
109119

@@ -121,7 +131,7 @@ def array(x):
121131
NTT = 10
122132

123133
# > all voxels intersected by a given LOR
124-
NTV = 907
134+
NTV = 1807
125135
# ------------------------------------------------------
126136

127137
# number of direct sinograms (i.e., for segment 0)
@@ -404,6 +414,9 @@ def get_mmr_constants():
404414
"LLD": LLD, # lower energy threashold
405415
"E511": E511,
406416
"ER": ER, # energy resolution
417+
# > scatter:
418+
"SIRNG": sct_irng, # scatter ring indices
419+
"NSRNG": NSRNG, # number of rings for scatter modelling
407420
"COSUPSMX": COSUPSMX, # cosine of max allowed scatter angle
408421
"NCOS": NCOS, # number of cos samples for LUT
409422
"COSSTP": COSSTP, # cosine step

setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ python_requires=>=3.6
4141
[options.extras_require]
4242
dev=
4343
pre-commit
44-
twine
45-
wheel
4644
pytest
4745
pytest-cov
4846
pytest-timeout
4947
pytest-xdist
5048
codecov
49+
[options.packages.find]
50+
exclude=tests
5151
[options.package_data]
5252
*=*.md, *.rst
5353

0 commit comments

Comments
 (0)