diff --git a/pyebsdindex/_ebsd_index_single.py b/pyebsdindex/_ebsd_index_single.py index a828c92..1aebc86 100644 --- a/pyebsdindex/_ebsd_index_single.py +++ b/pyebsdindex/_ebsd_index_single.py @@ -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) @@ -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( [ @@ -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) @@ -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 diff --git a/pyebsdindex/gnomonic_correction.py b/pyebsdindex/gnomonic_correction.py index 1343a74..7949bbf 100644 --- a/pyebsdindex/gnomonic_correction.py +++ b/pyebsdindex/gnomonic_correction.py @@ -55,7 +55,7 @@ RADEG = 180.0/np.pi -class GnomoicCorrection(): +class GnomonicCorrection(): def __init__( self, radonPlan=None, @@ -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) @@ -280,6 +280,6 @@ def __correction_loops_nb( npat, nband, else: rho_1 = rho_ji rho[j,i] = rho_1 - + return rho \ No newline at end of file