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
6 changes: 4 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
- docs: screenshot scripts open the Quick View like the block matrix,
wait until the Quick View is done, and use default settings
- docs: the legend of the fluorescence traces can be moved (#201)
- docs: fix typos and grammar in the documentation, docstrings, and
user interface texts
2.28.4
- setup: bump dclab to 0.73.0 (chopped image basins support)
2.28.3
Expand Down Expand Up @@ -96,7 +98,7 @@
- ref: put heavy-duty plotting code into `pipeline_plot_compute`
- ref: separate PipelinePlotItem into its own submodule
- ref: compute brush color in background thread alongside KDE
- ref: `zoomin_contours` calls `compute_contours_from_state` unneccesarily
- ref: `zoomin_contours` calls `compute_contours_from_state` unnecessarily
- tests: update manual tests session with correct contour spacing
2.27.0
- fix: delay on selecting "Plot" tab when "Marker hue" was set to "Feature"
Expand Down Expand Up @@ -420,7 +422,7 @@
- enh: improve GUI of QuickView (#133, #43)
- setup: bump dclab from 0.47.0 to 0.47.2
2.11.10
- fix: detect chaged files on disk when reloading metadata
- fix: detect changed files on disk when reloading metadata
- setup: bump dclab from 0.46.4 to 0.47.0 (new bg_med feature
and other convenience methods)
2.11.9
Expand Down
8 changes: 4 additions & 4 deletions dcscope/gui/analysis/ana_basins.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@


class BasinsPanel(QtWidgets.QWidget):
"""Tables panel widget
"""Basins panel widget

Visualizes tables stored in the .rtdc file
Visualizes the basins defined in the .rtdc file
"""
# widgets emit these whenever they changed the pipeline
pp_mod_send = QtCore.pyqtSignal(dict)
Expand Down Expand Up @@ -49,7 +49,7 @@ def on_pp_mod_recv(self, data):

@QtCore.pyqtSlot(int)
def on_select_dataset(self, ds_idx):
"""Show the tables of the dataset in the right-hand list widget"""
"""Show the basins of the dataset in the basin tree widget"""
self.ui.treeWidget_basin_name.clear()
if ds_idx >= 0:
ds = self.pipeline.slots[ds_idx].get_dataset()
Expand All @@ -58,7 +58,7 @@ def on_select_dataset(self, ds_idx):

@QtCore.pyqtSlot(QtWidgets.QTreeWidgetItem, QtWidgets.QTreeWidgetItem)
def on_select_basin(self, current, previous=None):
"""Show the tables of the dataset in the right-hand list widget"""
"""Show the details of the selected basin"""
ds_idx = self.ui.listWidget_dataset.currentRow()
if current is not None and ds_idx >= 0:
# Get the correct basin
Expand Down
2 changes: 1 addition & 1 deletion dcscope/gui/analysis/ana_filter_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def retranslateUi(self, Form):
self.toolButton_remove.setText(_translate("Form", "Remove"))
self.label_2.setText(_translate("Form", "Name"))
self.checkBox_enable.setText(_translate("Form", "Use this filter"))
self.checkBox_limit.setToolTip(_translate("Form", "Set an upper limit for the number of events; Surplus events are removed randomly, but in a reproducible manner."))
self.checkBox_limit.setToolTip(_translate("Form", "Set an upper limit for the number of events; surplus events are removed randomly, but in a reproducible manner."))
self.checkBox_limit.setText(_translate("Form", "Limit number of events to"))
self.checkBox_invalid.setToolTip(_translate("Form", "Remove events that are nan- or inf-valued for any feature"))
self.checkBox_invalid.setText(_translate("Form", "Remove invalid events"))
Expand Down
11 changes: 4 additions & 7 deletions dcscope/gui/analysis/ana_slot.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def write_pipeline_state(self, state):
self.ui.comboBox_temp.blockSignals(False)

idx_vm = self.ui.comboBox_visc_model.findData(
# use defaults from previous session (Herold-2107)
# use defaults from previous session (Herold-2017)
emodulus.get("emodulus viscosity model", "herold-2017"))

self.ui.comboBox_visc_model.setCurrentIndex(idx_vm)
Expand Down Expand Up @@ -239,7 +239,7 @@ def get_dataset_choices_temperature(ds):
if "temp" in ds:
choices.append(["From feature", "feature"])
if "temperature" in ds.config["setup"]:
choices.append(["From meta data", "config"])
choices.append(["From metadata", "config"])
choices.append(["Manual", "manual"])
return choices

Expand All @@ -257,7 +257,7 @@ def _update_emodulus_medium_choices(self):
self.ui.comboBox_medium.blockSignals(False)

def _update_emodulus_temp_choices(self):
"""pupdate temperature choices for YM
"""update temperature choices for YM

The previous selection is preserved. Signals are blocked.
"""
Expand Down Expand Up @@ -380,10 +380,7 @@ def on_reorder_slots(self):

@QtCore.pyqtSlot()
def on_ui_changed(self):
"""Called when the user m
index: int
index of the slot in the pipeline;
indexing starts at "0".odifies the medium or temperature options"""
"""Called when the user modifies the medium or temperature options"""
medium = self.ui.comboBox_medium.currentData()
tselec = self.ui.comboBox_temp.currentData()
medium_key = ALIAS_MEDIA.get(medium, medium)
Expand Down
4 changes: 2 additions & 2 deletions dcscope/gui/analysis/ana_slot_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def retranslateUi(self, Form):
self.doubleSpinBox_temp.setSuffix(_translate("Form", "°C"))
self.label_8.setText(_translate("Form", "Viscosity"))
self.label_5.setText(_translate("Form", "<a href=\"https://dcscope.readthedocs.io/en/stable/sec_qg_youngs_modulus.html\"> help </a>"))
self.groupBox_fl_cross.setToolTip(_translate("Form", "The cross-talk matrix facilitates the computation of corrected fluorescence values."))
self.groupBox_fl_cross.setToolTip(_translate("Form", "The crosstalk matrix facilitates the computation of corrected fluorescence values."))
self.groupBox_fl_cross.setTitle(_translate("Form", "Fluorescence crosstalk"))
self.label_from_fl2.setText(_translate("Form", "from FL-2"))
self.label_to_fl2.setText(_translate("Form", "to FL-2"))
Expand All @@ -336,7 +336,7 @@ def retranslateUi(self, Form):
self.label_from_fl3.setText(_translate("Form", "from FL-3"))
self.pushButton_ct_apply_all.setToolTip(_translate("Form", "Set these crosstalk values for all datasets in the session (other changes in this tab are not applied)"))
self.pushButton_ct_apply_all.setText(_translate("Form", "Apply crosstalk to all datasets"))
self.groupBox_fl_labels.setToolTip(_translate("Form", "Choose user-definde labels that will be used for axes labels."))
self.groupBox_fl_labels.setToolTip(_translate("Form", "Choose user-defined labels that will be used for axes labels."))
self.groupBox_fl_labels.setTitle(_translate("Form", "Fluorescence labels"))
self.label_fl2.setText(_translate("Form", "FL-2"))
self.label_fl1.setText(_translate("Form", "FL-1"))
Expand Down
2 changes: 1 addition & 1 deletion dcscope/gui/bulk/bulk_emodulus.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, parent, pipeline, *args, **kwargs):

self.ui.comboBox_temp.clear()
self.ui.comboBox_temp.addItem("From feature", "feature")
self.ui.comboBox_temp.addItem("From meta data", "config")
self.ui.comboBox_temp.addItem("From metadata", "config")
self.ui.comboBox_temp.addItem("Manual", "manual")
self.ui.comboBox_temp.setCurrentIndex(
self.ui.comboBox_temp.findData("feature"))
Expand Down
2 changes: 1 addition & 1 deletion dcscope/gui/bulk/bulk_emodulus_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def setupUi(self, Dialog):
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Young\'s modulus computation"))
self.label.setText(_translate("Dialog", "<html><head/><body><p>Here you can set the parameters for Young\'s modulus computation for all datasets loaded. This is the bulk-version of the corresponding options in the <span style=\" font-style:italic;\">Dataset </span> tab in the <span style=\" font-style:italic;\">Analysis View</span>.</p></body></html>"))
self.label.setText(_translate("Dialog", "<html><head/><body><p>Here you can set the parameters for Young\'s modulus computation for all datasets loaded. This is the bulk version of the corresponding options in the <span style=\" font-style:italic;\">Dataset </span> tab in the <span style=\" font-style:italic;\">Analysis View</span>.</p></body></html>"))
self.doubleSpinBox_temp.setSuffix(_translate("Dialog", "°C"))
self.comboBox_medium.setItemText(0, _translate("Dialog", "CellCarrier"))
self.comboBox_medium.setItemText(1, _translate("Dialog", "CellCarrier B"))
Expand Down
2 changes: 1 addition & 1 deletion dcscope/gui/export/e2data.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def export_data(self):
tm.close()

def get_export_filenames(self):
"""Compute names for exporting data, avoiding overriding anything
"""Compute names for exporting data, avoiding overwriting anything

Return a list of tuples `(slot_index, filename)`.
"""
Expand Down
2 changes: 1 addition & 1 deletion dcscope/gui/export/e2data_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Data export"))
self.label_3.setText(_translate("Dialog", "Export filtered session data to other file formats"))
self.label_5.setText(_translate("Dialog", "<a href=\"https://dcscope.readthedocs.io/en/stable/sec_qg_export_data.html\">Help<a>"))
self.label_5.setText(_translate("Dialog", "<a href=\"https://dcscope.readthedocs.io/en/stable/sec_qg_export_data.html\">Help</a>"))
self.label_2.setText(_translate("Dialog", "Output directory:"))
self.pushButton_path.setText(_translate("Dialog", "Browse"))
self.label.setText(_translate("Dialog", "Format:"))
Expand Down
21 changes: 11 additions & 10 deletions dcscope/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def on_action_about(self):
rtd = "dcscope.readthedocs.io"
about_text = (
f"DCscope is a graphical user interface for the analysis "
f"and visualization of deformability cytometry data sets.<br><br>"
f"and visualization of deformability cytometry datasets.<br><br>"
f"Author: Paul Müller<br>"
f"GitHub: <a href='https://github.com/{gh}'>{gh}</a><br>"
f"Documentation: <a href='https://{rtd}'>{rtd}</a><br>"
Expand Down Expand Up @@ -653,7 +653,7 @@ def on_action_export_filter_ray_dataset(self):
"""Export the filter ray for each dataset to the dataset location"""
#: dictionary with paths as keys and filter ID list as values
filt_dict = {}
#: paths that already exist (user will be asked to override)
#: paths that already exist (user will be asked to overwrite)
existing_paths = []
#: keeps track of datasets that are loaded twice (will notify user)
double_paths = []
Expand All @@ -674,7 +674,8 @@ def on_action_export_filter_ray_dataset(self):
if dcor_data:
QMessageBox.warning(
self,
"Some datasets are DCOR data for which no filter rays ",
"No filter rays exported for DCOR data",
"Some datasets are DCOR data for which no filter rays "
"will be exported:\n\n"
+ "\n".join([str(p) for p in list(set(dcor_data))])
)
Expand All @@ -689,17 +690,17 @@ def on_action_export_filter_ray_dataset(self):
if existing_paths:
button_reply = QMessageBox.question(
self,
"Override existing files?",
"The following files already exist, override?\n\n"
"Overwrite existing files?",
"The following files already exist, overwrite?\n\n"
+ "\n".join([str(p) for p in existing_paths])
)
yes = button_reply == QMessageBox.StandardButton.Yes
if yes:
# if the user agrees, these files will be overridden
# if the user agrees, these files will be overwritten
existing_paths.clear()
for path, value in filt_dict.items():
if path in existing_paths:
# not overriding this one
# not overwriting this one
continue
else:
session.export_filters(path, self.pipeline, value)
Expand All @@ -716,14 +717,14 @@ def on_action_import_filter(self, path=None):
Parameters
----------
path: str or pathlib.Path
path to the filter to impoert
path to the filter to import
"""
if path is None:
path, _ = QFileDialog.getOpenFileName(
parent=self,
caption="Select Filter",
directory=settings.get_dir("filters", self.settings),
filter="Filters formats (*.poly *.sof)")
filter="Filter formats (*.poly *.sof)")
if path:
settings.set_dir("filters", path, self.settings)
with self.pipeline.lock:
Expand Down Expand Up @@ -1141,7 +1142,7 @@ def copy_text_to_clipboard(text):
cb.setText(text)


