preprocess.py 468 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
import os
import numpy as np
from Pointing import *

# Make directories
imgDir = os.path.join(work_dir, config["mockImgDir"])
if not os.path.exists(imgDir):
    os.system("mkdir %s"%imgDir)

prefix = "MSC_"

for pointing_ID in range(len(pRA)):
    if pointing_ID not in pRange:
        continue
    fname = prefix + str(pointing_ID).rjust(7, '0')
    subImgDir = os.path.join(imgDir, fname)
    if not os.path.exists(subImgDir):
        os.system("mkdir %s"%subImgDir)