def get_sensitivity(self, observation_time=50): if self.site in ['south', 'paranal']: self.E, self.sensitivity = np.loadtxt(ds.get('cta_requirements_South-50h.dat'), unpack=True) if self.site in ['north', 'lapalma']: self.E, self.sensitivity = np.loadtxt(ds.get('cta_requirements_North-50h.dat'), unpack=True) return self.E, self.sensitivity
def get_effective_area(self, observation_time=50): """ Return the effective area at the given observation time in hours. NB: Only 50h supported Returns the energy array and the effective area array Parameters ---------- observation_time: optional Returns ------- `numpy.ndarray`, `numpy.ndarray` """ if self.site == 'south': if observation_time == 50: self.E, self.effective_area = np.loadtxt( ds.get('CTA-Performance-prod3b-v1-South-20deg-50h-EffArea.txt'), skiprows=11, unpack=True) if observation_time == 0.5: self.E, self.effective_area = np.loadtxt( ds.get('CTA-Performance-prod3b-v1-North-20deg-30m-EffArea.txt'), skiprows=11, unpack=True) if self.site == 'north': if observation_time == 50: self.E, self.effective_area = np.loadtxt( ds.get('CTA-Performance-prod3b-v1-North-20deg-50h-EffArea.txt'), skiprows=11, unpack=True) if observation_time == 0.5: self.E, self.effective_area = np.loadtxt( ds.get('CTA-Performance-prod3b-v1-North-20deg-30m-EffArea.txt'), skiprows=11, unpack=True) return self.E, self.effective_area
def get_angular_resolution(self): if self.site == 'south': self.E, self.angular_resolution = np.loadtxt(ds.get('cta_requirements_South-50h-AngRes.dat'), unpack=True) if self.site == 'north': self.E, self.angular_resolution = np.loadtxt(ds.get('cta_requirements_North-50h-AngRes.dat'), unpack=True) return self.E, self.angular_resolution
def get_energy_resolution(self): if self.site in ['south', 'paranal']: self.E, self.energy_resolution = np.loadtxt(ds.get('cta_requirements_South-50h-ERes.dat'), unpack=True) if self.site in ['north', 'lapalma']: self.E, self.energy_resolution = np.loadtxt(ds.get('cta_requirements_North-50h-ERes.dat'), unpack=True) return self.E, self.energy_resolution
def get_sensitivity(self, observation_time=50): if self.site in ['south', 'paranal']: self.E, self.sensitivity = np.loadtxt( ds.get('cta_requirements_South-50h.dat'), unpack=True) if self.site in ['north', 'lapalma']: self.E, self.sensitivity = np.loadtxt( ds.get('cta_requirements_North-50h.dat'), unpack=True) return self.E, self.sensitivity
def get_energy_resolution(self): if self.site in ['south', 'paranal']: self.E, self.energy_resolution = np.loadtxt(ds.get('CTA-Performance-prod3b-v1-South-20deg-50h-Eres.txt'), skiprows=11, unpack=True) if self.site in ['north', 'lapalma']: self.E, self.energy_resolution = np.loadtxt(ds.get('CTA-Performance-prod3b-v1-North-20deg-50h-Eres.txt'), skiprows=11, unpack=True) return self.E, self.energy_resolution
def get_energy_resolution(self): if self.site in ['south', 'paranal']: self.E, self.energy_resolution = np.loadtxt( ds.get('cta_requirements_South-50h-ERes.dat'), unpack=True) if self.site in ['north', 'lapalma']: self.E, self.energy_resolution = np.loadtxt( ds.get('cta_requirements_North-50h-ERes.dat'), unpack=True) return self.E, self.energy_resolution
def get_angular_resolution(self): if self.site == 'south': self.E, self.angular_resolution = np.loadtxt( ds.get('cta_requirements_South-50h-AngRes.dat'), unpack=True) if self.site == 'north': self.E, self.angular_resolution = np.loadtxt( ds.get('cta_requirements_North-50h-AngRes.dat'), unpack=True) return self.E, self.angular_resolution
def get_angular_resolution(self): if self.site == 'south': self.E, self.angular_resolution = np.loadtxt( ds.get('CTA-Performance-prod3b-v1-South-20deg-50h-Angres.txt'), skiprows=11, unpack=True) if self.site == 'north': self.E, self.angular_resolution = np.loadtxt( ds.get('CTA-Performance-prod3b-v1-North-20deg-50h-Angres.txt'), skiprows=11, unpack=True) return self.E, self.angular_resolution
def get_sensitivity(self, observation_time=50): if self.site in ['south', 'paranal']: Emin, Emax, self.sensitivity = np.loadtxt(ds.get('CTA-Performance-prod3b-v1-South-20deg-50h-DiffSens.txt'), skiprows=10, unpack=True) self.E = logbin_mean(np.append(Emin, Emax[-1])) if self.site in ['north', 'lapalma']: Emin, Emax, self.sensitivity = np.loadtxt(ds.get('CTA-Performance-prod3b-v1-North-20deg-50h-DiffSens.txt'), skiprows=10, unpack=True) self.E = logbin_mean(np.append(Emin, Emax[-1])) return self.E, self.sensitivity
def get_energy_resolution(self): if self.site in ['south', 'paranal']: self.E, self.energy_resolution = np.loadtxt( ds.get('CTA-Performance-prod3b-v1-South-20deg-50h-Eres.txt'), skiprows=11, unpack=True) if self.site in ['north', 'lapalma']: self.E, self.energy_resolution = np.loadtxt( ds.get('CTA-Performance-prod3b-v1-North-20deg-50h-Eres.txt'), skiprows=11, unpack=True) return self.E, self.energy_resolution
def get_sensitivity(self, observation_time=50): if self.site in ['south', 'paranal']: Emin, Emax, self.sensitivity = np.loadtxt(ds.get( 'CTA-Performance-prod3b-v1-South-20deg-50h-DiffSens.txt'), skiprows=10, unpack=True) self.E = logbin_mean(np.append(Emin, Emax[-1])) if self.site in ['north', 'lapalma']: Emin, Emax, self.sensitivity = np.loadtxt(ds.get( 'CTA-Performance-prod3b-v1-North-20deg-50h-DiffSens.txt'), skiprows=10, unpack=True) self.E = logbin_mean(np.append(Emin, Emax[-1])) return self.E, self.sensitivity
def get_effective_area(self, observation_time=50): """ Return the effective area at the given observation time in hours. NB: Only 0.5h supported Returns the energy array and the effective area array Parameters ---------- observation_time: optional Returns ------- `numpy.ndarray`, `numpy.ndarray` """ if self.site == 'south': self.E, self.effective_area = np.loadtxt(ds.get('cta_requirements_South-30m-EffectiveArea.dat'), unpack=True) if self.site == 'north': self.E, self.effective_area = np.loadtxt(ds.get('cta_requirements_North-30m-EffectiveArea.dat'), unpack=True) return self.E, self.effective_area
def get_effective_area(self, observation_time=50): """ Return the effective area at the given observation time in hours. NB: Only 0.5h supported Returns the energy array and the effective area array Parameters ---------- observation_time: optional Returns ------- `numpy.ndarray`, `numpy.ndarray` """ if self.site == 'south': self.E, self.effective_area = np.loadtxt( ds.get('cta_requirements_South-30m-EffectiveArea.dat'), unpack=True) if self.site == 'north': self.E, self.effective_area = np.loadtxt( ds.get('cta_requirements_North-30m-EffectiveArea.dat'), unpack=True) return self.E, self.effective_area
def get_effective_area(self, observation_time=50): """ Return the effective area at the given observation time in hours. NB: Only 50h supported Returns the energy array and the effective area array Parameters ---------- observation_time: optional Returns ------- `numpy.ndarray`, `numpy.ndarray` """ if self.site == 'south': if observation_time == 50: self.E, self.effective_area = np.loadtxt(ds.get( 'CTA-Performance-prod3b-v1-South-20deg-50h-EffArea.txt'), skiprows=11, unpack=True) if observation_time == 0.5: self.E, self.effective_area = np.loadtxt(ds.get( 'CTA-Performance-prod3b-v1-North-20deg-30m-EffArea.txt'), skiprows=11, unpack=True) if self.site == 'north': if observation_time == 50: self.E, self.effective_area = np.loadtxt(ds.get( 'CTA-Performance-prod3b-v1-North-20deg-50h-EffArea.txt'), skiprows=11, unpack=True) if observation_time == 0.5: self.E, self.effective_area = np.loadtxt(ds.get( 'CTA-Performance-prod3b-v1-North-20deg-30m-EffArea.txt'), skiprows=11, unpack=True) return self.E, self.effective_area
def test_get_datasets(): for file in filelist: assert get(file)