Commits
Ville Suoranta authored 7ef138c9cd9 Merge
467 467 | self.assertTrue((expec == got).all()) |
468 468 | |
469 469 | def test_stretch(self): |
470 470 | """ imcollapse: Test stretch parameter""" |
471 471 | yy = iatool() |
472 472 | yy.open(good_image) |
473 473 | mycs = yy.coordsys().torecord() |
474 474 | yy.done() |
475 475 | maskim = "ymask" |
476 476 | yy.fromshape(maskim,[3,3,1,1]) |
477 - | yy.addnoise() |
477 + | bb = yy.getchunk() |
478 + | bb = bb + 1 |
479 + | bb[1,1] = -1 |
480 + | yy.putchunk(bb) |
478 481 | yy.setcoordsys(mycs) |
479 482 | yy.done() |
480 483 | for i in [0,1]: |
481 484 | if i == 1: |
482 485 | yy = run_collapse( |
483 486 | good_image, "mean", 0, "", "", "", "", |
484 487 | "", maskim + ">0", False, stretch=True |
485 488 | ) |
486 489 | self.assertTrue(type(yy) == type(ia)) |
487 490 | yy.done() |