Commits

David Mehringer authored 58320c881af
there's a two iter loop that looks like it does the same thing on each iter, collapse

casatools/tests/tools/ms/test_tool_ms_statwt.py

Modified
489 489 myms.done()
490 490 shutil.rmtree(dst)
491 491
492 492 def test_wtrange(self):
493 493 """Test weight range"""
494 494 dst = "ngc5921.split.timebin.ms"
495 495 ref = "ngc5921_statwt_ref_test_wtrange_300s.ms"
496 496 combine = "corr"
497 497 timebin = "300s"
498 498 wtrange = [1, 2]
499 - """
500 - row_to_rows = []
501 - for i in range(10):
502 - row_to_rows.append([0, 10])
503 - for i in range(2):
504 - row_to_rows.append([10, 12])
505 - for i in range(5):
506 - row_to_rows.append([12, 17])
507 - for i in range(5):
508 - row_to_rows.append([17, 22])
509 - for i in range(5):
510 - row_to_rows.append([22, 27])
511 - for i in range(5):
512 - row_to_rows.append([27, 32])
513 - for i in range(1):
514 - row_to_rows.append([32, 33])
515 - for i in range(2):
516 - row_to_rows.append([33, 35])
517 - for i in range(3):
518 - row_to_rows.append([35, 38])
519 - for i in range(5):
520 - row_to_rows.append([38, 43])
521 - for i in range(5):
522 - row_to_rows.append([43, 48])
523 - for i in range(5):
524 - row_to_rows.append([48, 53])
525 - for i in range(3):
526 - row_to_rows.append([53, 56])
527 - for i in range(4):
528 - row_to_rows.append([56, 60])
529 - """
530 - for i in [0, 1]:
531 - shutil.copytree(src, dst)
532 - myms.open(dst, nomodify=False)
533 - myms.statwt(timebin=timebin, combine=combine, wtrange=wtrange)
534 - myms.done()
535 - self.compare(dst, ref)
536 - # self._check_weights(
537 - # dst, row_to_rows, 'c', None, True, None, wtrange
538 - # )
539 - shutil.rmtree(dst)
499 + # for i in [0, 1]:
500 + shutil.copytree(src, dst)
501 + myms.open(dst, nomodify=False)
502 + myms.statwt(timebin=timebin, combine=combine, wtrange=wtrange)
503 + myms.done()
504 + self.compare(dst, ref)
505 + # self._check_weights(
506 + # dst, row_to_rows, 'c', None, True, None, wtrange
507 + # )
508 + shutil.rmtree(dst)
540 509
541 510 def test_preview(self):
542 511 """Test preview mode"""
543 512 dst = "ngc5921.split.preview.ms"
544 513 [refwt, refwtsp, refflag, reffrow, refdata] = _get_dst_cols(src)
545 514 combine = "corr"
546 515 timebin = "300s"
547 516 wtrange = [1, 2]
548 517 preview = True
549 518 shutil.copytree(src, dst)

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut