Skip to content
Snippets Groups Projects
Commit 51343e7d authored by Alexis GAMELIN's avatar Alexis GAMELIN
Browse files

[Fix] units in read_impedance

parent c9aeb8b1
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ def read_CST(file, component_type='long', divide_by=None, imp=True): ...@@ -54,7 +54,7 @@ def read_CST(file, component_type='long', divide_by=None, imp=True):
df = pd.read_csv(file, comment="#", header = None, sep = "\t", df = pd.read_csv(file, comment="#", header = None, sep = "\t",
names = ["Distance","Wake"]) names = ["Distance","Wake"])
df["Time"] = df["Distance"]*1e-3/c df["Time"] = df["Distance"]*1e-3/c
df["Wake"] = df["Wake"]*1e-12 df["Wake"] = df["Wake"]*1e12
if divide_by is not None: if divide_by is not None:
df["Wake"] = df["Wake"]/divide_by df["Wake"] = df["Wake"]/divide_by
df.set_index("Time", inplace = True) df.set_index("Time", inplace = True)
...@@ -201,7 +201,7 @@ def read_ABCI(file, azimuthal=False): ...@@ -201,7 +201,7 @@ def read_ABCI(file, azimuthal=False):
df = pd.read_csv(file, delim_whitespace=True, df = pd.read_csv(file, delim_whitespace=True,
names=["Time","Wake"]) names=["Time","Wake"])
df["Time"] = df["Time"] / c df["Time"] = df["Time"] / c
df["Wake"] = df["Wake"] * 1e-12 df["Wake"] = df["Wake"] * 1e12
if (not azimuthal) and (file_type[-3:] == "dip"): if (not azimuthal) and (file_type[-3:] == "dip"):
df["Wake"] = df["Wake"] * -1 df["Wake"] = df["Wake"] * -1
df.set_index("Time", inplace = True) df.set_index("Time", inplace = True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment