Commit 06298943 authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

debug

parent 9351e427
Pipeline #6966 failed with stage
in 0 seconds
......@@ -27,14 +27,7 @@ from scipy.interpolate import interp1d
import astropy.coordinates as coord
import ctypes
import sys
<<<<<<< HEAD
sys.path.append('./csst_ifs_sim')
=======
from .ifs_so import cdm03bidir
##sys.path.append('./csst_ifs_sim')
>>>>>>> 3c92e871e126af516215590e5354597cadc796d9
conf.auto_max_age = None
"""
......@@ -241,15 +234,11 @@ class CDM03bidir():
#################################################################################
###modify
#sys.path.append('../so')
<<<<<<< HEAD
try:
from ifs_so import cdm03bidir
except:
from .ifs_so import cdm03bidir
=======
>>>>>>> 3c92e871e126af516215590e5354597cadc796d9
# from ifs_so.cdm03.cpython-38-x86_64-linux-gnu import cdm03bidir
# import cdm03bidir
CTIed = cdm03bidir.cdm03(np.asfortranarray(data),
......@@ -1947,7 +1936,7 @@ class IFSsimulator():
###############################################################################
###############################################################################
def configure(self, sourcein, dir_path, result_path, simnumber, debug, applyhole):
def configure(self, simnumber):
"""
......@@ -1971,16 +1960,6 @@ class IFSsimulator():
self.processConfigs()
self._createEmpty()
self.information['dir_path']=dir_path
self.information['result_path']=result_path
self.information['debug'] = debug
self.source=sourcein
self.simnumber=simnumber
############################################################
......@@ -1988,9 +1967,10 @@ class IFSsimulator():
result_day = now.strftime("%Y-%m-%d")
# self.information['holemask']
if self.source == 'LAMP':
if applyhole == 'yes':
if self.information['holemask'] == 'yes':
ss = '_with_hole_'
else:
ss = '_no_hole_'
......@@ -1998,23 +1978,18 @@ class IFSsimulator():
else:
ss = '_'
# if self.information['dir_path'] == '/nfsdata/share/simulation-unittest/ifs_sim/':
# self.result_path = self.information['dir_path'] + \
# self.information['result_path']+'/'+self.source+ss+result_day
# else:
if self.information['dir_path'] == '/nfsdata/share/simulation-unittest/ifs_sim/':
self.result_path = self.information['dir_path'] + \
self.information['result_path']+'/'+self.source+ss+result_day
else:
# home_path = os.environ['HOME']
home_path = os.environ['HOME']
# if home_path == '/home/yan':
if home_path == '/home/yan':
# self.result_path = '../IFS_simData/'+self.source+ss+result_day
# else:
# self.result_path = '/data/ifspip/CCD_ima/'+self.source+ss+result_day
self.result_path= self.information['result_path']+'/'+self.source+ss+result_day
print(self.information['result_path'])
self.result_path = '../IFS_simData/'+self.source+ss+result_day
else:
self.result_path = '/data/ifspip/CCD_ima/'+self.source+ss+result_day
if os.path.isdir(self.result_path) == False:
os.mkdir(self.result_path)
......@@ -5491,8 +5466,7 @@ class IFSsimulator():
self.source = sourcein
self.simnumber = simnumber
#self.configure(simnumber,dir_path,result_path) # print the configfile name and path;
self.configure(simnumber) # print the configfile name and path;
self.debug = self.information['debug']
......@@ -5762,7 +5736,7 @@ class IFSsimulator():
############################################################################
def runIFSsim(sourcein, configfile, dir_path, result_path, iLoop, debug, applyhole):
def runIFSsim(sourcein, configfile, dir_path, iLoop, debug, applyhole='no'):
"""
......@@ -5786,9 +5760,6 @@ def runIFSsim(sourcein, configfile, dir_path, result_path, iLoop, debug, applyho
simulate = dict()
simulate[iLoop] = IFSsimulator(configfile)
simulate[iLoop].configure(sourcein, dir_path, result_path, iLoop, debug, applyhole) # load the configfile;
if applyhole == 'yes' and sourcein == 'LAMP':
simulate[iLoop].information['holemask'] = 'yes'
......@@ -5796,12 +5767,10 @@ def runIFSsim(sourcein, configfile, dir_path, result_path, iLoop, debug, applyho
simulate[iLoop].information['holemask'] = 'no'
### dir_path = os.path.join(os.environ['UNIT_TEST_DATA_ROOT'], 'ifs_sim/')
# simulate[iLoop].information['dir_path'] = dir_path
simulate[iLoop].information['dir_path'] = dir_path
simulate[iLoop].information['debug'] = debug
# simulate[iLoop].information['debug'] = debug
# simulate[iLoop].information['result_path'] = result_path
simulate[iLoop].simulate(sourcein, iLoop)
return 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment