Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove qed input from ekobox.apply.apply_pdf #1841

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ requirements:
- sphinxcontrib-bibtex
- curio >=1.0
- pineappl >=0.5.8
- eko >=0.13.5,<0.14
- eko >=0.14.0
- banana-hep >=0.6.8
- fiatlux

Expand Down
24 changes: 5 additions & 19 deletions n3fit/src/evolven3fit_new/evolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@


def evolve_fit(
fit_folder,
q_fin,
q_points,
op_card_dict,
theory_card_dict,
force,
eko_path=None,
dump_eko=None,
fit_folder, q_fin, q_points, op_card_dict, theory_card_dict, force, eko_path=None, dump_eko=None
):
"""
Evolves all the fitted replica in fit_folder/nnfit
Expand Down Expand Up @@ -105,8 +98,6 @@ def evolve_fit(
theory = eko_op.theory_card
op = eko_op.operator_card

qed = theory.order[1] > 0

# Modify the info file with the fit-specific info
info = info_file.build(theory, op, 1, info_update={})
info["NumMembers"] = "REPLACE_NREP"
Expand All @@ -119,7 +110,7 @@ def evolve_fit(
dump_info_file(usr_path, info)

for replica, pdf_data in initial_PDFs_dict.items():
evolved_blocks = evolve_exportgrid(pdf_data, eko_op, x_grid, qed)
evolved_blocks = evolve_exportgrid(pdf_data, eko_op, x_grid)
dump_evolved_replica(evolved_blocks, usr_path, int(replica.removeprefix("replica_")))

# remove folder:
Expand Down Expand Up @@ -152,7 +143,7 @@ def load_fit(usr_path):
return pdf_dict


def evolve_exportgrid(exportgrid, eko, x_grid, qed):
def evolve_exportgrid(exportgrid, eko, x_grid):
"""
Evolves the provided exportgrid for the desired replica with the eko and returns the evolved block

Expand All @@ -164,8 +155,6 @@ def evolve_exportgrid(exportgrid, eko, x_grid, qed):
eko operator for evolution
xgrid: list
xgrid to be used as the targetgrid
qed: bool
whether qed is activated or not
Returns
-------
: list(np.array)
Expand All @@ -175,7 +164,7 @@ def evolve_exportgrid(exportgrid, eko, x_grid, qed):
pdf_grid = np.array(exportgrid["pdfgrid"]).transpose()
pdf_to_evolve = utils.LhapdfLike(pdf_grid, exportgrid["q20"], x_grid)
# evolve pdf
evolved_pdf = apply.apply_pdf(eko, pdf_to_evolve, qed=qed)
evolved_pdf = apply.apply_pdf(eko, pdf_to_evolve)
# generate block to dump
targetgrid = eko.bases.targetgrid.tolist()

Expand All @@ -193,10 +182,7 @@ def pdf_xq2(pid, x, Q2):
return x * evolved_pdf[(Q2, nf)]["pdfs"][pid][x_idx]

block = genpdf.generate_block(
pdf_xq2,
xgrid=targetgrid,
sorted_q2grid=q2grid,
pids=basis_rotation.flavor_basis_pids,
pdf_xq2, xgrid=targetgrid, sorted_q2grid=q2grid, pids=basis_rotation.flavor_basis_pids
)
blocks.append(block)

Expand Down