import json,sys,os
ids={c['id'] for c in json.load(open('missing200.json'))}
have={}
if os.path.exists('erecover.txt'):
    for ln in open('erecover.txt'):
        if ln.strip(): a,b=ln.strip().split(','); have[int(a)]=b
for t in sys.argv[1].split():
    a,b=t.split(':'); a=int(a)
    assert a in ids, 'cell %d is not in the missing list'%a
    float(b); have[a]=b
with open('erecover.txt','w') as f:
    for a in sorted(have): f.write('%d,%s\n'%(a,have[a]))
print('erecover.txt now has %d/%d'%(len(have),len(ids)))
