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
99502553
Commit
99502553
authored
Oct 26, 2024
by
Wei Chengliang
Browse files
update codestyle-PEP8
parent
5fd170d7
Pipeline
#7108
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
observation_sim/sim_steps/readout_output.py
View file @
99502553
...
...
@@ -25,36 +25,36 @@ def add_prescan_overscan(self, chip, filt, tel, pointing, catalog, obs_param):
def
add_crosstalk
(
self
,
chip
,
filt
,
tel
,
pointing
,
catalog
,
obs_param
):
crosstalk
=
np
.
zeros
([
16
,
16
])
crosstalk
[
0
,:]
=
np
.
array
([
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
1
,:]
=
np
.
array
([
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
2
,:]
=
np
.
array
([
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
3
,:]
=
np
.
array
([
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
4
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
5
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
6
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
7
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
8
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
9
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
10
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
11
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
12
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
])
crosstalk
[
13
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
])
crosstalk
[
14
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
])
crosstalk
[
15
,:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
])
crosstalk
=
np
.
zeros
([
16
,
16
])
crosstalk
[
0
,
:]
=
np
.
array
([
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
1
,
:]
=
np
.
array
([
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
2
,
:]
=
np
.
array
([
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
3
,
:]
=
np
.
array
([
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
4
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
5
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
6
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
7
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
8
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
9
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
10
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
11
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
,
0.
,
0.
])
crosstalk
[
12
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
,
0.
,
0.
])
crosstalk
[
13
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
,
0.
,
0.
])
crosstalk
[
14
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1.
,
1e-4
])
crosstalk
[
15
,
:]
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
1e-4
,
1.
])
# 2*8 -> 1*16
img
=
formatOutput
(
chip
.
img
)
ny
,
nx
=
img
.
array
.
shape
nsecy
=
1
nsecx
=
16
nsecy
=
1
nsecx
=
16
dy
=
int
(
ny
/
nsecy
)
dx
=
int
(
nx
/
nsecx
)
newimg
=
galsim
.
Image
(
nx
,
ny
,
init_value
=
0
)
for
i
in
range
(
16
):
for
j
in
range
(
16
):
newimg
.
array
[:,
int
(
i
*
dx
):
int
(
i
*
dx
+
dx
)]
+=
crosstalk
[
i
,
j
]
*
img
.
array
[:,
int
(
j
*
dx
):
int
(
j
*
dx
+
dx
)]
newimg
.
array
[:,
int
(
i
*
dx
):
int
(
i
*
dx
+
dx
)]
+=
crosstalk
[
i
,
j
]
*
img
.
array
[:,
int
(
j
*
dx
):
int
(
j
*
dx
+
dx
)]
# 1*16 -> 2*8
newimg
=
formatRevert
(
newimg
)
...
...
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