...
 
Commits (2)
from tqdm import tqdm, trange
from hyperspy.external.progressbar import progressbar
from scipy.ndimage.filters import gaussian_filter
from hyperspy.signals import Signal2D
import hyperspy.api as hs
......@@ -164,7 +164,8 @@ def find_features_by_separation(
separation_value_list = []
peak_list = []
for separation in tqdm(separation_list, disable=not show_progressbar):
for separation in progressbar(separation_list,
disable=not show_progressbar):
peaks = get_atom_positions(
signal,
separation=separation,
......@@ -266,7 +267,8 @@ def get_feature_separation(
marker_list_y[index, 0:len(peaks)] = (peaks[:, 1]*scale_y)+offset_y
marker_list = []
for i in trange(marker_list_x.shape[1], disable=not show_progressbar):
for i in progressbar(range(marker_list_x.shape[1]),
disable=not show_progressbar):
m = hs.markers.point(
x=marker_list_x[:, i], y=marker_list_y[:, i], color='red')
marker_list.append(m)
......
from tqdm import trange
from hyperspy.external.progressbar import progressbar
import numpy as np
from hyperspy.signals import Signal2D
import atomap.atom_finding_refining as afr
......@@ -367,8 +367,8 @@ class Dumbbell_Lattice(Atom_Lattice):
else:
image = self.original_image
n_tot = len(self.sublattice_list[0].atom_list)
for i_atom in trange(
n_tot, desc="Gaussian fitting", disable=not show_progressbar):
for i_atom in progressbar(range(n_tot), desc="Gaussian fitting",
disable=not show_progressbar):
atom_list = []
for sublattice in self.sublattice_list:
atom_list.append(sublattice.atom_list[i_atom])
......
import copy
import math
from tqdm import tqdm
from hyperspy.external.progressbar import progressbar
import numpy as np
import matplotlib.pyplot as plt
from atomap.tools import _get_n_nearest_neighbors, Fingerprinter
......@@ -94,7 +94,7 @@ def _get_dumbbell_arrays(
next_pos_list0, next_pos_list1)
total_num = len(next_pos_list0)
dumbbell_list0, dumbbell_list1 = [], []
for x, y, next_pos0, next_pos1 in tqdm(
for x, y, next_pos0, next_pos1 in progressbar(
iterator, total=total_num, desc="Finding dumbbells",
disable=not show_progressbar):
mask1 = _make_circular_mask(
......
import numpy as np
import scipy as sp
from tqdm import tqdm, trange
from hyperspy.external.progressbar import progressbar
import matplotlib.pyplot as plt
from scipy.spatial import cKDTree
import hyperspy.api as hs
......@@ -943,7 +943,7 @@ class Sublattice():
if image_data is None:
image_data = self.original_image
image_data = image_data.astype('float64')
for atom in tqdm(
for atom in progressbar(
self.atom_list, desc="Gaussian fitting",
disable=not show_progressbar):
if atom.refine_position:
......@@ -996,7 +996,7 @@ class Sublattice():
if image_data is None:
image_data = self.original_image
image_data = image_data.astype('float64')
for atom in tqdm(
for atom in progressbar(
self.atom_list, desc="Center of mass",
disable=not show_progressbar):
if atom.refine_position:
......@@ -2131,7 +2131,7 @@ class Sublattice():
A=1.0)
im_y, im_x = model_image.shape
for atom in tqdm(self.atom_list, disable=not show_progressbar):
for atom in progressbar(self.atom_list, disable=not show_progressbar):
x, y = atom.pixel_x, atom.pixel_y
sx, sy = atom.sigma_x, atom.sigma_y
atom_slice = atom._get_atom_slice(im_x, im_y,
......@@ -2422,7 +2422,8 @@ class Sublattice():
marker_list_y[index, 0:len(peaks)] = peaks[:, 1]
marker_list = []
for i in trange(marker_list_x.shape[1], disable=not show_progressbar):
for i in progressbar(range(marker_list_x.shape[1]),
disable=not show_progressbar):
m = hs.markers.point(
x=marker_list_x[:, i], y=marker_list_y[:, i], color='red')
marker_list.append(m)
......
import numpy as np
import math
import copy
from tqdm import tqdm, trange
from hyperspy.external.progressbar import progressbar
from scipy import interpolate
from scipy import ndimage
from scipy.spatial import cKDTree
......@@ -120,7 +120,7 @@ def remove_atoms_from_image_using_2d_gaussian(
model_image = np.zeros(image.shape)
X, Y = np.meshgrid(np.arange(
model_image.shape[1]), np.arange(model_image.shape[0]))
for atom in tqdm(
for atom in progressbar(
sublattice.atom_list, desc='Subtracting atoms',
disable=not show_progressbar):
percent_distance = percent_to_nn
......@@ -1164,7 +1164,7 @@ def integrate(s, points_x, points_y, method='Voronoi', max_radius='Auto',
raise NotImplementedError(
"Oops! You have asked for an unimplemented method.")
point_record -= 1
for point in trange(points[0].shape[0], desc='Integrating',
for point in progressbar(range(points[0].shape[0]), desc='Integrating',
disable=not show_progressbar):
currentMask = (point_record == point)
currentFeature = currentMask * image.T
......
......@@ -16,7 +16,6 @@ requirements:
- numpy
- matplotlib
- ipython
- tqdm
- hyperspy
run:
- python
......@@ -25,5 +24,4 @@ requirements:
- numpy
- matplotlib
- ipython
- tqdm
- hyperspy
......@@ -31,7 +31,6 @@ setup(
'numpy>=1.13',
'h5py',
'matplotlib>=3.1.0',
'tqdm',
'scikit-learn',
'scikit-image>=0.13',
'hyperspy>=1.5.2',
......