(self)
| 411 | return self |
| 412 | |
| 413 | def get(self): # eqv to .Pend |
| 414 | ia = numpy.array(self.i, dtype=numpy.double) |
| 415 | ja = numpy.array(self.j, dtype=numpy.double) |
| 416 | si = numpy.cumsum(ia) |
| 417 | sj = numpy.cumsum(ja) |
| 418 | ni = numpy.max(si) - si # ? |
| 419 | nj = numpy.max(sj) - sj |
| 420 | if self.subtype == "a": |
| 421 | w = numpy.minimum(ia, ja) |
| 422 | elif self.subtype == "b": |
| 423 | w = numpy.maximum(ia, ja) |
| 424 | elif self.subtype == "c": |
| 425 | w = ia |
| 426 | elif self.subtype == "d": |
| 427 | w = ia + ja |
| 428 | else: |
| 429 | _error("Unsupported subtype") |
| 430 | |
| 431 | if self.smoothing: |
| 432 | # if self.pid==3: import ipdb; ipdb.set_trace() |
| 433 | w[1:] = numpy.mean(w[1:]) |
| 434 | |
| 435 | w[0] = -1.0 |
| 436 | |
| 437 | nr = len(w) |
| 438 | mx = numpy.zeros((nr, 4)) |
| 439 | mx[:, 0] = self.pid |
| 440 | mx[:, 1] = ni |
| 441 | mx[:, 2] = nj |
| 442 | mx[:, 3] = w |
| 443 | return mx |
| 444 | |
| 445 | |
| 446 | def rabinerJuangStepPattern(ptype, slope_weighting="d", smoothed=False): |
no test coverage detected