Commit 6041fe88 authored by Fang Yuedong's avatar Fang Yuedong
Browse files

bug fix: crash when --catalog not given

parent 4f12b49b
...@@ -85,9 +85,10 @@ def run_sim(): ...@@ -85,9 +85,10 @@ def run_sim():
# Initialize the simulation # Initialize the simulation
if args.catalog is not None: if args.catalog is not None:
catalog_module = importlib.import_module('Catalog.'+args.catalog) catalog_module = importlib.import_module('Catalog.'+args.catalog)
obs = Observation(config=config, Catalog=catalog_module.Catalog, work_dir=config['work_dir'], data_dir=config['data_dir'])
else: else:
catalog_module = None catalog_module = None
obs = Observation(config=config, Catalog=catalog_module.Catalog, work_dir=config['work_dir'], data_dir=config['data_dir']) obs = Observation(config=config, Catalog=None, work_dir=config['work_dir'], data_dir=config['data_dir'])
# Run simulation # Run simulation
obs.runExposure_MPI_PointingList( obs.runExposure_MPI_PointingList(
......
...@@ -4,8 +4,8 @@ date ...@@ -4,8 +4,8 @@ date
python3 /public/home/fangyuedong/project/csst-simulation/run_sim.py \ python3 /public/home/fangyuedong/project/csst-simulation/run_sim.py \
--config_file config_overall.yaml \ --config_file config_overall.yaml \
--catalog C6_50sqdeg \ -c /public/home/fangyuedong/project/csst-simulation/config \
-c /public/home/fangyuedong/project/csst-simulation/config --catalog C6_50sqdeg
# python3 /share/home/fangyuedong/20231211/csst-simulation/run_sim.py \ # python3 /share/home/fangyuedong/20231211/csst-simulation/run_sim.py \
# --config_file config_C6_dev.yaml \ # --config_file config_C6_dev.yaml \
......
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