Skip to content

Commit

Permalink
bump version, merge pull request #16 from NiftyPET/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl authored Jun 18, 2021
2 parents 69fe6e5 + 60e7b93 commit 96a9833
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ jobs:
- run: pip install -U .[dev]
- run: pytest --cov=$HOME/.niftypet
- run: codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
deploy:
needs: [check, test]
name: PyPI Deploy
Expand All @@ -67,8 +65,7 @@ jobs:
- id: dist
uses: casperdcl/deploy-pypi@v2
with:
requirements: twine setuptools wheel setuptools_scm[toml] tqdm miutil[web]
build: true
pip: true
password: ${{ secrets.PYPI_TOKEN }}
upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}
- name: Changelog
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ MANIFEST

/.coverage*
/coverage.xml
/.pytest_cache/
5 changes: 4 additions & 1 deletion niftypet/ninst/install_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ def download_dcm2niix(Cnt, dest):

Cnt["DCM2NIIX"] = fspath(next(binpath.glob("dcm2niix*")))
# ensure the permissions are given to the executable
os.chmod(Cnt["DCM2NIIX"], 755)
try:
os.chmod(Cnt["DCM2NIIX"], 0o755)
except PermissionError:
pass
# update the resources.py file in ~/.niftypet
Cnt = update_resources(Cnt)
return Cnt
Expand Down
15 changes: 14 additions & 1 deletion niftypet/ninst/raw/resources.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Resources file for NiftyPET NIPET and NIMPA etc."""
__author__ = ("Pawel J. Markiewicz", "Casper O. da Costa-Luis")
__copyright__ = "Copyright 2018-20"

from math import ceil, pi

try:
Expand Down Expand Up @@ -104,6 +105,15 @@ def array(x):
RNG_STRT = 0
RNG_END = 64


# ------------------------------------------------------
# > scatter axial ring definition
sct_irng = [0, 10, 19, 28, 35, 44, 53, 63]
# > resulting number of rings used for scatter modelling
NSRNG = len(sct_irng)
# ------------------------------------------------------


# no of sinos in a segment out of 11 segments
seg = array([127, 115, 115, 93, 93, 71, 71, 49, 49, 27, 27])

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

# > all voxels intersected by a given LOR
NTV = 907
NTV = 1807
# ------------------------------------------------------

# number of direct sinograms (i.e., for segment 0)
Expand Down Expand Up @@ -404,6 +414,9 @@ def get_mmr_constants():
"LLD": LLD, # lower energy threashold
"E511": E511,
"ER": ER, # energy resolution
# > scatter:
"SIRNG": sct_irng, # scatter ring indices
"NSRNG": NSRNG, # number of rings for scatter modelling
"COSUPSMX": COSUPSMX, # cosine of max allowed scatter angle
"NCOS": NCOS, # number of cos samples for LUT
"COSSTP": COSSTP, # cosine step
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ python_requires=>=3.6
[options.extras_require]
dev=
pre-commit
twine
wheel
pytest
pytest-cov
pytest-timeout
pytest-xdist
codecov
[options.packages.find]
exclude=tests
[options.package_data]
*=*.md, *.rst

Expand Down

0 comments on commit 96a9833

Please sign in to comment.