Skip to content

Commit

Permalink
fixed a bug with axial lut otuput
Browse files Browse the repository at this point in the history
  • Loading branch information
pjmark committed May 6, 2024
1 parent d8858bc commit b752380
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions niftypet/nipet/invaux.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ def axial_lut(Cnt):
''' Creates lookup tables (LUT) for linear indexes along the diagonals of Michelogram
for calculations done on GPU.
'''

# > output dictionary
axlut = {}

# > number of rings
NRNG = Cnt['NRNG']

if Cnt['SPN'] == 1:
Expand Down Expand Up @@ -115,6 +120,9 @@ def axial_lut(Cnt):
MXRD += [-i, i+(SPN-1)]
SEG += [s,s]

Check failure on line 121 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L121

E231 missing whitespace after ','
Raw output
niftypet/nipet/invaux.py:121:22: E231 missing whitespace after ','
#print(2*s, i, (i+2))

Check failure on line 122 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L122

E265 block comment should start with '# '
Raw output
niftypet/nipet/invaux.py:122:13: E265 block comment should start with '# '
axlut['MNRD'] = np.array(MNRD)
axlut['MXRD'] = np.array(MXRD)
axlut['SEG'] = np.array(SEG)

#---------------------------------------------------------------------

Check failure on line 127 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L127

E265 block comment should start with '# '
Raw output
niftypet/nipet/invaux.py:127:5: E265 block comment should start with '# '
# > Michelogram for single slice rebinning
Expand Down Expand Up @@ -203,11 +211,12 @@ def axial_lut(Cnt):

log.debug('axial LUTs done.')

return {'SEG':np.array(SEG), 'MNRD':np.array(MNRD), 'MXRD':np.array(MXRD),
'rng':rng, 'Msn':Msn, 'Mssrb':Mssrb,
axlut.update({'rng':rng, 'Msn':Msn, 'Mssrb':Mssrb,

Check failure on line 214 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L214

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:214:24: E231 missing whitespace after ':'

Check failure on line 214 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L214

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:214:35: E231 missing whitespace after ':'

Check failure on line 214 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L214

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:214:48: E231 missing whitespace after ':'
'li2nos':li2nos, 'li2rno':li2r, 'li2sn':li2sn, 'li2sn1':li2sn, 'li2rng':li2rng,

Check failure on line 215 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L215

E128 continuation line under-indented for visual indent
Raw output
niftypet/nipet/invaux.py:215:13: E128 continuation line under-indented for visual indent

Check failure on line 215 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L215

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:215:21: E231 missing whitespace after ':'

Check failure on line 215 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L215

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:215:38: E231 missing whitespace after ':'

Check failure on line 215 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L215

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:215:52: E231 missing whitespace after ':'

Check failure on line 215 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L215

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:215:68: E231 missing whitespace after ':'

Check failure on line 215 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L215

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:215:84: E231 missing whitespace after ':'

Check failure on line 215 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L215

W291 trailing whitespace
Raw output
niftypet/nipet/invaux.py:215:92: W291 trailing whitespace
'sn1_rno':sn_rno, 'sn1_ssrb':sn_ssrb, 'sn1_ssrno':sn_ssrno

Check failure on line 216 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L216

E128 continuation line under-indented for visual indent
Raw output
niftypet/nipet/invaux.py:216:13: E128 continuation line under-indented for visual indent

Check failure on line 216 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L216

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:216:22: E231 missing whitespace after ':'

Check failure on line 216 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L216

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:216:41: E231 missing whitespace after ':'

Check failure on line 216 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L216

E231 missing whitespace after ':'
Raw output
niftypet/nipet/invaux.py:216:62: E231 missing whitespace after ':'
}
})

Check failure on line 217 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L217

E124 closing bracket does not match visual indentation
Raw output
niftypet/nipet/invaux.py:217:13: E124 closing bracket does not match visual indentation

Check failure on line 218 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L218

W293 blank line contains whitespace
Raw output
niftypet/nipet/invaux.py:218:1: W293 blank line contains whitespace
return axlut


#====================================================================

Check failure on line 222 in niftypet/nipet/invaux.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nipet/invaux.py#L222

E265 block comment should start with '# '
Raw output
niftypet/nipet/invaux.py:222:1: E265 block comment should start with '# '
Expand Down

0 comments on commit b752380

Please sign in to comment.