Beispiel #1
0
parser.add_argument("--threads",
                    dest="threads",
                    help="Number of threads",
                    type=str,
                    default=8)
parser.add_argument("--logmslim",
                    dest="logMSlim",
                    help="Lower limit on stellar mass",
                    type=str,
                    default=None)
args = parser.parse_args()
ncore = int(args.threads)
logSMlim = float(args.logMSlim)

# Initiate my likelihood model
model = Likelihood.Model(logSMlim, generator=True)
print("Initiated the model")
sys.stdout.flush()

# How dense should the grid be
alphas = np.linspace(p.min_alpha, p.max_alpha, p.Nalphas)
scatters = np.linspace(p.min_scatter, p.max_scatter, p.Nscatters)

# Say x-dimension corresponds to alpha, y-dimension corresponds to scatter
XX, YY = np.meshgrid(alphas, scatters)
ndim1, ndim2 = XX.shape

# Calculate the stochastic covariance matrix at these values
Niter = 40
Ntot = XX.size
                    type=str,
                    default=8)
parser.add_argument("--perccat",
                    dest="perccat",
                    help="Sets how much of the catalog to exclude",
                    type=str,
                    default=None)
args = parser.parse_args()
ncores = int(args.threads)
perccat = float(args.perccat)

cuts_def = p.load_pickle("../../Data/BMmatching/logMBcuts_def.p")
logBMlim = cuts_def[perccat]

# Initiate my likelihood model
model = Likelihood.Model(logBMlim, perccat, generator=True)
print("Initiated the model!")
sys.stdout.flush()

alphas = np.linspace(p.min_alpha, p.max_alpha, p.Nalphas)
scatters = np.linspace(p.min_scatter, p.max_scatter, p.Nscatters)

# Say x-dimension corresponds to alpha, y-dimension corresponds to scatter
XX, YY = np.meshgrid(alphas, scatters)
ndim1, ndim2 = XX.shape
# Calculate the stochastic covariance matrix at these values
Niter = 1
covmats = np.zeros(shape=(ndim1, ndim2, p.nbins, p.nbins))
Ntot = XX.size
k = 1
extime = list()