remove all reference to cmath, get code and tests to the point where they run at least.

This commit is contained in:
Abe Levitan committed 2021-06-17 16:47:24 -04:00
1 parent 188a685503
commit a3765e9097
34 files changed
+911 -743

No files matched your search

+1 -2
View File
@@ -8,7 +8,6 @@ images exist, as well as plotting scan patterns and nanomaps
from __future__ import division, print_function, absolute_import
from CDTools.tools import cmath
import torch as t
import numpy as np
import matplotlib.pyplot as plt
@@ -129,7 +128,7 @@ def plot_image(im, plot_func=lambda x: x, fig=None, basis=None, units='$\\mu$m',
# If final dimension is 2, assume it is a complex array. If not,
# assume it represents a real array
if im.shape[-1] == 2:
im = cmath.torch_to_complex(im.detach().cpu())
im = im.detach().cpu().numpy()
else:
im = im.detach().cpu().numpy()