コード例 #1
0
fp_pos_e2v = [(1024, 3003), (3072, 3003), (2048, 2002), (1024, 1001),
              (3072, 1001)]
fp_pos_itl = [(1018, 3000), (3054, 3000), (2036, 2000), (1018, 1000),
              (3054, 1000)]

xall = np.zeros((len(raft_list), len(sensor_list) * len(fp_pos_e2v)))
yall = np.zeros((len(raft_list), len(sensor_list) * len(fp_pos_e2v)))

for i, raft in enumerate(raft_list):
    for j, sensor in enumerate(sensor_list):
        ccdid = raft + '_' + sensor
        det = lct.getDetector(ccdid)
        fp_pos = fp_pos_e2v
        if 'ITL' in det.getSerial(): fp_pos = fp_pos_itl
        for k, pos in enumerate(fp_pos):
            ycenter, xcenter = lct.ccdPixelToFocalMm(pos[0], pos[1], ccdid)
            l = j * len(fp_pos) + k
            xall[i][l] = xcenter
            yall[i][l] = ycenter

# Print into configuration file
config_filename = 'ccob_qe_all_byREB.cfg'
print(config_filename)

with open(config_filename, 'w') as ostr:
    print('[ACQUIRE]', file=ostr)
    print('BIAS', file=ostr)
    print('CCOB', file=ostr)
    print('BIAS\n', file=ostr)

    print('[BIAS]', file=ostr)
コード例 #2
0
print(led_config)

# Find the scan center, in camera coordinates
# Here, choosing the middle of Segment14 of R22_S11
raft = 'R22'
sensor = 'S11'
reb = 'Reb1'
ccdid = raft + '_' + sensor
camera = camMapper._makeCamera()
lct = LsstCameraTransforms(camera)
det = lct.getDetector(ccdid)
ref_sensor = det.getSerial()
print(ref_sensor)

if 'E2V' in ref_sensor:
    ycenter, xcenter = lct.ccdPixelToFocalMm(2304,3003,ccdid) #e2V
else:
    ycenter, xcenter = lct.ccdPixelToFocalMm(2286,3000,ccdid) #ITL
print(xcenter, ycenter)

# Scan boundaries
xmin = xcenter - Delta_x / 2.
xmax = xcenter + Delta_x / 2.
ymin = ycenter - Delta_y / 2.
ymax = ycenter + Delta_y / 2.
print(xmin, xmax, ymin, ymax)

# Scan positions, within the boundaries
xarr = np.linspace(xmin, xmax, N_x)
yarr = np.linspace(ymin, ymax, N_y)
xall = np.repeat(xarr, N_y)