Skip to content

Commit

Permalink
remove commas
Browse files Browse the repository at this point in the history
  • Loading branch information
t7phy committed Mar 25, 2024
1 parent 2801ac1 commit 2f9159b
Show file tree
Hide file tree
Showing 9 changed files with 3,200 additions and 3,190 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import artunc
import yaml
import re
from pathlib import Path

from math import sqrt

Expand Down Expand Up @@ -460,4 +462,12 @@ def processData():
with open('uncertainties_dSig_dyttBar_norm.yaml', 'w') as file:
yaml.dump(uncertainties_dSig_dyttBar_norm_yaml, file, sort_keys=False)

def remove_commas():
pattern = "uncertainties*.yaml"
reg = re.compile(fr'({"sys,"})')
for file in Path(".").glob(pattern):
new_text = reg.sub("syst_", file.read_text())
file.write_text(new_text)

processData()
remove_commas()
Loading

0 comments on commit 2f9159b

Please sign in to comment.