# Make Ctr+C close the app
# Make Ctrl+C close the app
signal.signal(signal.SIGINT, signal.SIG_DFL)
# Display exception hook in separate dialog instead of crashing
sys.excepthook = excepthook
2 changes: 1 addition & 1 deletion dcscope/gui/matrix/block_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def on_pp_mod_recv(self, data):
self.ui.toolButton_new_plot.setEnabled(False)

if data.get("block_matrix"):
# Workaound: If this is not set, then the slot matrix element
# Workaround: If this is not set, then the slot matrix element
# is resized, but its sizer is not. Sending the signal twice
# resolves the issue.
self.ui.data_matrix.pp_mod_recv.emit(data)
Expand Down
2 changes: 1 addition & 1 deletion dcscope/gui/matrix/pm_plot_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ def retranslateUi(self, Form):
self.label.setText(_translate("Form", "Name"))
self.toolButton_modify.setToolTip(_translate("Form", "Modify this plot in Analysis View"))
self.toolButton_modify.setText(_translate("Form", "edit"))
self.toolButton_toggle.setToolTip(_translate("Form", "Include/Exclude all Datasets for this plot"))
self.toolButton_toggle.setToolTip(_translate("Form", "Include/Exclude all datasets for this plot"))
self.toolButton_toggle.setText(_translate("Form", "c"))
self.toolButton_opt.setText(_translate("Form", "..."))
4 changes: 2 additions & 2 deletions dcscope/gui/pipeline_plot_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ def compute_scatter_data_from_state(
pipeline: Pipeline | None = None,
slot_state: dict | None = None,
):
"""Compute scatte rplot data given the plot state and a dataset
"""Compute scatter plot data given the plot state and a dataset

