-
Notifications
You must be signed in to change notification settings - Fork 2
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
adding proc card displays #31
base: master
Are you sure you want to change the base?
Conversation
@@ -17,6 +17,25 @@ def prepare_default_card(self): | |||
if glob.glob(f'{cards_path}/*_cuts.f'): | |||
os.system(f'cp {cards_path}/*_cuts.f {job_files_path}') | |||
|
|||
|
|||
def get_proc_card(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't do anything in madgraph_gridpack.py
. It's only for main.py:get_proc_card
web api purposes
with open(f'{cards_path}/*_proc_card.dat') as input_file: | ||
proc_card = input_file.read() | ||
else: | ||
raise Exception(f'Could not find {cards_path} as process card') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
proc card should always exist
madgraph_gridpack.py
Outdated
|
||
if glob.glob(f'{cards_path}/*_madspin_card.dat'): | ||
with open(f'{cards_path}/*_madpsin_card.dat') as input_file: | ||
proc_card += '\n\n\n\n' + input_file.read() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
madspin card depends on situations (might not exist)
proc_card += input_file.read() | ||
|
||
return proc_card | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
madspin card depends on situation, add #### banner to split proc_card and madspin_card.dat parts
|
||
return output_text(fragment, headers={'Content-Type': 'text/plain'}) | ||
content = gridpack.get_proc_card() | ||
return output_text(content, headers={'Content-Type': 'text/plain'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are proc_card
reading part from madgraph_gridpack.get_proc_card()
|
||
return output_text(fragment, headers={'Content-Type': 'text/plain'}) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this i didn't really touch other than copy pasting to this other lines
powheg_gridpack.py
Outdated
@@ -24,6 +22,14 @@ def get_run_card(self): | |||
dataset_dict.get('template_user', []), | |||
template_vars) | |||
|
|||
return run_card + '\n\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run card and customize card are split into two now (for better api displays)
@@ -33,21 +39,21 @@ def get_run_card(self): | |||
dataset_dict.get('model_params_user', []), | |||
model_params_vars) | |||
|
|||
return run_card + '\n' + customize_card | |||
return customize_card |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run card and customize card are split into two now (for better api displays)
with open(output_file_name, 'w') as output_file: | ||
output_file.write(run_card) | ||
output_file.write(input_card) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename run_card
to input_card
following powheg input convention powheg.input
Here run_card
and customize_card
are read, glued, and written to powheg.input
|
||
def get_customize_card(self): | ||
def get_proc_card(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply rename
@@ -56,25 +62,25 @@ def get_customize_card(self): | |||
template_name = dataset_dict['template'] | |||
return template_name.split('.', 1)[0] | |||
|
|||
def prepare_customize_card(self): | |||
def prepare_proc_card(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply renamed
@ggonzr Hi geovanny, More or less there, I am not sure "where the clickable icons are defined" so this is missing but other than that i've made small changes for better visualization of the cards. for madgraph,
for powheg,
So now for every submission, I believe following 3 functions will work
|
No description provided.