Пример #1
0
 def test_convert_decoalesce_zero(self):
     cvis = convert_blockvisibility_to_visibility(self.blockvis)
     assert numpy.min(cvis.frequency) == numpy.min(self.frequency)
     assert numpy.min(cvis.frequency) > 0.0
     dvis = decoalesce_visibility(cvis)
     assert dvis.nvis == self.blockvis.nvis
     dvis = decoalesce_visibility(cvis)
     assert dvis.nvis == self.blockvis.nvis
Пример #2
0
 def test_coalesce_decoalesce(self):
     cvis = coalesce_visibility(self.blockvis,
                                time_coal=1.0,
                                frequency_coal=1.0)
     assert numpy.min(cvis.frequency) == numpy.min(self.frequency)
     assert numpy.min(cvis.frequency) > 0.0
     dvis = decoalesce_visibility(cvis)
     assert dvis.nvis == self.blockvis.nvis
     dvis = decoalesce_visibility(cvis)
     assert dvis.nvis == self.blockvis.nvis
Пример #3
0
 def test_coalesce_decoalesce_with_iter(self):
     for rows in vis_timeslice_iter(self.blockvis):
         visslice = create_visibility_from_rows(self.blockvis, rows)
         cvisslice = convert_blockvisibility_to_visibility(visslice)
         assert numpy.min(cvisslice.frequency) == numpy.min(self.frequency)
         assert numpy.min(cvisslice.frequency) > 0.0
         dvisslice = decoalesce_visibility(cvisslice)
         assert dvisslice.nvis == visslice.nvis
Пример #4
0
 def test_convert_weight(self):
     cvis = convert_blockvisibility_to_visibility(self.blockvis)
     model = create_image_from_visibility(
         vis=cvis,
         npixel=256,
         cellsize=0.001,
         phasecentre=self.phasecentre,
         polarisation_frame=PolarisationFrame('stokesI'))
     cvis = weight_visibility(cvis, model)
     assert numpy.mean(cvis.data['imaging_weight']) < 1.0
     assert numpy.std(cvis.data['imaging_weight']) > 0.0
     dvis = decoalesce_visibility(cvis)
     assert numpy.mean(dvis.data['imaging_weight']) < 1.0
     assert numpy.std(dvis.data['imaging_weight']) > 0.0
     assert dvis.nvis == self.blockvis.nvis
Пример #5
0
 def test_coalesce_decoalesce_singletime(self):
     self.times = numpy.array([0.0])
     self.blockvis = create_blockvisibility(
         self.lowcore,
         self.times,
         self.frequency,
         phasecentre=self.phasecentre,
         weight=1.0,
         polarisation_frame=PolarisationFrame('stokesI'),
         channel_bandwidth=self.channel_bandwidth)
     # Fill in the vis values so each can be uniquely identified
     self.blockvis.data['vis'] = range(self.blockvis.nvis)
     cvis = coalesce_visibility(self.blockvis, time_coal=1.0)
     assert numpy.min(cvis.frequency) == numpy.min(self.frequency)
     assert numpy.min(cvis.frequency) > 0.0
     dvis = decoalesce_visibility(cvis)
     assert dvis.nvis == self.blockvis.nvis