If `pipeline` is specified, then the plot dictionary is taken
from `pipeline.get_plot(plot_state["identifier"])`.

`slot_state` is not used, but required for correctly assigning a
contour to a slot in the pipeline plot TaskManager workflow.
scatter plot to a slot in the pipeline plot TaskManager workflow.
"""
if pipeline is not None:
# get the latest plot state
Expand Down
10 changes: 5 additions & 5 deletions dcscope/gui/pipeline_plot_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def perform_export(self, file):
tm.close()

win.addItem(explot)
win.addLabel("") # spacer to avoid cut tick labels on the right(#7)
win.addLabel("") # spacer to avoid cut tick labels on the right (#7)
win.nextRow()
win.addLabel(labelx, col=1)
# Update the UI (do it twice, otherwise the tick labels overlap)
Expand Down Expand Up @@ -426,7 +426,7 @@ def add_warning_labels(self, messages):
self._warnings_shown.append(msg)

def zoomin_contours(self, margin_per=5):
"""Zoom-in to contour data with margin"""
"""Zoom in to contour data with margin"""
if not self._list_contours:
# no contours available
return
Expand Down Expand Up @@ -460,10 +460,10 @@ def add_isoelastics(plot_item, axis_x, axis_y, channel_width, pixel_size,
elements = []
isodef = dclab.isoelastics.get_default()
# We do not use isodef.get_with_rtdcbase, because then the
# isoelastics would be shifted according to flow rate and.
# isoelastics would be shifted according to flow rate and
# viscosity. We could do it, but for visualization there is
# really no need and also, the plots then look the same as
# in DCscope 1.
# in Shape-Out 1.
try:
iso = isodef.get(
lut_identifier=lut_identifier if lut_identifier
Expand Down Expand Up @@ -506,7 +506,7 @@ def add_label(text, anchor_parent, text_halign="center", text_valign="center",
("left", "center", "right")
text_valign: str
Vertical text alignment relative to anchor point
("left", "center", "right")
("top", "center", "bottom")
font_size_diff: int
Change font size of text relative to `QtGui.QFont().pointSize()`
(is added via css)
Expand Down
2 changes: 1 addition & 1 deletion dcscope/gui/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def on_dcor_enc_token(self):
# get path
path, _ = QtWidgets.QFileDialog.getOpenFileName(
parent=self,
caption="SSpecify encrypted DCOR access token",
caption="Specify encrypted DCOR access token",
directory=self.settings.value("paths/encrypted access token", ""),
filter="DCOR access token (*.dcor-access)")
if not path:
Expand Down
2 changes: 1 addition & 1 deletion dcscope/gui/preferences_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def retranslateUi(self, Dialog):
self.label_8.setText(_translate("Dialog", "Access Key ID"))
self.lineEdit_s3_access_key_id.setToolTip(_translate("Dialog", "This is the access key for accessing .rtdc resources on S3"))
self.lineEdit_s3_access_key_id.setPlaceholderText(_translate("Dialog", "e.g. 1ad3afa49c7241bac142ed4108343ea"))
self.label_9.setText(_translate("Dialog", "Secret Acces Key"))
self.label_9.setText(_translate("Dialog", "Secret Access Key"))
self.lineEdit_s3_secret_access_key.setToolTip(_translate("Dialog", "This is the secret access key matching the Access Key ID"))
self.lineEdit_s3_secret_access_key.setPlaceholderText(_translate("Dialog", "e.g. a3a4862a92643be730c946d267015e20"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_s3), _translate("Dialog", "S3 basins"))
Expand Down
10 changes: 5 additions & 5 deletions dcscope/gui/quick_view/qv_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ def on_event_scatter_hover(self, pos):

@QtCore.pyqtSlot()
def on_event_scatter_spin(self):
"""Sping control for event selection changed"""
"""Spin control for event selection changed"""
event = self.ui.spinBox_event.value()
self.show_event(event - 1)

Expand Down Expand Up @@ -774,7 +774,7 @@ def on_tool(self, collapse=False):
sender = self.sender()

if isinstance(sender, QtWidgets.QToolButton) and sender in toblock:
# prevent a tool buttons from unchecking itself
# prevent a tool button from unchecking itself
sender.setChecked(True)

if sender == self.ui.toolButton_event:
Expand Down Expand Up @@ -950,7 +950,7 @@ def plot_auto(self):
(self.ui.checkBox_hue, [self.ui.comboBox_hue,
self.ui.comboBox_z_hue])]:
# Do not replot if the user changes the options for a
# disabled settings (e.g. downsampling, hue)
# disabled setting (e.g. downsampling, hue)
if sender in sen and not cb.isChecked():
break
else:
Expand Down Expand Up @@ -1033,7 +1033,7 @@ def update_window_title(self, slot_index=None, filt_index=None):
def show_rtdc(self, rtdc_ds, slot):
"""Display an RT-DC measurement given by `path` and `filters`"""
if np.all(rtdc_ds.filter.all) and rtdc_ds.format == "hierarchy":
# No filers applied, no additional hierarchy child required.
# No filters applied, no additional hierarchy child required.
self.rtdc_ds = rtdc_ds
else:
# Create a hierarchy child so that the user can browse
Expand Down Expand Up @@ -1101,7 +1101,7 @@ def show_statistics(self):
self.ui.tableWidget_stat.set_key_vals(keys=h, vals=v)

def update_feature_choices(self):
"""Updates the axes comboboxes choices
"""Updates the axes combobox choices

This is used e.g. when emodulus becomes available
"""
Expand Down
Loading
Loading