debug result filter, with a first simple fix, better fix needed

This commit is contained in:
Justus Kuhlmann 2025-04-08 13:03:41 +00:00
parent 19dfaa3e2a
commit 67bbc25321

View file

@ -73,14 +73,15 @@ def filter_results(results, **kwargs):
if (quark_thetas[0] != param['quarks'][0]['thetas'] and quark_thetas[1] != param['quarks'][1]['thetas']) or (quark_thetas[0] != param['quarks'][1]['thetas'] and quark_thetas[1] != param['quarks'][0]['thetas']):
drops.append(ind)
continue
# careful, this is not save, when multiple contributions are present!
if 'wf1' in kwargs:
wf1 = kwargs['wf1']
if (wf1[0] != param['wf1'][0]) or (wf1[1][0] != param['wf1'][1][0]) or (wf1[1][1] != param['wf1'][1][1]):
if (wf1[0][0] != param['wf1'][0][0]) or (wf1[0][1][0] != param['wf1'][0][1][0]) or (wf1[0][1][1] != param['wf1'][0][1][1]):
drops.append(ind)
continue
if 'wf2' in kwargs:
wf2 = kwargs['wf2']
if (wf2[0] != param['wf2'][0]) or (wf2[1][0] != param['wf2'][1][0]) or (wf2[1][1] != param['wf2'][1][1]):
if (wf2[0][0] != param['wf2'][0][0]) or (wf2[0][1][0] != param['wf2'][0][1][0]) or (wf2[0][1][1] != param['wf2'][0][1][1]):
drops.append(ind)
continue
@ -91,7 +92,7 @@ def find_record(path, ensemble, correlator_name, project=None, code=None, parame
db = path + '/backlogger.db'
if os.path.exists(db):
dl.get(db, dataset=path)
results = _db_lookup(db, ensemble, correlator_name, project, code=None, parameters=None, created_before=created_before, created_after=created_after, updated_before=updated_before, updated_after=updated_after, revision=revision)
results = _db_lookup(db, ensemble, correlator_name, project, code=code, parameters=parameters, created_before=created_before, created_after=created_after, updated_before=updated_before, updated_after=updated_after, revision=revision)
results = filter_results(results, **kwargs)
print("Found " + str(len(results)) + " results")
return results.reset_index()