示例#1
0
 def get_chunks(self):
     chunks = caom_util.TypedList(chunk.Chunk, )
     _chunk = chunk.Chunk()
     if self.complete:
         _chunk.product_type = chunk.ProductType.SCIENCE
         _chunk.naxis = 5
         _chunk.observable_axis = 1
         _chunk.position_axis_1 = 1
         _chunk.position_axis_2 = 2
         _chunk.energy_axis = 3
         _chunk.time_axis = 4
         _chunk.polarization_axis = 5
         _chunk.observable = self.get_observable_axis()
         _chunk.position = self.get_spatial_wcs()
         _chunk.energy = self.get_spectral_wcs()
         _chunk.time = self.get_temporal_wcs()
         _chunk.polarization = self.get_polarization_wcs()
         _chunk.last_modified = common.get_current_ivoa_time()
         if self.caom_version >= 23:
             _chunk.max_last_modified = common.get_current_ivoa_time()
             _chunk.meta_checksum = common.ChecksumURI(
                 "md5:9882dbbf9cadc221019b712fd402bcbd")
             _chunk.acc_meta_checksum = common.ChecksumURI(
                 "md5:844ce247db0844ad9f721430c80e7a21")
     chunks.append(_chunk)
     return chunks
示例#2
0
    def get_good_test_chunk(ptype):
        test_chunk = chunk.Chunk()
        test_chunk.position = SpatialTestUtil.good_wcs()
        test_chunk.energy = EnergyTestUtil.good_wcs()
        test_chunk.time = TimeTestUtil.good_wcs()
        # test_chunk.polarization = PolarizationTestUtil.good_wcs()

        return test_chunk