Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Conversation

@sihyunjeon
Copy link
Contributor

No description provided.

os.system(f'cp {cards_path}/*_cuts.f {job_files_path}')


def get_proc_card(self):
Copy link
Contributor Author

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')
Copy link
Contributor Author

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


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()
Copy link
Contributor Author

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

Copy link
Contributor Author

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'})
Copy link
Contributor Author

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'})


Copy link
Contributor Author

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

dataset_dict.get('template_user', []),
template_vars)

return run_card + '\n\n'
Copy link
Contributor Author

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)

model_params_vars)

return run_card + '\n' + customize_card
return customize_card
Copy link
Contributor Author

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)

self.logger.debug(input_card)
with open(output_file_name, 'w') as output_file:
output_file.write(run_card)
output_file.write(input_card)
Copy link
Contributor Author

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

output_file.write(input_card)

def get_customize_card(self):
def get_proc_card(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply rename

return template_name.split('.', 1)[0]

def prepare_customize_card(self):
def prepare_proc_card(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simply renamed

@sihyunjeon
Copy link
Contributor Author

@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,

  1. Added a function to read proc_card.dat

for powheg,

  1. First renamed the run_card to input_card
  2. input_card is split into two run_card and customize_card
  3. These two are glued together to form one input_card

So now for every submission, I believe following 3 functions will work

  1. get_proc_card
  2. get_run_card
  3. get_customize_card
    ==> In the actions tab, can we make these three and clickable in the above order along with the fragment file? so there should be 4 icons to display cards now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants