diff --git a/fiducialreg/imref.py b/fiducialreg/imref.py index b2a9ff8..6479a27 100644 --- a/fiducialreg/imref.py +++ b/fiducialreg/imref.py @@ -18,7 +18,6 @@ class DimensionManager: def __init__( self, DimensionName="", NumberOfSamples=2, Delta=1, StartCoordinateInWorld=0.5 ): - if DimensionName not in ["X", "Y", "Z"]: raise ValueError("DimensionName must be X, Y, or Z") self.DimensionName = DimensionName diff --git a/llspy/__main__.py b/llspy/__main__.py index 551f97a..3dd0233 100644 --- a/llspy/__main__.py +++ b/llspy/__main__.py @@ -9,7 +9,6 @@ from llspy.bin.llspy_gui import main if __name__ == "__main__": - import logging logger = logging.getLogger(__name__) diff --git a/llspy/camcalib.py b/llspy/camcalib.py index 7be9030..d31c10a 100644 --- a/llspy/camcalib.py +++ b/llspy/camcalib.py @@ -168,7 +168,6 @@ def process_dark_images(folder, callback=None, callback2=None): def process_bright_images(folder, darkavg, darkstd, callback=None, save=True): - ch0list, ch1list = get_channel_list(folder) pre, post = combine_stacks(ch0list, ch1list, darkavg) @@ -203,7 +202,6 @@ def process_bright_images(folder, darkavg, darkstd, callback=None, save=True): if __name__ == "__main__": - # this script assumes you have aquired a series of 2-channel zstacks # (not actually a stack, turn off Z galvo, and Z and Sample Piezos # the first channel is "bright" and "even" (such as 488 laser sheet exciting FITC) diff --git a/llspy/camera.py b/llspy/camera.py index d1494ef..eaefc2f 100644 --- a/llspy/camera.py +++ b/llspy/camera.py @@ -364,7 +364,6 @@ def correct_stacks( if __name__ == "__main__": - from llspy import llsdir, samples paramfile = samples.camparams # path to the calibration file diff --git a/llspy/gui/camcalibgui.py b/llspy/gui/camcalibgui.py index e9e3095..1097da7 100644 --- a/llspy/gui/camcalibgui.py +++ b/llspy/gui/camcalibgui.py @@ -126,7 +126,6 @@ def setFolder(self): self.darkSTDineEdit.setText(os.path.join(folder, "dark_STD.tif")) def processFolder(self): - folder = self.camCalibFolderLineEdit.text() darkavg = None @@ -214,7 +213,6 @@ def _abort(self): if __name__ == "__main__": - app = QtW.QApplication(sys.argv) # dlg = LogWindow() # dlg.show() diff --git a/llspy/gui/img_dialog.py b/llspy/gui/img_dialog.py index 2983e03..473bf85 100644 --- a/llspy/gui/img_dialog.py +++ b/llspy/gui/img_dialog.py @@ -73,7 +73,6 @@ def __init__(self, name, wave=None, parent=None): class DataModel(QtCore.QObject): - _idxChanged = QtCore.Signal() _dataChanged = QtCore.Signal() @@ -294,7 +293,6 @@ def __getitem__(self, tczTuple): class MplCanvas(FigureCanvas): - _contrastChanged = QtCore.Signal() def __init__(self): @@ -582,7 +580,6 @@ def update_sliders(self): self.update_axis_slider(axis, n) def initialize(self): - datamax = self.data.max() datamin = self.data.min() # dataRange = datamax - datamin diff --git a/llspy/gui/mainwindow.py b/llspy/gui/mainwindow.py index 6ca5d1b..64316c6 100644 --- a/llspy/gui/mainwindow.py +++ b/llspy/gui/mainwindow.py @@ -1138,14 +1138,12 @@ def displayPreview(self, array, dx, dz, params=None): viewer.dims.ndisplay = 3 self.spimwins.append(viewer) elif self.prevBackendSpimagineRadio.isChecked() and _SPIMAGINE_IMPORTED: - if np.squeeze(array).ndim > 4: arrays = [array[:, i] for i in range(array.shape[1])] else: arrays = [np.squeeze(array)] for arr in arrays: - datamax = arr.max() datamin = arr.min() dataRange = datamax - datamin @@ -1660,7 +1658,6 @@ def concatenateSelected(self): [self.listbox.addPath(p) for p in selectedPaths] def undoRenameSelected(self): - box = QtW.QMessageBox() box.setWindowTitle("Undo Renaming") box.setText( @@ -1712,7 +1709,6 @@ def renameSelected(self): [self.listbox.addPath(osp.join(item, p)) for p in os.listdir(item)] def mergeMIPtool(self): - if len(self.listbox.selectedPaths()): for obj in self.listbox.selectedObjects(): obj.mergemips() diff --git a/llspy/gui/qtlogger.py b/llspy/gui/qtlogger.py index ef0d78f..b2d3123 100644 --- a/llspy/gui/qtlogger.py +++ b/llspy/gui/qtlogger.py @@ -27,7 +27,6 @@ def formatException(self, exc_info): class NotificationHandler(QObject, logging.Handler): - emitSignal = Signal(str) def __init__(self): diff --git a/llspy/gui/workers.py b/llspy/gui/workers.py index 7878216..42a9042 100644 --- a/llspy/gui/workers.py +++ b/llspy/gui/workers.py @@ -154,7 +154,6 @@ def onFinished(self, exitCode, exitStatus): class CompressionWorker(SubprocessWorker): - status_update = QtCore.Signal(str, int) def __init__(self, path, mode="compress", binary=None, wid=1, **kwargs): @@ -235,7 +234,6 @@ def untar(self, tarball, delete=True): with tarfile.open(tarball) as tar: def is_within_directory(directory, target): - abs_directory = os.path.abspath(directory) abs_target = os.path.abspath(target) @@ -244,7 +242,6 @@ def is_within_directory(directory, target): return prefix == abs_directory def safe_extract(tar, path=".", members=None, *, numeric_owner=False): - for member in tar.getmembers(): member_path = os.path.join(path, member.name) if not is_within_directory(path, member_path): @@ -345,7 +342,6 @@ def split(a, n): class LLSitemWorker(QtCore.QObject): - sig_starting_item = QtCore.Signal(str, int) # item path, numfiles status_update = QtCore.Signal(str) # update mainGUI status @@ -438,7 +434,6 @@ def work(self): # only call cudaDeconv if we need to deskew or deconvolve if self.P.nIters > 0 or (self.P.deskew != 0 and self.P.saveDeskewedRaw): - try: # check the binary path and create object binary = llspy.cudabinwrapper.CUDAbin(_CUDABIN) @@ -547,7 +542,6 @@ def on_CUDAworker_done(self, worker_id): self.post_process() def post_process(self): - if self.P.doReg: self.status_update.emit(f"Doing Channel Registration: {self.E.basename}") try: diff --git a/llspy/libcudawrapper.py b/llspy/libcudawrapper.py index d18bc09..528fd7d 100644 --- a/llspy/libcudawrapper.py +++ b/llspy/libcudawrapper.py @@ -417,7 +417,6 @@ def RL_decon( plt.show() RL_cleanup() elif sys.argv[1] == "camcor": - import time from llspy import llsdir, samples diff --git a/llspy/llsdir.py b/llspy/llsdir.py index 6915b52..5bf5973 100644 --- a/llspy/llsdir.py +++ b/llspy/llsdir.py @@ -1226,7 +1226,6 @@ def median_and_trim( trimX=(0, 0), **kwargs, ): - trim = (trimZ, trimY, trimX) outpath = self.path.joinpath("Corrected") diff --git a/llspy/xzpsf.py b/llspy/xzpsf.py index 320a464..96bfa16 100755 --- a/llspy/xzpsf.py +++ b/llspy/xzpsf.py @@ -80,7 +80,6 @@ def find_settext(path, filepattern="*Settings.txt"): if __name__ == "__main__": - import argparse parser = argparse.ArgumentParser() diff --git a/setup.cfg b/setup.cfg index d416edc..012395b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ url = https://github.com/tlambert03/LLSpy author = Talley Lambert author_email = talley.lambert@gmail.com license = BSD 3-clause -license_file = LICENSE +license_files = LICENSE classifiers = Development Status :: 3 - Alpha Intended Audience :: Science/Research @@ -18,11 +18,6 @@ classifiers = Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 Topic :: Scientific/Engineering Topic :: Scientific/Engineering :: Visualization @@ -41,7 +36,7 @@ install_requires = voluptuous watchdog numba;python_version < '3.10' -python_requires = >=3.6 +python_requires = >=3.8 include_package_data = True zip_safe = False