Commit 397da9d2 authored by Russell Luke's avatar Russell Luke
Browse files

fix tab/spacing

parent e4e83aec
......@@ -61,6 +61,15 @@ class Elser_Experiment(PhaseExperiment):
self.illumination_phase = None
self.FT_conv_kernel = Cell(1)
def loadElserData(filename, M):
# read data file as a matrix of numbers
data = np.loadtxt(filename, delimiter="\t")
data = np.sqrt(data)/M
data = np.c_[data, np.zeros(M)] # add extra column
data = data.flatten() # make it a one-dimensional array
return data
***
def loadData(self):
# def loadElserData(filename, M):
"""
......@@ -84,11 +93,11 @@ class Elser_Experiment(PhaseExperiment):
print('Loading data.')
fn="".join(['../InputData/Phase/Elser/data', str(self.atoms), self.category])
# read text data file as a matrix of numbers
data = np.loadtxt(fn, delimiter="\t")
data = np.sqrt(data)/self.Nx
data = np.c_[data, np.zeros(self.Nx)] # add extra column
data = data.flatten() # make it a one-dimensional array
# read text data file as a matrix of numbers
data = np.loadtxt(fn, delimiter="\t")
data = np.sqrt(data)/self.Nx
data = np.c_[data, np.zeros(self.Nx)] # add extra column
data = data.flatten() # make it a one-dimensional array
M = fftshift(data)
# have to look at what Elser is actually doing with his data...
self.magn = 1 # magnification factor
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment