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
94c62f0a
Commit
94c62f0a
authored
Jul 10, 2023
by
Fang Yuedong
Browse files
move CTE effect before adding bias
parent
042e55d9
Changes
1
Show whitespace changes
Inline
Side-by-side
ObservationSim/Instrument/Chip/Chip.py
View file @
94c62f0a
...
...
@@ -515,21 +515,6 @@ class Chip(FocalPlane):
if
config
[
"ins_effects"
][
"add_badcolumns"
]
==
True
:
img
=
effects
.
BadColumns
(
img
,
seed
=
SeedBadColumns
,
chipid
=
self
.
chipID
,
logger
=
self
.
logger
)
# Add Bias level
if
config
[
"ins_effects"
][
"add_bias"
]
==
True
:
if
self
.
logger
is
not
None
:
self
.
logger
.
info
(
" Adding Bias level and 16-channel non-uniformity"
)
else
:
print
(
" Adding Bias level and 16-channel non-uniformity"
)
if
config
[
"ins_effects"
][
"bias_16channel"
]
==
True
:
img
=
effects
.
AddBiasNonUniform16
(
img
,
bias_level
=
float
(
self
.
bias_level
),
nsecy
=
2
,
nsecx
=
8
,
seed
=
SeedBiasNonuni
+
self
.
chipID
,
logger
=
self
.
logger
)
elif
config
[
"ins_effects"
][
"bias_16channel"
]
==
False
:
img
+=
self
.
bias_level
# Apply Nonlinearity on the chip image
if
config
[
"ins_effects"
][
"non_linear"
]
==
True
:
if
self
.
logger
is
not
None
:
...
...
@@ -554,6 +539,21 @@ class Chip(FocalPlane):
print
(
" Apply CTE Effect"
)
img
=
effects
.
CTE_Effect
(
GSImage
=
img
,
threshold
=
27
)
# Add Bias level
if
config
[
"ins_effects"
][
"add_bias"
]
==
True
:
if
self
.
logger
is
not
None
:
self
.
logger
.
info
(
" Adding Bias level and 16-channel non-uniformity"
)
else
:
print
(
" Adding Bias level and 16-channel non-uniformity"
)
if
config
[
"ins_effects"
][
"bias_16channel"
]
==
True
:
img
=
effects
.
AddBiasNonUniform16
(
img
,
bias_level
=
float
(
self
.
bias_level
),
nsecy
=
2
,
nsecx
=
8
,
seed
=
SeedBiasNonuni
+
self
.
chipID
,
logger
=
self
.
logger
)
elif
config
[
"ins_effects"
][
"bias_16channel"
]
==
False
:
img
+=
self
.
bias_level
# Add Read-out Noise
if
config
[
"ins_effects"
][
"add_readout"
]
==
True
:
seed
=
int
(
config
[
"random_seeds"
][
"seed_readout"
])
+
pointing_ID
*
30
+
self
.
chipID
...
...
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