Skip to content

Conversation

@bryates
Copy link
Contributor

@bryates bryates commented Aug 29, 2025

This is a very rough sketch for dynamically making restrict cards. Right now I have a lot of WCs hard coded (and they're the SMEFTsim_topU3l versions so we need to change them to SMEFTsim_top) so this will require some refactoring if we want to automate things.

The basic idea is we set all the WCs not passed in the dof_list to zero, and the ones in dof_list to their starting points. I haven't tested this with SLINSPACE yet, but I think this option loops over dof_list so it might work as is for each single WC.

@bryates bryates requested a review from Andrew42 August 29, 2025 13:50
@bryates bryates changed the base branch from master to SMEFTsim_run3 August 29, 2025 15:55
@bryates bryates requested a review from kmohrman August 29, 2025 15:56
Comment on lines 207 to 209
if self.ops['restrict']: new += f'-massless_{self.ops["process"]}'
if len(list(self.ops['coeffs'])) == 1:
new += f'_{list(self.ops["coeffs"])[0]}'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Andrew42 I had to make this change. I know you prefer each block of code to do one thing, but I found that when we submit 1 WC at a time, the restrict card has been overwritten before the previous job is finished packaging up everything. This tacks on the WC to the name in the replace line.

Copy link

Choose a reason for hiding this comment

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

thanks for trying it out already. I knew that something like this was going to be an issue, but needed to test it myself before figuring out how I wanted to fix it. I think this is close to what I had in mind, but I think I'll move it outside of the Gridpack class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good.

Comment on lines 239 to 241
if len(list(self.ops['coeffs'])) == 1:
ompath = ompath[:-4] + f'_{list(self.ops["coeffs"])[0]}.dat'
make_restrict_card(mpath, ompath, keep=True, SMEFT=list(self.ops['coeffs']))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Andrew42 similar thing here, if there's only 1 WC, it adds the it to the name.

Comment on lines 139 to 141
x = l.split(' # ')
if len(x) == 1:
continue
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found some lines that matched this ' # ' but had nothing else, so they failed list unpacking below.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants