Pointing.py 707 Bytes
Newer Older
Fang Yuedong's avatar
Fang Yuedong committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
import numpy as np
from Config import ReadConfig

work_dir = "/public/home/fangyuedong/CSST_new_framework/test/"
data_dir = "/data/simudata/CSSOSDataProductsSims/data/"

config_file = os.path.join(work_dir, "ObservationSim.cfg")
config = ReadConfig(config_file)

# Read Pointing list
pointing_file = os.path.join(data_dir, "pointing10_20210202.dat")
f = open(pointing_file, 'r')
for _ in range(1):
    header = f.readline()
iline = 0
pRA = []
pDEC = []
for line in f:
    line = line.strip()
    columns = line.split()
    pRA.append(float(columns[0]))
    pDEC.append(float(columns[1]))
f.close()
pRA = np.array(pRA)
pDEC = np.array(pDEC)

# Define the range of pointing list
pRange = range(0, 3)