def __init__(self, d): """ Parameters ---------- calibration : QubicCalibration The calibration tree. detector_fknee : array-like, optional The detector 1/f knee frequency in Hertz. detector_fslope : array-like, optional The detector 1/f slope index. detector_ncorr : int, optional The detector 1/f correlation length. detector_ngrids : int, optional Number of detector grids. detector_nep : array-like, optional The detector NEP [W/sqrt(Hz)]. detector_tau : array-like, optional The detector time constants in seconds. filter_nu : float, optional The filter central wavelength, in Hz. filter_relative_bandwidth : float, optional The filter relative bandwidth Δν/ν. polarizer : boolean, optional If true, the polarizer grid is present in the optics setup. primary_beam : function f(theta [rad], phi [rad]), optional The primary beam transmission function. secondary_beam : function f(theta [rad], phi [rad]), optional The secondary beam transmission function. synthbeam_dtype : dtype, optional The data type for the synthetic beams (default: float32). It is the dtype used to store the values of the pointing matrix. synthbeam_kmax : integer, optional The diffraction order above which the peaks are ignored. For instance, a value of kmax=2 will model the synthetic beam by (2 * kmax + 1)**2 = 25 peaks and a value of kmax=0 will only sample the central peak. synthbeam_fraction: float, optional The fraction of significant peaks retained for the computation of the synthetic beam. """ if d['nf_sub'] is None and d['MultiBand'] == True: raise ValueError, "Error: you want Multiband instrument but you have not specified the number of subband" filter_nu = d['filter_nu'] filter_relative_bandwidth = d['filter_relative_bandwidth'] detector_fknee = d['detector_fknee'] detector_fslope = d['detector_fslope'] detector_ncorr = d['detector_ncorr'] detector_nep = d['detector_nep'] detector_ngrids = d['detector_ngrids'] detector_tau = d['detector_tau'] polarizer = d['polarizer'] synthbeam_dtype = np.float32 synthbeam_fraction = d['synthbeam_fraction'] synthbeam_kmax = d['synthbeam_kmax'] synthbeam_peak150_fwhm = np.radians(d['synthbeam_peak150_fwhm']) ripples = d['ripples'] nripples = d['nripples'] primary_beam = None secondary_beam = None calibration = QubicCalibration(d) self.calibration = calibration layout = self._get_detector_layout(detector_ngrids, detector_nep, detector_fknee, detector_fslope, detector_ncorr, detector_tau) Instrument.__init__(self, layout) self.ripples = ripples self.nripples = nripples self._init_beams(primary_beam, secondary_beam) self._init_filter(filter_nu, filter_relative_bandwidth) self._init_horns() self._init_optics(polarizer) self._init_synthbeam(synthbeam_dtype, synthbeam_peak150_fwhm) self.synthbeam.fraction = synthbeam_fraction self.synthbeam.kmax = synthbeam_kmax
def __init__(self, name=None, calibration=None, band=150, detector_sigma=10, detector_fknee=0, detector_fslope=1, detector_ncorr=10, detector_tau=0.01, synthbeam_dtype=np.float32, synthbeam_fraction=0.99, ngrids=2, nside=256, **keywords): """ Parameters ---------- name : str Deprecated. calibration : QubicCalibration The calibration tree. band : int or numpy array of two elements Frequensies of light in GHz for two focal planes detector_tau : array-like The detector time constants in seconds. detector_sigma : array-like The standard deviation of the detector white noise component. detector_fknee : array-like The detector 1/f knee frequency in Hertz. detector_fslope : array-like The detector 1/f slope index. detector_ncorr : int The detector 1/f correlation length. nside : int, optional Deprecated. synthbeam_dtype : dtype, optional The data type for the synthetic beams (default: float32). It is the dtype used to store the values of the pointing matrix. synthbeam_fraction: float, optional The fraction of significant peaks retained for the computation of the synthetic beam. ngrids : int, optional Number of detector grids. """ if name is not None: skind = ", kind='I'" if 'nopol' in name else '' snside = ', nside={0}'.format(nside) if nside is not None else '' warn('Please update your code:\nacq = QubicAcquisition(150, sam' 'pling{0}{1})\n'.format(skind, snside), QubicDeprecationWarning) name = name.replace(' ', '').lower() names = 'monochromatic', 'monochromatic,qu', 'monochromatic,nopol' if name not in names: raise ValueError( "The only modes implemented are {0}.".format( strenum(names, 'and'))) self._init_deprecated_sky(name, band, nside) if calibration is None: calibration = QubicCalibration() self.calibration = calibration layout = self._get_detector_layout( ngrids, detector_sigma, detector_fknee, detector_fslope, detector_ncorr, detector_tau) Instrument.__init__(self, 'QUBIC', layout) self._init_primary_beam() self._init_optics(**keywords) self._init_horns() self._init_synthetic_beam(synthbeam_dtype, synthbeam_fraction)
def __init__(self, calibration=None, detector_fknee=0, detector_fslope=1, detector_ncorr=10, detector_nep=4.7e-17, detector_ngrids=1, detector_tau=0.01, filter_nu=150e9, filter_relative_bandwidth=0.25, polarizer=True, primary_beam=None, secondary_beam=None, synthbeam_dtype=np.float32, synthbeam_fraction=0.99, synthbeam_kmax=8, synthbeam_peak150_fwhm=np.radians(0.39268176), ripples=False, nripples=0): """ Parameters ---------- calibration : QubicCalibration The calibration tree. detector_fknee : array-like, optional The detector 1/f knee frequency in Hertz. detector_fslope : array-like, optional The detector 1/f slope index. detector_ncorr : int, optional The detector 1/f correlation length. detector_ngrids : int, optional Number of detector grids. detector_nep : array-like, optional The detector NEP [W/sqrt(Hz)]. detector_tau : array-like, optional The detector time constants in seconds. filter_nu : float, optional The filter central wavelength, in Hz. filter_relative_bandwidth : float, optional The filter relative bandwidth Δν/ν. polarizer : boolean, optional If true, the polarizer grid is present in the optics setup. primary_beam : function f(theta [rad], phi [rad]), optional The primary beam transmission function. secondary_beam : function f(theta [rad], phi [rad]), optional The secondary beam transmission function. synthbeam_dtype : dtype, optional The data type for the synthetic beams (default: float32). It is the dtype used to store the values of the pointing matrix. synthbeam_kmax : integer, optional The diffraction order above which the peaks are ignored. For instance, a value of kmax=2 will model the synthetic beam by (2 * kmax + 1)**2 = 25 peaks and a value of kmax=0 will only sample the central peak. synthbeam_fraction: float, optional The fraction of significant peaks retained for the computation of the synthetic beam. """ if calibration is None: calibration = QubicCalibration() self.calibration = calibration layout = self._get_detector_layout(detector_ngrids, detector_nep, detector_fknee, detector_fslope, detector_ncorr, detector_tau) Instrument.__init__(self, layout) self.ripples = ripples self.nripples = nripples self._init_beams(primary_beam, secondary_beam) self._init_filter(filter_nu, filter_relative_bandwidth) self._init_horns() self._init_optics(polarizer) self._init_synthbeam(synthbeam_dtype, synthbeam_peak150_fwhm) self.synthbeam.fraction = synthbeam_fraction self.synthbeam.kmax = synthbeam_kmax
def __init__( self, calibration=None, detector_fknee=0, detector_fslope=1, detector_ncorr=10, detector_nep=4.7e-17, detector_ngrids=1, detector_tau=0.01, filter_nu=150e9, filter_relative_bandwidth=0.25, polarizer=True, primary_beam=None, secondary_beam=None, synthbeam_dtype=np.float32, synthbeam_fraction=0.99, synthbeam_kmax=8, synthbeam_peak150_fwhm=np.radians(0.39268176), ): """ Parameters ---------- calibration : QubicCalibration The calibration tree. detector_fknee : array-like, optional The detector 1/f knee frequency in Hertz. detector_fslope : array-like, optional The detector 1/f slope index. detector_ncorr : int, optional The detector 1/f correlation length. detector_ngrids : int, optional Number of detector grids. detector_nep : array-like, optional The detector NEP [W/sqrt(Hz)]. detector_tau : array-like, optional The detector time constants in seconds. filter_nu : float, optional The filter central wavelength, in Hz. filter_relative_bandwidth : float, optional The filter relative bandwidth Δν/ν. polarizer : boolean, optional If true, the polarizer grid is present in the optics setup. primary_beam : function f(theta [rad], phi [rad]), optional The primary beam transmission function. secondary_beam : function f(theta [rad], phi [rad]), optional The secondary beam transmission function. synthbeam_dtype : dtype, optional The data type for the synthetic beams (default: float32). It is the dtype used to store the values of the pointing matrix. synthbeam_kmax : integer, optional The diffraction order above which the peaks are ignored. For instance, a value of kmax=2 will model the synthetic beam by (2 * kmax + 1)**2 = 25 peaks and a value of kmax=0 will only sample the central peak. synthbeam_fraction: float, optional The fraction of significant peaks retained for the computation of the synthetic beam. """ if calibration is None: calibration = QubicCalibration() self.calibration = calibration layout = self._get_detector_layout( detector_ngrids, detector_nep, detector_fknee, detector_fslope, detector_ncorr, detector_tau ) Instrument.__init__(self, layout) self._init_beams(primary_beam, secondary_beam) self._init_filter(filter_nu, filter_relative_bandwidth) self._init_horns() self._init_optics(polarizer) self._init_synthbeam(synthbeam_dtype, synthbeam_peak150_fwhm) self.synthbeam.fraction = synthbeam_fraction self.synthbeam.kmax = synthbeam_kmax