Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-sims
csst_msc_sim
Commits
255d9883
Commit
255d9883
authored
May 29, 2022
by
Fang Yuedong
Browse files
fix the crash when the path to psf/fd data is not given
parent
0ca58f1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ObservationSim/Config/Config.py
View file @
255d9883
...
...
@@ -21,8 +21,10 @@ def config_dir(config, work_dir=None, data_dir=None):
# Object catalog direcotry
path_dict
[
"cat_dir"
]
=
os
.
path
.
join
(
path_dict
[
"data_dir"
],
config
[
"input_path"
][
"cat_dir"
])
# PSF data directory
path_dict
[
"psf_dir"
]
=
os
.
path
.
join
(
path_dict
[
"data_dir"
],
config
[
"psf_setting"
][
"psf_dir"
])
path_dict
[
"fd_path"
]
=
os
.
path
.
join
(
path_dict
[
"data_dir"
],
config
[
"psf_setting"
][
"fd_path"
])
if
config
[
"psf_setting"
][
"psf_model"
]
==
"Interp"
:
path_dict
[
"psf_dir"
]
=
os
.
path
.
join
(
path_dict
[
"data_dir"
],
config
[
"psf_setting"
][
"psf_dir"
])
if
config
[
"ins_effects"
][
"field_dist"
]
==
True
:
path_dict
[
"fd_path"
]
=
os
.
path
.
join
(
path_dict
[
"data_dir"
],
config
[
"psf_setting"
][
"fd_path"
])
return
path_dict
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment