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_mci_sim
Commits
dee31bea
Commit
dee31bea
authored
Jan 24, 2025
by
Yan Zhaojun
Browse files
update
parent
0659fdd5
Pipeline
#7892
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_mci_sim/csst_mci_sim.py
View file @
dee31bea
...
...
@@ -1579,32 +1579,32 @@ class MCIsimulator():
self
.
information
[
'dec_obj'
]
=
self
.
star
[
'dec_gaia'
].
mean
()
nsrcs
=
len
(
self
.
star
[
'ra_gaia'
])
if
get_file_extension
(
starcat
)
==
'.fits'
:
#
if get_file_extension(starcat) == '.fits':
self
.
log
.
info
(
'Stat catlog file name is %s'
%
(
starcat
))
#
self.log.info('Stat catlog file name is %s' % (starcat))
df0
=
fits
.
open
(
self
.
information
[
'dir_path'
]
+
'/MCI_inputData/star_input/'
+
starcat
)
#
df0 = fits.open(
#
self.information['dir_path']+'/MCI_inputData/star_input/'+starcat)
self
.
star
=
df0
[
1
].
data
###
#
self.star = df0[1].data
#
###
if
'ra'
not
in
self
.
star
.
names
or
'dec'
not
in
self
.
star
.
names
:
print
(
'no ra'
)
self
.
log
.
error
(
'Error,no ra or dec data in the star_cat catlog file '
)
raise
ValueError
(
'Error,no ra or dec data in the star_cat catlog file '
)
#
if 'ra' not in self.star.names or 'dec' not in self.star.names:
#
print('no ra')
#
self.log.error(
#
'Error,no ra or dec data in the star_cat catlog file ')
#
raise ValueError(
#
'Error,no ra or dec data in the star_cat catlog file ')
if
self
.
star
[
'ra'
].
max
()
>
360
or
self
.
star
[
'ra'
].
min
()
<
0
or
self
.
star
[
'dec'
].
max
()
>
90
or
self
.
star
[
'dec'
].
min
()
<
-
90
:
self
.
log
.
error
(
'ra or dec data beyond definition,please check!'
)
raise
ValueError
(
'ra or dec data beyond definition,please check!'
)
#
if self.star['ra'].max() > 360 or self.star['ra'].min() < 0 or self.star['dec'].max() > 90 or self.star['dec'].min() < -90:
#
self.log.error(
#
'ra or dec data beyond definition,please check!')
#
raise ValueError(
#
'ra or dec data beyond definition,please check!')
self
.
information
[
'ra_obj'
]
=
self
.
star
[
'ra'
].
mean
()
self
.
information
[
'dec_obj'
]
=
self
.
star
[
'dec'
].
mean
()
nsrcs
=
len
(
self
.
star
[
'ra'
])
#
self.information['ra_obj'] = self.star['ra'].mean()
#
self.information['dec_obj'] = self.star['dec'].mean()
#
nsrcs = len(self.star['ra'])
##################################
...
...
@@ -2501,7 +2501,7 @@ class MCIsimulator():
if
self
.
lensing
:
filename
=
self
.
information
[
'dir_path'
]
+
\
'MCI_inputData/galaxy_Input/Lens_SED_IMG_0.025_2
41227
/Lens_img_cut_SED_'
+
\
'MCI_inputData/galaxy_Input/Lens_SED_IMG_0.025_2
30606
/Lens_img_cut_SED_'
+
\
str
(
k2
+
1
)
+
'.fits'
if
not
os
.
path
.
exists
(
filename
):
continue
...
...
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