Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Liu Dezi
csst_msc_sim
Commits
255d9883
Commit
255d9883
authored
3 years ago
by
Fang Yuedong
Browse files
Options
Download
Email Patches
Plain Diff
fix the crash when the path to psf/fd data is not given
parent
0ca58f1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ObservationSim/Config/Config.py
+4
-2
ObservationSim/Config/Config.py
with
4 additions
and
2 deletions
+4
-2
ObservationSim/Config/Config.py
+
4
-
2
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
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets