Skip to content

Commit

Permalink
Sorry Mark, I was wrong, the 64-bit PC build machine has Scipy 0.8.0 …
Browse files Browse the repository at this point in the history
…and can't upgrade so easily without breaking Ilastik
  • Loading branch information
Lee Kamentsky committed Sep 24, 2012
1 parent 863c493 commit ae64b23
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions cellprofiler/modules/measureobjectintensity.py
Expand Up @@ -441,8 +441,22 @@ def run(self, workspace):
#
qmask = (~qmask) & (areas > 0)
dest[lindexes[qmask]-1] = limg[order[qindex[qmask]]]
mad_intensity[lindexes-1] = fix(nd.median(limg - median_intensity[llabels-1],
llabels, lindexes))
#
# Once again, for the MAD
#
madimg = limg - median_intensity[llabels-1]
order = np.lexsort((limg, llabels))
qindex = indices.astype(float) + areas / 2.0
qfraction = qindex - np.floor(qindex)
qindex = qindex.astype(int)
qmask = qindex < indices + areas-1
qi = qindex[qmask]
qf = qfraction[qmask]
mad_intensity[lindexes[qmask]-1] = (
madimg[order[qi]] * (1 - qf) +
madimg[order[qi + 1]] * qf)
qmask = (~qmask) & (areas > 0)
mad_intensity[lindexes[qmask]-1] = madimg[order[qindex[qmask]]]

m = workspace.measurements
for category, feature_name, measurement in \
Expand Down

0 comments on commit ae64b23

Please sign in to comment.