Skip to content

Commit

Permalink
sign of compile and execution time
Browse files Browse the repository at this point in the history
  • Loading branch information
ramain committed Dec 18, 2023
1 parent 6827c1f commit b26cb7f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fdmt/fdmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ def fdmt(
spectra: npt.NDArray[np.float32],
min_freq_mhz: float = 400.1953125,
max_freq_mhz: float = 800.1953125,
freq_channels: int = 1024,
freq_channels: int = 4096,
max_time_samples: int = 2048,
frontpadding: bool = True,
frontpadding: bool = False,
backpadding: bool = False,
threads: int = 1,
threads: int = 4,
) -> npt.NDArray[np.float32]:
"""Perform the Fast Dispersion Measure Transform (FDMT).
Expand Down Expand Up @@ -262,13 +262,13 @@ def fdmt(


if __name__ == "__main__":
data = np.random.normal(size=(1024, 40960))
data = np.random.normal(size=(4096, 40960))
data = data.astype(np.float32)

start = time()
fdmt(data)
end = time()
print(f"Compile Iteration: {start - end}s")
print(f"Compile Iteration: {end - start}s")
fdmt(data)
end2 = time()
print(f"Execution Iteration: {end - end2}s")
print(f"Execution Iteration: {end2 - end}s")

0 comments on commit b26cb7f

Please sign in to comment.