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
bc7cdc7a
Commit
bc7cdc7a
authored
May 06, 2024
by
Yan Zhaojun
Browse files
debug
parent
8698ca3a
Pipeline
#4335
passed with stage
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
csst_mci_sim/csst_mci_sim.py
View file @
bc7cdc7a
...
...
@@ -330,19 +330,19 @@ class StrayLight(object):
###############################################################################
###############################################################################
#
def make_c_coor(fov, step):
#
"""
#
Draw the mesh grids for a fov * fov box with given step .
#
"""
def
make_c_coor
(
fov
,
step
):
"""
Draw the mesh grids for a fov * fov box with given step .
"""
#
nc=int(fov/step)
nc
=
int
(
fov
/
step
)
#
bs=fov
#
ds = bs / nc
#
xx01 = np.linspace(-bs / 2.0, bs / 2.0 - ds, nc) + 0.5 * ds
#
xx02 = np.linspace(-bs / 2.0, bs / 2.0 - ds, nc) + 0.5 * ds
#
xg2, xg1 = np.meshgrid(xx01, xx02)
#
return xg1, xg2
bs
=
fov
ds
=
bs
/
nc
xx01
=
np
.
linspace
(
-
bs
/
2.0
,
bs
/
2.0
-
ds
,
nc
)
+
0.5
*
ds
xx02
=
np
.
linspace
(
-
bs
/
2.0
,
bs
/
2.0
-
ds
,
nc
)
+
0.5
*
ds
xg2
,
xg1
=
np
.
meshgrid
(
xx01
,
xx02
)
return
xg1
,
xg2
##############################################################################
...
...
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