Commit aee08432 authored by JX's avatar JX 😵
Browse files

Merge remote-tracking branch 'origin/develop'

parents 59153d14 7709b50d
Pipeline #4337 passed with stage
in 0 seconds
......@@ -613,11 +613,11 @@ def selectCosmicRayCollection(attachedSizes, xLen, yLen,cr_pixelRatio,CR_max_siz
return CRs[0:cr_event_num];
def defineEnergyForCR(cr_event_size):
def defineEnergyForCR(cr_event_size,seed = 12345):
import random
sigma = 0.6 / 2.355;
mean = 3.3;
random.seed(seed)
energys = np.zeros(cr_event_size);
for i in np.arange(cr_event_size):
energy_index = random.normalvariate(mean,sigma);
......@@ -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_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]);
......
......@@ -3,7 +3,6 @@ astropy==6.0.1
scipy==1.11.4
GalSim==2.5.2
PyYAML==6.0.1
mpi4py==3.1.6
sep==1.2.1
healpy==1.16.6
h5py==3.11.0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment