recompute 16 sept data
This commit is contained in:
@@ -6,7 +6,7 @@ import math
|
||||
|
||||
curdir = os.getcwd()
|
||||
path_delim = '/'
|
||||
df = pd.read_excel(curdir + path_delim + "data/data_22_09_2023_05_29.xlsx", sheet_name="data")
|
||||
df = pd.read_excel(curdir + path_delim + "data/data_25_09_2023_10_06.xlsx", sheet_name="data")
|
||||
|
||||
def parse(resultData, idx):
|
||||
result = [line.strip() for line in resultData.split("\n") if "RESULT" in line and "REND" in line]
|
||||
@@ -18,10 +18,17 @@ df["led1SampleRc"] = df.apply(lambda x: parse(x['resultData'], 5), axis=1)
|
||||
df["led2BufferRc"] = df.apply(lambda x: parse(x['resultData'], 4), axis=1)
|
||||
df["led2SampleRc"] = df.apply(lambda x: parse(x['resultData'], 6), axis=1)
|
||||
|
||||
df["led1BufferRc"] = pd.to_numeric(df["led1BufferRc"])
|
||||
df["led1SampleRc"] = pd.to_numeric(df["led1SampleRc"])
|
||||
df["led2BufferRc"] = pd.to_numeric(df["led2BufferRc"])
|
||||
df["led2SampleRc"] = pd.to_numeric(df["led2SampleRc"])
|
||||
|
||||
df["absorbance"] = - np.log(df["led1BufferRc"] / df["led1SampleRc"]) / - np.log(df["led2BufferRc"] / df["led2SampleRc"])
|
||||
# =IF(E17=W17,"Match"," ")
|
||||
print(df)
|
||||
# df["absorbance"] = df.apply(lambda x: float(x["led1BufferRc"])/float(x["led1SampleRc"]))
|
||||
|
||||
|
||||
writer = pd.ExcelWriter(curdir + path_delim + "data/recompute2.xlsx", engine = 'openpyxl')
|
||||
|
||||
writer = pd.ExcelWriter(curdir + path_delim + "data/recompute3.xlsx", engine = 'openpyxl')
|
||||
df.to_excel(writer, sheet_name = 'op', index=False)
|
||||
writer.close()
|
||||
Reference in New Issue
Block a user