2 Commits

Author SHA1 Message Date
robrobo
6b7641f152 stop reading many frames to get times for shifted_correlation 2025-09-05 14:47:53 +02:00
robrobo
cd7097ad46 remove print 2025-08-14 16:43:56 +02:00
2 changed files with 2 additions and 2 deletions

View File

@@ -413,7 +413,6 @@ def center_of_masses(
) -> NDArray:
if atom_indices is None:
atom_indices = list(range(len(frame)))
print(type(frame))
res_ids = frame.residue_ids[atom_indices]
masses = frame.masses[atom_indices]
if shear:

View File

@@ -147,7 +147,8 @@ def shifted_correlation(
num_frames = int(len(frames) * window)
ls = np.logspace(0, np.log10(num_frames + 1), num=points)
idx = np.unique(np.int_(ls) - 1)
t = np.array([frames[i].time for i in idx]) - frames[0].time
dt = round(frames[1].time - frames[0].time, 6) # round to avoid bad floats
t = idx * dt
result = np.array(
[