def create_acquisition_operator_REC(pointing, d, nf_sub_rec, verbose=False, instrument=None): # scene s = qubic.QubicScene(d) if d['nf_sub'] == 1: if verbose: print('Making a QubicInstrument.') q = qubic.QubicInstrument(d) # one subfreq for recons _, nus_edge, _, _, _, _ = qubic.compute_freq( d['filter_nu'] / 1e9, nf_sub_rec, d['filter_relative_bandwidth']) arec = qubic.QubicAcquisition(q, pointing, s, d) return arec else: if instrument is None: if verbose: print('Making a QubicMultibandInstrument.') q = qubic.QubicMultibandInstrument(d) else: q = instrument # number of sub frequencies for reconstruction _, nus_edge, _, _, _, _ = qubic.compute_freq( d['filter_nu'] / 1e9, nf_sub_rec, d['filter_relative_bandwidth']) # Operator for Maps Reconstruction arec = qubic.QubicMultibandAcquisition(q, pointing, s, d, nus_edge) return arec
def create_acquisition_operator_TOD(pointing, d): # scene s = qubic.QubicScene(d) if d['nf_sub'] == 1: q = qubic.QubicInstrument(d) return qubic.QubicAcquisition(q, pointing, s, d) else: # Polychromatic instrument model q = qubic.QubicMultibandInstrument(d) # number of sub frequencies to build the TOD _, nus_edge_in, _, _, _, _ = qubic.compute_freq( d['filter_nu'] / 1e9, d['nf_sub'], d['filter_relative_bandwidth']) return qubic.QubicMultibandAcquisition(q, pointing, s, d, nus_edge_in)
def create_acquisition_operator_TOD(pointing, d, verbose=False): # scene s = qubic.QubicScene(d) if d['nf_sub'] == 1: if verbose: print('Making a QubicInstrument.') q = qubic.QubicInstrument(d) return qubic.QubicAcquisition(q, pointing, s, d) else: # Polychromatic instrument model if verbose: print('Making a QubicMultibandInstrument.') q = qubic.QubicMultibandInstrument(d) # number of sub frequencies to build the TOD _, nus_edge_in, _, _, _, _ = qubic.compute_freq( d['filter_nu'] / 1e9, d['nf_sub'], # Multiband instrument model d['filter_relative_bandwidth']) # Multi-band acquisition model for TOD fabrication return qubic.QubicMultibandAcquisition(q, pointing, s, d, nus_edge_in)
plt.plot(TOD[0, :]) plt.xlabel('pointing index') plt.ylabel('TOD') plt.show() # Map making if alaImager: nf_sub_rec = 1 d['synthbeam_kmax'] = 0 if oneComponent: d['kind'] = 'I' q = qubic.QubicInstrument(d) if sel_det: make_detector_subset_instrument(q, dets_FPindex, multiband=False) arec = qubic.QubicAcquisition(q, p, s, d) else: nf_sub_rec = 2 Nbfreq, nus_edge, nus, deltas, Delta, Nbbands = qubic.compute_freq(d['filter_nu'] / 1e9, nf_sub_rec, d['filter_relative_bandwidth']) arec = qubic.QubicMultibandAcquisition(q, p, s, d, nus_edge) maps_recon, nit, error = arec.tod2map(TOD, d, cov=None) print(maps_recon.shape) # In the imager case, we reshape maps in order to avoid dimension problems... if alaImager: maps_recon = np.reshape(maps_recon, (1, npix, 3))