Skip to content

Commit

Permalink
corrected frwd projector output and added sinogram segment definition…
Browse files Browse the repository at this point in the history
… to invaux
  • Loading branch information
pjmark committed May 6, 2024
1 parent 4ef03f6 commit 7d8089a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
21 changes: 20 additions & 1 deletion niftypet/nipet/invaux.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,26 @@ def axial_lut(Cnt):
z += Cnt['AXR']
rng[i, 1] = z


# > sinogram segments
if Cnt['SPN']>1:
SPN = Cnt['SPN']
MNRD = [-(SPN//2),]

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

View workflow job for this annotation

GitHub Actions / flake8

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

E231 missing whitespace after ','
Raw output
niftypet/nipet/invaux.py:106:26: E231 missing whitespace after ','
MXRD = [SPN//2,]

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

View workflow job for this annotation

GitHub Actions / flake8

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

E231 missing whitespace after ','
Raw output
niftypet/nipet/invaux.py:107:23: E231 missing whitespace after ','
for i in range(SPN//2+1, NRNG, SPN):
s = 2*(NRNG-i)-1

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

View workflow job for this annotation

GitHub Actions / flake8

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

F841 local variable 's' is assigned to but never used
Raw output
niftypet/nipet/invaux.py:109:13: F841 local variable 's' is assigned to but never used

if i>Cnt['MRD']: break

MNRD.append(-i-(SPN-1))
MXRD.append(-i)

MNRD.append(i)
MXRD.append(i+(SPN-1))

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

View workflow job for this annotation

GitHub Actions / flake8

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

W293 blank line contains whitespace
Raw output
niftypet/nipet/invaux.py:118:1: W293 blank line contains whitespace
#print(2*s, i, (i+2))

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

View workflow job for this annotation

GitHub Actions / flake8

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

E265 block comment should start with '# '
Raw output
niftypet/nipet/invaux.py:119:13: E265 block comment should start with '# '

Cnt['MNRD'] = np.array(MNRD)
Cnt['MXRD'] = np.array(MXRD)

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

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

View workflow job for this annotation

GitHub Actions / flake8

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

E265 block comment should start with '# '
Raw output
niftypet/nipet/invaux.py:124:5: E265 block comment should start with '# '
# > Michelogram for single slice rebinning
Expand Down
3 changes: 2 additions & 1 deletion niftypet/nipet/prj_inv/prj_inv.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def frwd_prj(im, scanner_params, isub=ISUB_DEFAULT, dev_out=False, attenuation=F

# put the gaps back to form displayable sinogram
if not dev_out and fullsino_out:
sino = mmraux.putgaps(sino, txLUT, Cnt)
sino = np.reshape(sino, (Cnt['NSBINS'], Cnt['NSANGLES'], nsinos))
sino = np.transpose(sino, (2,1,0))

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

View workflow job for this annotation

GitHub Actions / flake8

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

E231 missing whitespace after ','
Raw output
niftypet/nipet/prj_inv/prj_inv.py:127:37: E231 missing whitespace after ','

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

View workflow job for this annotation

GitHub Actions / flake8

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

E231 missing whitespace after ','
Raw output
niftypet/nipet/prj_inv/prj_inv.py:127:39: E231 missing whitespace after ','

return sino

Expand Down

0 comments on commit 7d8089a

Please sign in to comment.