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_msc_sim
Commits
b2d70812
Commit
b2d70812
authored
Jan 21, 2025
by
Zhang Xin
Browse files
pep8
parent
d0440a4a
Pipeline
#7827
passed with stage
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
observation_sim/mock_objects/FlatLED.py
View file @
b2d70812
...
@@ -137,16 +137,16 @@ class FlatLED(MockObject):
...
@@ -137,16 +137,16 @@ class FlatLED(MockObject):
a1
=
flat
[
0
].
data
[
int
(
ylen
*
i
/
5.
):
int
(
ylen
*
i
/
5.
)
+
int
(
ylen
/
5.
),
a1
=
flat
[
0
].
data
[
int
(
ylen
*
i
/
5.
):
int
(
ylen
*
i
/
5.
)
+
int
(
ylen
/
5.
),
int
(
xlen
*
j
/
6.
):
int
(
xlen
*
j
/
6.
)
+
int
(
xlen
/
6.
)]
int
(
xlen
*
j
/
6.
):
int
(
xlen
*
j
/
6.
)
+
int
(
xlen
/
6.
)]
# z = np.sin((xx+yy+xx**2+yy**2))
# z = np.sin((xx+yy+xx**2+yy**2))
# fInterp = interp2d(xx, yy, z, kind='linear')
# fInterp = interp2d(xx, yy, z, kind='linear')
X_
=
np
.
hstack
((
xx
.
flatten
()[:,
None
],
yy
.
flatten
()[:,
None
]))
X_
=
np
.
hstack
((
xx
.
flatten
()[:,
None
],
yy
.
flatten
()[:,
None
]))
Z_
=
a1
.
flatten
()
Z_
=
a1
.
flatten
()
n_x
=
np
.
arange
(
0
,
self
.
chip
.
npix_x
,
1
)
n_x
=
np
.
arange
(
0
,
self
.
chip
.
npix_x
,
1
)
n_y
=
np
.
arange
(
0
,
self
.
chip
.
npix_y
,
1
)
n_y
=
np
.
arange
(
0
,
self
.
chip
.
npix_y
,
1
)
M
,
N
=
np
.
meshgrid
(
n_x
,
n_y
)
M
,
N
=
np
.
meshgrid
(
n_x
,
n_y
)
U
=
griddata
(
X_
,
Z_
,
(
U
=
griddata
(
X_
,
Z_
,
(
M
[
0
:
self
.
chip
.
npix_y
,
0
:
self
.
chip
.
npix_x
],
M
[
0
:
self
.
chip
.
npix_y
,
0
:
self
.
chip
.
npix_x
],
N
[
0
:
self
.
chip
.
npix_y
,
0
:
self
.
chip
.
npix_x
]),
N
[
0
:
self
.
chip
.
npix_y
,
0
:
self
.
chip
.
npix_x
]),
method
=
'nearest'
).
astype
(
np
.
float32
)
method
=
'nearest'
).
astype
(
np
.
float32
)
U
=
U
/
np
.
mean
(
U
)
U
=
U
/
np
.
mean
(
U
)
flatImage
=
U
flatImage
=
U
if
LED_Img_flag
:
if
LED_Img_flag
:
...
...
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