def setUp(self): self.surv = Survey.getCoreSurvey()
import os import numpy as np from astropy.table import Table from startrail.api import Survey from startrail.paths import registration_dir surv = Survey.get_core_survey() for seq_ind in range(len(surv)): print(seq_ind) key = int(surv.sequences[seq_ind].seconds) data500 = np.loadtxt(os.path.join(registration_dir, f'merged_{key}_500.csv'), delimiter=',') data3000 = np.loadtxt(os.path.join(registration_dir, f'merged_{key}.csv'), delimiter=',') Table(names=[ 'source_id', 'ra', 'dec', 'phot_bp_mean_flux', 'phot_bp_mean_flux_error' ], data=data500).write(os.path.join(registration_dir, f'registration_{seq_ind}_500.csv'), overwrite=True) Table(names=[ 'source_id', 'ra', 'dec', 'phot_bp_mean_flux', 'phot_bp_mean_flux_error' ], data=data3000).write(os.path.join( registration_dir, f'registration_{seq_ind}_3000.csv'), overwrite=True)
from startrail.api import Survey from astropy.table import Table from startrail.paths import registration_dir from time import time surv = Survey.getCoreSurvey() table = Table(names=['seq', 'exp', 'height', 'width'], dtype=['i4', 'i4', 'i4', 'i4']) for i in range(len(surv)): for j in range(len(surv.sequences[i])): height, width = surv.sequences[i].exposures[j].ccds[1].image.shape print(time(), i, j, height, width) table.add_row([i, j, height, width]) table.write(f'{registration_dir}ccdSize.csv', overwrite=True)