runExposure.py 830 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
from ObservationSim import Observation
from Pointing import *
import os
import numpy as np
import galsim

import gc
gc.enable()

#############################################
# Testing run one exposure (NOT using MPI)
ipoint = 2
pointRa = float('{:8.4f}'.format(pRA[ipoint]))
pointDec = float('{:8.4f}'.format(pDEC[ipoint]))

cat_dir = 'point_RA' + str(pointRa) + '_DE' + str(pointDec) + '/'
obs = Observation(input_cat_dir=cat_dir, work_dir=work_dir, data_dir=data_dir)
obs = Observation(work_dir=work_dir, data_dir=data_dir)
obs.runExposure(ra_cen=pointRa, dec_cen=pointDec, pointing_ID=ipoint, oneChip=16)

#############################################
# Testing run pointing list (using MPI)
# obs = Observation(work_dir=work_dir, data_dir=data_dir)
# obs.runExposure_MPI_PointingList(ra_cen=pRA, dec_cen=pDEC, pRange=pRange)