import os
import sys
import notscared.cpa as cpa
import notscared.data.trace_handler as trace_handler
if __name__ == '__main__':
if len(sys.argv) != 3:
print("Usage: python cpa_verification.py <zarr_file> <useTiled?>")
sys.exit(1)
db_name = sys.argv[1]
proj_root = os.getcwd()
filename = os.path.join(proj_root, db_name)
useTiledExample = sys.argv[2]
if (useTiledExample):
tile_coordinates = [(0, 0), (0, 1)]
batchStart = 0
else:
tile_coordinates = []
batchStart = 75001
th = trace_handler.TraceHandler(fileName=filename,
batchSize=5000,
batchStart=batchStart,
tiles_coordinates=tile_coordinates)
cparesults = cpa.CPA(Tracehandler=th,
Bytes=[0,1], # [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],
)
cparesults.run()
cparesults.publish()