예제 #1
0
 def func(twosided):
     np.random.seed(0)
     p = _gaussian_psd_1f(nsamples,
                          fsamp,
                          white,
                          fknee,
                          alpha,
                          twosided=twosided)
     t = _gaussian_sample(nsamples, fsamp, p, twosided=twosided)
     return p, t
예제 #2
0
    [racenter, deccenter], duration, ts, angspeed, delta_az, nsweeps_el,
    angspeed_psi, maxpsi)

# acquisition model
acq = QubicAcquisition(150, sampling, kind='I', synthbeam_fraction=0.99,
                       detector_sigma=sigma, detector_fknee=fknee,
                       detector_fslope=fslope, detector_ncorr=ncorr)
C = acq.get_convolution_peak_operator()
P = acq.get_projection_operator()
H = P * C

# produce the Time-Ordered data
y = H(x0)

# noise
psd = _gaussian_psd_1f(len(acq.sampling), sigma=sigma, fknee=fknee,
                       fslope=fslope, sampling_frequency=1/ts)
invntt = acq.get_invntt_operator()
noise = acq.get_noise()

# map-making
coverage = P.pT1()
mask = coverage > 10
P = P.restrict(mask, inplace=True)
unpack = UnpackOperator(mask)

# map without covariance matrix
solution1 = pcg(P.T * P, P.T(y + noise),
                M=DiagonalOperator(1/coverage[mask]), disp=True)
x1 = unpack(solution1['x'])

# map with covariance matrix
                       synthbeam_fraction=0.99,
                       detector_fknee=fknee,
                       detector_fslope=fslope,
                       detector_ncorr=ncorr)
H_ga = acq.get_operator()
C = acq.get_convolution_peak_operator()
H = H_ga * C

# produce the Time-Ordered data
y = H(x0)

# noise
sigma = acq.instrument.detector.nep / np.sqrt(2 * sampling.period)
psd = _gaussian_psd_1f(len(acq.sampling),
                       sigma=sigma,
                       fknee=fknee,
                       fslope=fslope,
                       sampling_frequency=1 / ts)
invntt = acq.get_invntt_operator()
noise = acq.get_noise()
noise[...] = 0

# map-making
coverage = acq.get_coverage()
mask = coverage / coverage.max() > 0.01

acq_red = acq[..., mask]
H_ga_red = acq_red.get_operator()
# map without covariance matrix
solution1 = pcg(H_ga_red.T * H_ga_red,
                H_ga_red.T(y + noise),
예제 #4
0
 def func(twosided):
     np.random.seed(0)
     p = _gaussian_psd_1f(nsamples, fsamp, white, fknee, alpha,
                          twosided=twosided)
     t = _gaussian_sample(nsamples, fsamp, p, twosided=twosided)
     return p, t