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
058383b4
Commit
058383b4
authored
May 10, 2022
by
Fang Yuedong
Browse files
extended the magnitude cut on brighter end to mag_sat-2.5, updated random seeds in dark and flat
parent
3aa0572f
Changes
4
Hide whitespace changes
Inline
Side-by-side
ObservationSim/Instrument/Chip/Chip.py
View file @
058383b4
...
...
@@ -509,6 +509,7 @@ class Chip(FocalPlane):
ncombine
=
1
,
read_noise
=
self
.
read_noise
,
gain
=
1
,
seed
=
SeedBiasNonuni
+
self
.
chipID
,
logger
=
self
.
logger
)
# Readout noise for Biases is not generated with random seeds. So readout noise for bias images can't be reproduced.
if
config
[
"ins_effects"
][
"cosmic_ray"
]
==
True
:
if
config
[
"ins_effects"
][
"cray_differ"
]
==
True
:
cr_map
,
cr_event_num
=
effects
.
produceCR_Map
(
...
...
@@ -636,7 +637,7 @@ class Chip(FocalPlane):
# Add Read-out Noise
if
config
[
"ins_effects"
][
"add_readout"
]
==
True
:
seed
=
int
(
config
[
"random_seeds"
][
"seed_readout"
])
+
pointing_ID
*
30
+
self
.
chipID
seed
=
int
(
config
[
"random_seeds"
][
"seed_readout"
])
+
pointing_ID
*
30
+
self
.
chipID
+
3
rng_readout
=
galsim
.
BaseDeviate
(
seed
)
readout_noise
=
galsim
.
GaussianNoise
(
rng
=
rng_readout
,
sigma
=
self
.
read_noise
)
FlatCombImg
.
addNoise
(
readout_noise
)
...
...
@@ -758,7 +759,7 @@ class Chip(FocalPlane):
# Add Read-out Noise
if
config
[
"ins_effects"
][
"add_readout"
]
==
True
:
seed
=
int
(
config
[
"random_seeds"
][
"seed_readout"
])
+
pointing_ID
*
30
+
self
.
chipID
seed
=
int
(
config
[
"random_seeds"
][
"seed_readout"
])
+
pointing_ID
*
30
+
self
.
chipID
+
2
rng_readout
=
galsim
.
BaseDeviate
(
seed
)
readout_noise
=
galsim
.
GaussianNoise
(
rng
=
rng_readout
,
sigma
=
self
.
read_noise
)
DarkCombImg
.
addNoise
(
readout_noise
)
...
...
ObservationSim/Instrument/Chip/Effects.py
View file @
058383b4
...
...
@@ -197,7 +197,7 @@ def MakeFlatSmooth(GSBounds, seed):
Flty
,
Fltx
=
np
.
mgrid
[
ymin
:(
ymax
+
1
),
xmin
:(
xmax
+
1
)]
rg
=
Generator
(
PCG64
(
int
(
seed
)))
p1
,
p2
,
bg
=
rg
.
poisson
(
1000
,
3
)
Fltz
=
1e-
6
*
(
a1
*
(
Fltx
-
p1
)
**
2
+
a2
*
(
Flty
-
p2
)
**
2
-
a3
*
Fltx
-
a4
*
Flty
)
+
bg
*
20
Fltz
=
0.6
*
1e-
7
*
(
a1
*
(
Fltx
-
p1
)
**
2
+
a2
*
(
Flty
-
p2
)
**
2
-
a3
*
Fltx
-
a4
*
Flty
)
+
bg
*
20
FlatImg
=
galsim
.
ImageF
(
Fltz
)
return
FlatImg
...
...
ObservationSim/Instrument/Filter.py
View file @
058383b4
...
...
@@ -40,7 +40,7 @@ class Filter(object):
# self.filter_dir = filter_param.filter_dir
def
is_too_bright
(
self
,
mag
):
return
mag
<=
self
.
mag_saturation
-
1.0
return
mag
<=
self
.
mag_saturation
-
2.5
# return mag <= 14.0
def
is_too_dim
(
self
,
mag
):
...
...
setup.py
View file @
058383b4
...
...
@@ -26,7 +26,7 @@ extensions = [
setup
(
name
=
'CSSTSim'
,
version
=
'0.
3
'
,
version
=
'0.
5
'
,
packages
=
find_packages
(),
# install_requires=[
# 'numpy>=1.18.5',
...
...
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