Skip to content

Commit

Permalink
Removed unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
fullbat committed Jul 18, 2024
1 parent 7c55640 commit 86ccfde
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions commit/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ from dicelib import ui
from dicelib.utils import format_time
from dicelib.tractogram import filter

from commit import trk2dictionary
import commit.models
import commit.solvers
from commit.operator import operator
Expand Down Expand Up @@ -733,12 +732,13 @@ cdef class Evaluation :
logger.info( 'Building linear operator A' )

nF = self.DICTIONARY['IC']['nF'] # number of FIBERS
nR = self.KERNELS['wmr'].shape[0] # number of FIBER RADII
nE = self.DICTIONARY['EC']['nE'] # number of EC segments
nT = self.KERNELS['wmh'].shape[0] # number of EC TORTUOSITY values
nV = self.DICTIONARY['nV'] # number of VOXELS
nI = self.KERNELS['iso'].shape[0] # number of ISO contributions
n2 = nR * nF + nT * nE + nI * nV
# nR = self.KERNELS['wmr'].shape[0] # number of FIBER RADII
# nE = self.DICTIONARY['EC']['nE'] # number of EC segments
# nT = self.KERNELS['wmh'].shape[0] # number of EC TORTUOSITY values
# nV = self.DICTIONARY['nV'] # number of VOXELS
# nI = self.KERNELS['iso'].shape[0] # number of ISO contributions
# n2 = nR * nF + nT * nE + nI * nV
n2 = nF * self.KERNELS['wmr'].shape[0]
self.DICTIONARY["IC"]["eval"] = np.ones( int(n2), dtype=np.uint32)

self.A = operator.LinearOperator( self.DICTIONARY, self.KERNELS, self.THREADS, nolut=True if hasattr(self.model, 'nolut') else False )
Expand All @@ -760,6 +760,7 @@ cdef class Evaluation :

if self.debias_mask is not None :
y *= self.debias_mask

return y


Expand Down Expand Up @@ -1348,13 +1349,11 @@ cdef class Evaluation :
self.set_verbose(0)

nF = self.DICTIONARY['IC']['nF']
nE = self.DICTIONARY['EC']['nE']
nV = self.DICTIONARY['nV']

offset1 = nF * self.KERNELS['wmr'].shape[0]
xic = self.x[:offset1]

mask = np.ones(nF, dtype=np.uint32)
mask = np.ones(offset1, dtype=np.uint32)
mask[xic<0.000000000000001] = 0

self.DICTIONARY["IC"]["eval"] = mask
Expand Down

0 comments on commit 86ccfde

Please sign in to comment.