def test_legacy_aptest(self): """Test utr_cdr-based aptest that matches the old aptest script""" class Dummy(object): pass args = Dummy() self.args.sjd = sjd.sjd() self.args.print = False self.args.summary = False self.args.data = True self.args.boss = False self.args.apogee = False self.args.p_boss = False self.args.p_apogee = False self.args.log_support = False self.args.morning = False self.args.verbose = True self.args.mirrors = False self.args.telstatus = False self.args.legacy_aptest = True ap_data_dir = sloan_log.ap_dir / '{}'.format(self.args.sjd) b_data_dir = sloan_log.b_dir / '{}'.format(self.args.sjd) ap_images = list(Path(ap_data_dir).glob('apR-a*.apz')) b_images = list(Path(b_data_dir).glob('sdR-r1*fit.gz')) log = sloan_log.Logging(ap_images, b_images, self.args) log.parse_images() log.sort() log.count_dithers() log.p_data()
def test_known_data_apogee(self): """Runs on an old dataset that I know used to run successfully, this one only checks APOGEE and prints its summary """ self.args.sjd = 59011 self.args.print = False self.args.summary = False self.args.data = False self.args.boss = False self.args.apogee = True self.args.p_boss = False self.args.p_apogee = True self.args.log_support = False self.args.morning = False self.args.verbose = True self.args.morrors = False self.args.telstatus = False self.args.legacy_aptest = False ap_data_dir = sloan_log.ap_dir / '{}'.format(self.args.sjd) b_data_dir = sloan_log.b_dir / '{}'.format(self.args.sjd) ap_images = list(Path(ap_data_dir).glob('apR-a*.apz')) b_images = list(Path(b_data_dir).glob('sdR-r1*fit.gz')) log = sloan_log.Logging(ap_images, b_images, self.args) log.parse_images() log.sort() log.count_dithers() log.p_apogee()
def test_tel_status(self): """Test telstatus integration""" self.args.sjd = sjd.sjd() self.args.print = False self.args.summary = False self.args.data = False self.args.boss = False self.args.apogee = False self.args.p_boss = False self.args.p_apogee = False self.args.log_support = False self.args.morning = False self.args.verbose = True self.args.mirrors = False self.args.telstatus = True self.args.legacy_aptest = False ap_data_dir = sloan_log.ap_dir / '{}'.format(self.args.sjd) b_data_dir = sloan_log.b_dir / '{}'.format(self.args.sjd) ap_images = list(Path(ap_data_dir).glob('apR-a*.apz')) b_images = list(Path(b_data_dir).glob('sdR-r1*fit.gz')) log = sloan_log.Logging(ap_images, b_images, self.args) log.parse_images() log.sort() log.count_dithers() log.log_support()