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
Liu Dezi
csst_msc_sim
Commits
aee08432
Commit
aee08432
authored
May 06, 2024
by
JX
😵
Browse files
Merge remote-tracking branch 'origin/develop'
parents
59153d14
7709b50d
Changes
2
Show whitespace changes
Inline
Side-by-side
ObservationSim/Instrument/Chip/Effects.py
View file @
aee08432
...
@@ -613,11 +613,11 @@ def selectCosmicRayCollection(attachedSizes, xLen, yLen,cr_pixelRatio,CR_max_siz
...
@@ -613,11 +613,11 @@ def selectCosmicRayCollection(attachedSizes, xLen, yLen,cr_pixelRatio,CR_max_siz
return
CRs
[
0
:
cr_event_num
];
return
CRs
[
0
:
cr_event_num
];
def
defineEnergyForCR
(
cr_event_size
):
def
defineEnergyForCR
(
cr_event_size
,
seed
=
12345
):
import
random
import
random
sigma
=
0.6
/
2.355
;
sigma
=
0.6
/
2.355
;
mean
=
3.3
;
mean
=
3.3
;
random
.
seed
(
seed
)
energys
=
np
.
zeros
(
cr_event_size
);
energys
=
np
.
zeros
(
cr_event_size
);
for
i
in
np
.
arange
(
cr_event_size
):
for
i
in
np
.
arange
(
cr_event_size
):
energy_index
=
random
.
normalvariate
(
mean
,
sigma
);
energy_index
=
random
.
normalvariate
(
mean
,
sigma
);
...
@@ -677,7 +677,7 @@ def produceCR_Map(xLen, yLen, exTime, cr_pixelRatio, gain, attachedSizes, seed=2
...
@@ -677,7 +677,7 @@ def produceCR_Map(xLen, yLen, exTime, cr_pixelRatio, gain, attachedSizes, seed=2
cr_size
=
selectCosmicRayCollection
(
attachedSizes
,
xLen
,
yLen
,
cr_pixelRatio
,
CR_max_size
);
cr_size
=
selectCosmicRayCollection
(
attachedSizes
,
xLen
,
yLen
,
cr_pixelRatio
,
CR_max_size
);
cr_event_size
=
cr_size
.
shape
[
0
];
cr_event_size
=
cr_size
.
shape
[
0
];
cr_energys
=
defineEnergyForCR
(
cr_event_size
);
cr_energys
=
defineEnergyForCR
(
cr_event_size
,
seed
=
seed
);
CRmap
=
np
.
zeros
([
yLen
,
xLen
]);
CRmap
=
np
.
zeros
([
yLen
,
xLen
]);
...
...
requirements.txt
View file @
aee08432
...
@@ -3,7 +3,6 @@ astropy==6.0.1
...
@@ -3,7 +3,6 @@ astropy==6.0.1
scipy
==1.11.4
scipy
==1.11.4
GalSim
==2.5.2
GalSim
==2.5.2
PyYAML
==6.0.1
PyYAML
==6.0.1
mpi4py
==3.1.6
sep
==1.2.1
sep
==1.2.1
healpy
==1.16.6
healpy
==1.16.6
h5py
==3.11.0
h5py
==3.11.0
...
...
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