diff --git a/news/time.rst b/news/time.rst new file mode 100644 index 0000000..1d13116 --- /dev/null +++ b/news/time.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* remove time dependency in pip, conda.txt + +**Security:** + +* diff --git a/requirements/conda.txt b/requirements/conda.txt index 9de315b..f28dfd3 100644 --- a/requirements/conda.txt +++ b/requirements/conda.txt @@ -1,5 +1,4 @@ h5py -time tk matplotlib-base numpy diff --git a/requirements/pip.txt b/requirements/pip.txt index f8febd0..3d4ebed 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,5 +1,4 @@ h5py -time tk matplotlib numpy diff --git a/src/diffpy/fourigui/fourigui.py b/src/diffpy/fourigui/fourigui.py index 88dd866..f0323f1 100755 --- a/src/diffpy/fourigui/fourigui.py +++ b/src/diffpy/fourigui/fourigui.py @@ -1,4 +1,3 @@ -import time import tkinter as tk from tkinter.ttk import Button @@ -392,15 +391,12 @@ def fft(self): """ def perform_fft(fftholder): - time0 = time.time() fftholder = np.nan_to_num(fftholder) size = list(fftholder.shape) fftholder = np.fft.ifftshift(fftholder) fftholder = np.fft.fftn(fftholder, s=size, norm="ortho") fftholder = np.fft.fftshift(fftholder) fftholder = fftholder.real - fftdur = time.time() - time0 - print("- FFT performed in {} sec.".format(round(fftdur, 4))) return fftholder if not self.transformed and not self.transcutted: # no fft at all yet @@ -469,7 +465,6 @@ def applycutoff(self): """ if not self.cutted: - time0 = time.time() X, Y, Z = self.cube.shape sphere = np.ones((X, Y, Z)) qmin = float(self.qminentry.get()) @@ -482,13 +477,11 @@ def applycutoff(self): R2 = (XS - X // 2) ** 2 + (YS - Y // 2) ** 2 + (ZS - Z // 2) ** 2 mask = (R2 <= r2_inner) | (R2 >= r2_outer) sphere[mask] = np.nan - cutdur = time.time() - time0 if self.space.get(): self.cube_real = self.cube self.cube = self.cube_reci * sphere self.cube_recicut = self.cube - print("- Cutoff below {} and beyond {} in {} sec.".format(qmin, qmax, round(cutdur, 4))) self.fft() else: self.cube_reci = self.cube @@ -496,7 +489,6 @@ def applycutoff(self): self.cube_recicut = self.cube self.plot_plane() self.intensity_upd_global() - print("- Cutoff below {} and beyond {} in {} sec.".format(qmin, qmax, round(cutdur, 4))) self.cutted = True