(mcc,),
)
data = list(lc.fetchall())
+ # lc.execute("drop table mem.seen")
+ lc.execute("""detach database mem""")
+ lc.close()
if not data:
return 0.0, 0.0
sumsig = sum([1 / sig for _, _, sig in data])
nsigs = [1 / sig / sumsig for _, _, sig in data]
avlat = sum([lat * nsig for (lat, _, _), nsig in zip(data, nsigs)])
avlon = sum([lon * nsig for (_, lon, _), nsig in zip(data, nsigs)])
- # lc.execute("drop table mem.seen")
- lc.execute("""detach database mem""")
- lc.close()
return avlat, avlon