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_ifs_sim
Commits
33afd063
Commit
33afd063
authored
May 12, 2025
by
Yan Zhaojun
Browse files
Replace csst_ifs_sim.py
parent
414ca60c
Pipeline
#8287
passed with stage
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
csst_ifs_sim/csst_ifs_sim.py
View file @
33afd063
...
...
@@ -718,7 +718,8 @@ class StrayLight(object):
self
.
ecliptic
=
self
.
equator
.
transform_to
(
'barycentrictrueecliptic'
)
self
.
pointing
=
transRaDec2D
(
radec
[
0
],
radec
[
1
])
self
.
slcdll
=
ctypes
.
CDLL
(
os
.
path
.
join
(
self
.
path
,
'IFS_inputdata/refs/libstraylight.so'
))
# dylib
# dylib
os
.
path
.
join
(
self
.
path
,
'IFS_inputdata/refs/libstraylight.so'
))
self
.
slcdll
.
Calculate
.
argtypes
=
[
ctypes
.
c_double
,
ctypes
.
POINTER
(
ctypes
.
c_double
),
ctypes
.
POINTER
(
ctypes
.
c_double
),
ctypes
.
POINTER
(
...
...
@@ -2290,8 +2291,10 @@ class IFSsimulator():
crImage_r
=
np
.
zeros
((
3072
,
6144
),
dtype
=
float
)
# cosmic ray instance
cosmics_b
=
cosmicrays
(
self
.
log
,
crImage_b
,
self
.
information
[
'exptime'
],
crInfo
=
self
.
cr
)
cosmics_r
=
cosmicrays
(
self
.
log
,
crImage_r
,
self
.
information
[
'exptime'
],
crInfo
=
self
.
cr
)
cosmics_b
=
cosmicrays
(
self
.
log
,
crImage_b
,
self
.
information
[
'exptime'
],
crInfo
=
self
.
cr
)
cosmics_r
=
cosmicrays
(
self
.
log
,
crImage_r
,
self
.
information
[
'exptime'
],
crInfo
=
self
.
cr
)
CCD_cr_b
=
cosmics_b
.
addUpToFraction
(
self
.
information
[
'coveringfraction'
]
*
self
.
information
[
'exptime'
]
/
300.0
,
limit
=
None
)
...
...
@@ -5606,7 +5609,7 @@ class IFSsimulator():
##############################################################
sn
=
self
.
simnumber
-
1
Num
=
int
(
self
.
information
[
'exptime'
]
/
60
)
Num
=
int
(
self
.
information
[
'exptime'
]
/
60
)
arr
=
np
.
array
(
df
[
'time'
][
sn
*
Num
:
sn
*
Num
+
Num
])
self
.
exptime_start_jd
,
self
.
exptime_start_index
=
find_min
(
arr
)
...
...
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