Ejemplo n.º 1
0
 def rfi_gen():
     for ind in xrange(NTRIALS):
         data = qmtest.real_noise((SIZE, SIZE))
         rfi = (np.random.randint(SIZE, size=RFI),
                np.random.randint(SIZE, size=RFI))
         data[rfi] = NSIG
         yield data, rfi
     return
Ejemplo n.º 2
0
 def rfi_gen():
     for ind in xrange(NTRIALS):
         data = qmtest.real_noise((SIZE, SIZE))
         xpos, ypos = (np.random.randint(SIZE, size=RFI),
                       np.random.randint(SIZE, size=RFI))
         mask = np.zeros_like(data)
         mask[xpos] = 1
         mask[:, ypos] = 1
         data += mask * NSIG
         yield data, np.where(mask)
     return
Ejemplo n.º 3
0
 def rfi_gen():
     for ind in xrange(NTRIALS):
         data = qmtest.real_noise((SIZE, SIZE))
         xpos, ypos = (np.random.randint(SIZE - 1, size=RFI),
                       np.random.randint(SIZE - 1, size=RFI))
         xpos = np.concatenate([xpos, xpos, xpos + 1, xpos + 1])
         ypos = np.concatenate([ypos, ypos + 1, ypos, ypos + 1])
         rfi = (np.array(xpos), np.array(ypos))
         data[rfi] = NSIG
         yield data, rfi
     return
Ejemplo n.º 4
0
 def rfi_gen():
     for i in xrange(NTRIALS):
         data = qmtest.real_noise((SIZE, SIZE))
         x, y = (np.random.randint(SIZE - 1, size=RFI),
                 np.random.randint(SIZE - 1, size=RFI))
         x = np.concatenate([x, x, x + 1, x + 1])
         y = np.concatenate([y, y + 1, y, y + 1])
         rfi = (np.array(x), np.array(y))
         data[rfi] = NSIG
         yield data, rfi
     return
Ejemplo n.º 5
0
 def rfi_gen():
     for ind in xrange(NTRIALS):
         sin_t = np.sin(np.linspace(0, 2 * np.pi, SIZE))
         sin_t.shape = (-1, 1)
         sin_f = np.sin(np.linspace(0, 4 * np.pi, SIZE))
         sin_f.shape = (1, -1)
         data = 5 * sin_t * sin_f + qmtest.real_noise((SIZE, SIZE))
         rfi = (np.random.randint(SIZE, size=RFI),
                np.random.randint(SIZE, size=RFI))
         data[rfi] = NSIG
         yield data, rfi
     return