Compare commits

..

No commits in common. "91beefeb74a10ba9832dc3c3ab084afa96322097" and "917570b9e050d3e8cd4916f7937256ddce3f328a" have entirely different histories.

2 changed files with 17 additions and 20 deletions

View file

@ -1,6 +1,23 @@
#! /usr/bin/python3
import argparse
import numpy as np
import pandas as pd
class Banana():
def read_from_file(self, filepath):
d={'clock':[], 'sl':[], 'channel':[], 'dtime':[], 'lost':[], 'a':[], 'b':[], 'phase':[], 'banana':[], 'pha':[]} # slice (sl) is called det in ahepamfile.c
keys = list(d.keys())
print(keys)
with open(filepath) as file:
for line in file:
contents = line.split(" ")
if contents[0] == "ED":
for i in range(10):
d[keys[i]].append(contents[i+1])
return pd.DataFrame(d)
if __name__ == "__main__":
parser = argparse.ArgumentParser(

View file

@ -1,20 +0,0 @@
#! /usr/bin/python3
import numpy as np
import pandas as pd
class Banana():
def read_from_file(self, filepath):
d={'clock':[], 'sl':[], 'channel':[], 'dtime':[], 'lost':[], 'a':[], 'b':[], 'phase':[], 'banana':[], 'pha':[]} # slice (sl) is called det in ahepamfile.c
keys = list(d.keys())
print(keys)
with open(filepath) as file:
for line in file:
contents = line.split(" ")
if contents[0] == "ED":
for i in range(10):
d[keys[i]].append(contents[i+1])
return pd.DataFrame(d)