Commit 7709b50d authored by Fang Yuedong's avatar Fang Yuedong
Browse files

Merge branch 'sim_scheduler' into develop

parents 5c59486a d75b3a3b
...@@ -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]);
......
...@@ -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
......
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