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_cpic_sim
Commits
e2f6c6e6
Commit
e2f6c6e6
authored
May 08, 2025
by
GZhao
Browse files
update pep8
parent
72c1f3f5
Pipeline
#8267
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_cpic_sim/camera.py
View file @
e2f6c6e6
...
...
@@ -786,7 +786,7 @@ class CpicVisEmccd(object):
"""
if
seed
!=
-
1
:
np
.
random
.
seed
(
seed
)
expt
=
expt_set
if
expt_set
==
0
:
expt
=
0.001
...
...
@@ -849,7 +849,6 @@ class CpicVisEmccd(object):
image_shutter
=
np
.
random
.
poisson
(
image_shutter
)
image
[:,
self
.
pscan1
+
self
.
ldark
:
-
self
.
oscan1
-
self
.
rdark
]
+=
image_shutter
if
self
.
switch
[
'cic'
]:
cic_frame
=
np
.
zeros
((
self
.
dark_shape
[
0
],
self
.
bias_shape
[
1
]))
+
self
.
cic
image
[
self
.
pscan2
:
-
self
.
oscan2
,
:]
+=
np
.
random
.
poisson
(
cic_frame
)
...
...
@@ -860,12 +859,8 @@ class CpicVisEmccd(object):
# >>> for _ in range(self.emreg_num):
# >>> image += np.random.binomial(image, pEM)
# This code is too slow, so we used a modified gamma
em_fix
=
self
.
em_fix_fuc_fit
(
emgain
)
*
emgain
image
=
np
.
random
.
gamma
(
image
,
em_fix
)
+
image
*
(
emgain
-
em_fix
)
if
self
.
switch
[
'em_blooming'
]:
image
=
self
.
emregester_blooming
(
image
)
...
...
@@ -879,7 +874,6 @@ class CpicVisEmccd(object):
residual
=
np
.
random
.
binomial
(
image
,
1
-
big_cte
)
image
[:,
1
:]
+=
residual
[:,
:
-
1
]
-
residual
[:,
1
:]
bias
=
self
.
bias_frame
()
image
=
image
/
self
.
ph_per_adu
+
bias
...
...
csst_cpic_sim/io.py
View file @
e2f6c6e6
...
...
@@ -54,7 +54,6 @@ def check_and_update_fits_header(header):
hdu
=
'hdu1'
dm_comment
=
{}
def
print_warning
(
info
):
if
header_check
:
log
.
warning
(
info
)
...
...
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