Skip to content
Snippets Groups Projects
Commit ed9f479b authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

test: add argument to force recalc of all traces

parent e56b55d9
No related branches found
No related tags found
No related merge requests found
Pipeline #28091 passed
......@@ -57,6 +57,7 @@ def main():
parser = argparse.ArgumentParser()
parser.add_argument('--plot', '-p', action='store_true', help='plot differences')
parser.add_argument('--save', '-s', help='save plot to file')
parser.add_argument('--recalc', '-r', action='store_true', help='recalculate all traces')
parser.add_argument('IFO', help='IFO name or description file')
args = parser.parse_args()
......@@ -75,9 +76,10 @@ def main():
if not gwinc_hash:
logging.warning("GWINCPATH not specified or does not exist; skipping check for changes to matgwinc code.")
mrecalc = False
mrecalc = args.recalc
if os.path.exists(mdata_pkl):
if os.path.exists(mdata_pkl) and not mrecalc:
mrecalc = False
logging.info("loading matgwinc data {}...".format(mdata_pkl))
with open(mdata_pkl, 'rb') as f:
if sys.version_info.major > 2:
......@@ -91,8 +93,6 @@ def main():
if gwinc_hash and mdata['gwinc_hash'] != gwinc_hash:
logging.info("matgwinc hash has changed: {}".format(gwinc_hash))
mrecalc = True
else:
mrecalc = True
if mrecalc:
logging.info("calculating matgwinc noises...")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment