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
d15cfcc8
Commit
d15cfcc8
authored
3 years ago
by
Fang Yuedong
Browse files
Options
Download
Email Patches
Plain Diff
add try-except block when reading healpix
parent
7d24b403
release_v2.0
11-csst
29-darktime-exptime-shtopen-shtstat-t
C6_codes
DirectImageInSLS
current_stable_for_tests
develop
fitsStamp
liudezi-develop-patch-58263
master
new_sim
new_sim_sls
random_knots_develop
release_v1.0
sim_scheduler
sls_rot_wcs
staylight_header
wcs_test
wcs_test_gridGalaxy
v2.1.0
v2.0.0
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
internal_test_20240425
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Catalog/NGPCatalog.py
+14
-6
Catalog/NGPCatalog.py
config/config_NGP.yaml
+4
-4
config/config_NGP.yaml
with
18 additions
and
10 deletions
+18
-10
Catalog/NGPCatalog.py
+
14
-
6
View file @
d15cfcc8
...
@@ -257,15 +257,23 @@ class NGPCatalog(CatalogBase):
...
@@ -257,15 +257,23 @@ class NGPCatalog(CatalogBase):
if
"star_cat"
in
self
.
config
[
"input_path"
]
and
self
.
config
[
"input_path"
][
"star_cat"
]
and
not
self
.
config
[
"run_option"
][
"galaxy_only"
]:
if
"star_cat"
in
self
.
config
[
"input_path"
]
and
self
.
config
[
"input_path"
][
"star_cat"
]
and
not
self
.
config
[
"run_option"
][
"galaxy_only"
]:
star_cat
=
h5
.
File
(
self
.
star_path
,
'r'
)[
'catalog'
]
star_cat
=
h5
.
File
(
self
.
star_path
,
'r'
)[
'catalog'
]
for
pix
in
self
.
pix_list
:
for
pix
in
self
.
pix_list
:
stars
=
star_cat
[
str
(
pix
)]
try
:
self
.
_load_stars
(
stars
,
pix_id
=
pix
)
stars
=
star_cat
[
str
(
pix
)]
del
stars
self
.
_load_stars
(
stars
,
pix_id
=
pix
)
del
stars
except
Exception
as
e
:
self
.
logger
.
error
(
str
(
e
))
print
(
e
)
if
"galaxy_cat"
in
self
.
config
[
"input_path"
]
and
self
.
config
[
"input_path"
][
"galaxy_cat"
]
and
not
self
.
config
[
"run_option"
][
"star_only"
]:
if
"galaxy_cat"
in
self
.
config
[
"input_path"
]
and
self
.
config
[
"input_path"
][
"galaxy_cat"
]
and
not
self
.
config
[
"run_option"
][
"star_only"
]:
gals_cat
=
h5
.
File
(
self
.
galaxy_path
,
'r'
)[
'galaxies'
]
gals_cat
=
h5
.
File
(
self
.
galaxy_path
,
'r'
)[
'galaxies'
]
for
pix
in
self
.
pix_list
:
for
pix
in
self
.
pix_list
:
gals
=
gals_cat
[
str
(
pix
)]
try
:
self
.
_load_gals
(
gals
,
pix_id
=
pix
)
gals
=
gals_cat
[
str
(
pix
)]
del
gals
self
.
_load_gals
(
gals
,
pix_id
=
pix
)
del
gals
except
Exception
as
e
:
self
.
logger
.
error
(
str
(
e
))
print
(
e
)
if
self
.
logger
is
not
None
:
if
self
.
logger
is
not
None
:
self
.
logger
.
info
(
"number of objects in catalog: %d"
%
(
len
(
self
.
objs
)))
self
.
logger
.
info
(
"number of objects in catalog: %d"
%
(
len
(
self
.
objs
)))
else
:
else
:
...
...
This diff is collapsed.
Click to expand it.
config/config_NGP.yaml
+
4
-
4
View file @
d15cfcc8
...
@@ -12,14 +12,14 @@
...
@@ -12,14 +12,14 @@
# work_dir: "/public/home/fangyuedong/sim_code_release/CSST/test/"
# work_dir: "/public/home/fangyuedong/sim_code_release/CSST/test/"
work_dir
:
"
/public/home/fangyuedong/temp/CSST/workplace/"
work_dir
:
"
/public/home/fangyuedong/temp/CSST/workplace/"
data_dir
:
"
/data/simudata/CSSOSDataProductsSims/data/"
data_dir
:
"
/data/simudata/CSSOSDataProductsSims/data/"
run_name
:
"
NGP_
test
"
run_name
:
"
NGP_
Astrometry-on
"
# (Optional) a file of point list
# (Optional) a file of point list
# if you just want to run default pointing:
# if you just want to run default pointing:
# - pointing_dir: null
# - pointing_dir: null
# - pointing_file: null
# - pointing_file: null
pointing_dir
:
"
/data/simudata/CSSOSDataProductsSims/data/"
pointing_dir
:
"
/data/simudata/CSSOSDataProductsSims/data/"
pointing_file
:
"
pointing_test_NGP_
3
.dat"
pointing_file
:
"
pointing_test_NGP_
2.17
.dat"
# Whether to use MPI
# Whether to use MPI
run_option
:
run_option
:
...
@@ -34,7 +34,7 @@ run_option:
...
@@ -34,7 +34,7 @@ run_option:
out_cat_only
:
NO
out_cat_only
:
NO
# Only simulate stars?
# Only simulate stars?
star_only
:
YES
star_only
:
NO
# Only simulate galaxies?
# Only simulate galaxies?
galaxy_only
:
NO
galaxy_only
:
NO
...
@@ -73,7 +73,7 @@ obs_setting:
...
@@ -73,7 +73,7 @@ obs_setting:
# - give a list of indexes of pointings: [ip_1, ip_2...]
# - give a list of indexes of pointings: [ip_1, ip_2...]
# - run all pointings: null
# - run all pointings: null
# Note: only valid when a pointing list is specified
# Note: only valid when a pointing list is specified
run_pointings
:
[
1
]
run_pointings
:
[
5
,
7
,
11
,
14
,
19
,
60
,
70
,
82
,
88
]
# Run specific chip(s):
# Run specific chip(s):
# - give a list of indexes of chips: [ip_1, ip_2...]
# - give a list of indexes of chips: [ip_1, ip_2...]
...
...
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