Skip to content

Commit

Permalink
Correcting seed logic
Browse files Browse the repository at this point in the history
  • Loading branch information
siranipour committed Feb 24, 2020
1 parent 00703a7 commit 6970c94
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions n3fit/src/n3fit/performfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ def get_pseudodata(fit: str):
runcard = fit.as_input()

t0pdfset = pdf.load_t0()
replica = range(len(pdf))
replica = range(1, len(pdf) + 1)

trvlseed, nnseed, mcseed, genrep = [runcard.get("fitting").get(i)
for i in ["trvlseed", "nnseed", "mcseed", "genrep"]]

seeds = initialize_seeds(replica, trvlseed, nnseed, mcseed, genrep)

print(seeds.trvalseeds)
for exp in runcard["experiments"]:
for dataset in exp["datasets"]:
print("###################")
Expand Down Expand Up @@ -85,7 +84,7 @@ def initialize_seeds(replica: list, trvlseed: int, nnseed: int, mcseed: int, gen
nnseeds = []
mcseeds = []
for replica_number in replica:
np.random.seed(trvalseed)
np.random.seed(trvlseed)
for i in range(replica_number):
trvalseed = np.random.randint(0, pow(2, 31))

Expand Down

0 comments on commit 6970c94

Please sign in to comment.