Add image diff, change the read_xy_alt, update the figures
This commit is contained in:
+18
-1
@@ -17,6 +17,23 @@ def read_xy(path: str):
|
||||
return df.replace([np.inf, -np.inf], np.nan).dropna()
|
||||
|
||||
|
||||
def read_xy_alt(path: str):
|
||||
df = pd.read_csv(path)
|
||||
df['N'] = df.index + 1
|
||||
|
||||
# Find the outermost corner of this object
|
||||
df['r'] = (
|
||||
(df.x.abs() + np.sqrt(0.5)) ** 2 +
|
||||
(df.y.abs() + np.sqrt(0.5)) ** 2
|
||||
) ** 0.5
|
||||
|
||||
df['cr'] = df.r.cummax()
|
||||
df['fd'] = np.log(df.N) / np.log(df.cr)
|
||||
df['run'] = os.path.splitext(Path(path).name)[0]
|
||||
|
||||
return df
|
||||
|
||||
|
||||
def read_xyz(path: str):
|
||||
df = pd.read_csv(path)
|
||||
df['N'] = df.index + 1
|
||||
@@ -46,7 +63,7 @@ def read_xyz_alt(path: str):
|
||||
return df
|
||||
|
||||
|
||||
def read_load(load_dir: str, reader=read_xy):
|
||||
def read_load(load_dir: str, reader=read_xy_alt):
|
||||
paths = glob(f'{load_dir}/*.csv')
|
||||
return pd.concat([reader(path) for path in paths])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user