Beispiel #1
0
    def bad_delta():
        axis_1d = wcs.CoordAxis1D(wcs.Axis("UTC", "d"))
        temporal_wcs = chunk.TemporalWCS(axis_1d)

        # delta == 0.0 is bad
        ref_coord = wcs.RefCoord(float(1.0), float(2.0))
        temporal_wcs.axis.function = CoordFunction1D(int(100), 0.0, ref_coord)

        return temporal_wcs
 def get_temporal_wcs(self):
     axis = self.get_coord_axis1d()
     time = chunk.TemporalWCS(axis)
     if self.complete:
         time.exposure = 1.0
         time.resolution = 2.0
         time.timesys = "UTC"
         time.trefpos = "TOPOCENTER"
         time.mjdref = 3.0
     return time
Beispiel #3
0
    def get_test_function(complete, px, sx, nx, ds):
        axis_1d = wcs.CoordAxis1D(wcs.Axis("UTC", "d"))

        if complete:
            wcs.exposure = 300.0
            wcs.resolution = 0.1

        temporal_wcs = chunk.TemporalWCS(axis_1d)
        ref_coord = wcs.RefCoord(px, sx)
        temporal_wcs.axis.function = wcs.CoordFunction1D(nx, ds, ref_coord)
        return temporal_wcs
Beispiel #4
0
    def bad_range_wcs():
        px = float(0.5)
        sx = float(54321.0)
        nx = 200
        ds = float(0.01)
        axis_1d = wcs.CoordAxis1D(wcs.Axis("UTC", "d"))
        temporal_wcs = chunk.TemporalWCS(axis_1d)
        temporal_wcs.exposure = 300.0
        temporal_wcs.resolution = 0.1

        # divide into 2 samples with a gap between
        c1 = wcs.RefCoord(px, sx)
        c2 = wcs.RefCoord(0.0, 0.0)
        c3 = wcs.RefCoord(px + nx * 0.66, sx + nx * ds * 0.66)
        c4 = wcs.RefCoord(px + nx, sx + nx * ds)
        temporal_wcs.axis.bounds = wcs.CoordBounds1D()
        temporal_wcs.axis.bounds.samples.append(wcs.CoordRange1D(c1, c3))
        temporal_wcs.axis.bounds.samples.append(wcs.CoordRange1D(c4, c2))

        return temporal_wcs