Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pyebsdindex/_ebsd_index_single.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def __init__(
if isinstance(filename, ebsd_pattern.EBSDPatternFile):
self.filein = filename.filepath
self.fID = filename
else:
else:
self.filein = filename
if self.filein is not None:
self.fID = ebsd_pattern.get_pattern_file_obj(self.filein)
Expand Down Expand Up @@ -410,7 +410,7 @@ def __init__(

self.nband_earlyexit = nband_earlyexit

self.gnomonic = gnomonic_correction.GnomoicCorrection(radonPlan=self.bandDetectPlan.radonPlan, PC=self.PC)
self.gnomonic = gnomonic_correction.GnomonicCorrection(radonPlan=self.bandDetectPlan.radonPlan, PC=self.PC, vendor=vendor)

self.dataTemplate = np.dtype(
[
Expand Down Expand Up @@ -446,7 +446,7 @@ def update_file(self, filename=None, patDim=np.array([120, 120], dtype=np.int32)
self.fID.read_header()
patDim[0:] = np.array([self.fID.patternH, self.fID.patternW])

self.filein = filename.filepath
self.filein = filename.filepath
else:
self.filein = filename
self.fID = ebsd_pattern.get_pattern_file_obj(self.filein)
Expand Down Expand Up @@ -753,7 +753,7 @@ def _indexbandsphase(self, banddata, bandnorm, verbose=0):

# the adj_intensity is used to weight the peaks in the quest fit.
#adj_intensity = banddata["max"].copy()

adj_intensity = (-1 * np.abs(banddata["rho"]) * 0.5 / rhomax + 1) * banddata["max"]
adj_intensity *= ((banddata["theta"] > (2 * np.pi / 180)).astype(np.float32) + 0.5) / 2
adj_intensity *= ((banddata["theta"] < (178.0 * np.pi / 180)).astype(np.float32) + 0.5) / 2
Expand Down
6 changes: 3 additions & 3 deletions pyebsdindex/gnomonic_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

RADEG = 180.0/np.pi

class GnomoicCorrection():
class GnomonicCorrection():
def __init__(
self,
radonPlan=None,
Expand Down Expand Up @@ -188,7 +188,7 @@ def applycorrection(
#rdncorrect = self.rdncorrect
#print(PCpx)
bdndata_out = bnddata.copy()

rho_new = self.__correction_loops_nb( npat, nband,
valid, width, maxloc, theta, rho, PCpx, patdim,
convolfactor, rsigma)
Expand Down Expand Up @@ -280,6 +280,6 @@ def __correction_loops_nb( npat, nband,
else:
rho_1 = rho_ji
rho[j,i] = rho_1


return rho
Loading