Commit 518dea63 authored by Thomas Vincent's avatar Thomas Vincent

Clean-up useless if __name__ == "__main__"

parent 5cf6d933
......@@ -122,7 +122,3 @@ class CentroidPlotter(Plotter):
# plots[2].addXMarker(positions.qz[index], legend='center of mass')
# plots[2].setGraphTitle('QZ center of mass')
#
if __name__ == '__main__':
pass
......@@ -196,6 +196,3 @@ class GaussianPlotter(Plotter):
def getPlotTitle(self):
return 'Gaussian'
if __name__ == '__main__':
pass
......@@ -40,7 +40,3 @@ class Plotter(object):
def getPlotTitle(self):
raise NotImplementedError('Not implemented')
if __name__ == '__main__':
pass
......@@ -158,7 +158,3 @@ class SilxPlotter(Plotter):
def getPlotTitle(self):
return 'Silx Gaussian Fit'
if __name__ == '__main__':
pass
......@@ -57,7 +57,3 @@ def grabWidget(widget):
else:
pixmap = widget.grab()
return pixmap
if __name__ == '__main__':
pass
......@@ -385,12 +385,3 @@ class XsocsGui(Qt.QMainWindow):
self.__setupProject(projectFile=projectFile)
return True
# ####################################################################
# ####################################################################
# ####################################################################
if __name__ == '__main__':
pass
......@@ -1214,7 +1214,3 @@ class Node(object):
update this node's column data, or False to ignore the event.
"""
return True, event
if __name__ == '__main__':
pass
......@@ -423,6 +423,3 @@ class ItemDelegate(Qt.QStyledItemDelegate):
klass.paint(painter, option, index)):
return
super(ItemDelegate, self).paint(painter, option, index)
if __name__ == '__main__':
pass
......@@ -408,6 +408,3 @@ class FitWidget(Qt.QWidget):
self.__fitter = None
self.sigProcessDone.emit(self.__outputFile)
if __name__ == '__main__':
pass
......@@ -1242,7 +1242,3 @@ class MergeWidget(Qt.QDialog):
self.__output['prefix'] = prefix
self.__prefixEdit.setText(prefix)
if __name__ == '__main__':
pass
......@@ -903,7 +903,3 @@ class _ConversionProcessDialog(Qt.QDialog):
status = property(lambda self: 0 if self.__aborted else 1)
""" Status of the process. """
if __name__ == '__main__':
pass
......@@ -107,6 +107,3 @@ class FitItem(ProjectItem):
fitFile = self.fitFile
if fitFile is None:
return
if __name__ == '__main__':
pass
......@@ -314,7 +314,3 @@ class H5DatasetNode(H5Base):
self._setDataInternal(ModelColumns.ValueColumn,
text,
role=Qt.Qt.DisplayRole)
if __name__ == '__main__':
pass
......@@ -294,7 +294,3 @@ class ProgressNode(Node):
else:
text = '?'
return ModelDataList(text, None, Qt.Qt.DisplayRole)
if __name__ == '__main__':
pass
......@@ -301,7 +301,3 @@ class ProjectItem(XsocsH5Base):
:return:
"""
pass
if __name__ == '__main__':
pass
......@@ -719,7 +719,3 @@ class FitItemNode(ProjectNode):
.triggered.connect(lambda checked: self.delete(view))
return qMenu
if __name__ == '__main__':
pass
......@@ -125,6 +125,3 @@ class QSpaceItem(ProjectItem):
FitGroup(self.filename,
self.path + '/' + QSpaceItem.FitGroupPath,
mode=self.mode)
if __name__ == '__main__':
pass
......@@ -133,7 +133,3 @@ class ShiftItem(ProjectItem):
shiftFile = self.shiftFile
if shiftFile is None:
return
if __name__ == '__main__':
pass
......@@ -130,7 +130,3 @@ class XsocsProject(ProjectItem):
return ShiftGroup(self.filename,
self.ShiftGroupPath,
mode=mode)
if __name__ == '__main__':
pass
......@@ -886,7 +886,3 @@ class PolygonRoiItem(RoiItemBase):
self._yData[idx] = y
self._xData[-1] = self._xData[0]
self._yData[-1] = self._yData[0]
if __name__ == '__main__':
pass
......@@ -115,7 +115,3 @@ class DropPlotWidget(XsocsPlot2D):
self.__legend = self.setPlotData(scan_x, scan_y,
data, dataIndices=errorPts)
self.setGraphTitle('Errors[qx]' + FitH5QAxis.axis_names[q_axis])
if __name__ == '__main__':
pass
......@@ -298,7 +298,3 @@ class FitModel(Model):
mimeData.setData('application/FitModel', data)
return mimeData
if __name__ == '__main__':
pass
......@@ -563,7 +563,3 @@ class ShiftSubject(Qt.QObject):
if progressCb:
progressCb(100)
if __name__ == '__main__':
pass
......@@ -1139,7 +1139,3 @@ class ShiftWidget(Qt.QMainWindow):
self.__setPanel.setCurrentModelIndex(mdlIndex)
self.__linearShiftBn.setEnabled(True)
self.__linearShiftWholeRangeBn.setEnabled(True)
if __name__ == '__main__':
pass
......@@ -210,6 +210,3 @@ class AcqParamsWidget(Qt.QWidget):
def chperdeg_v(self, chperdeg_v):
self.__chpdeg_v_edit.setText(str(chperdeg_v))
self.__chpdeg_v = chperdeg_v
if __name__ == '__main__':
pass
\ No newline at end of file
......@@ -70,7 +70,3 @@ class FixedSizePushButon(Qt.QPushButton):
fm = self.fontMetrics()
width = fm.width(self.text()) + border
self.setFixedWidth(width)
if __name__ == '__main__':
pass
......@@ -76,7 +76,3 @@ class SubGroupBox(Qt.QGroupBox):
stop: 0 gray, stop: 1 lightgray);
}
""")
if __name__ == '__main__':
pass
......@@ -59,7 +59,3 @@ class PlotGrabber(XsocsPlot2D):
:return:
"""
return grabWidget(self)
if __name__ == '__main__':
pass
......@@ -190,7 +190,3 @@ class ShiftH5Writer(ShiftH5):
else:
h5_f[dsetPath].resize(indices.shape)
self._set_array_data(dsetPath, indices)
if __name__ == '__main__':
pass
......@@ -439,7 +439,3 @@ class XsocsH5MasterWriter(XsocsH5Writer):
with self._get_file() as h5_file:
h5_file[master_entry] = _h5py.ExternalLink(entry_file, entry)
if __name__ == '__main__':
pass
......@@ -69,7 +69,3 @@ class Fitter(object):
:return:
"""
raise NotImplementedError('Not implemented.')
if __name__ == '__main__':
pass
......@@ -324,7 +324,3 @@ class FitResult(object):
fitH5.set_status(entry,
FitH5QAxis.qz_axis,
zstatus)
if __name__ == '__main__':
pass
......@@ -445,7 +445,3 @@ def _fit_process(th_idx, roiIndices=None):
if disp_times:
print('Thread {0} done ({1}).'.format(th_idx, times))
return times
if __name__ == '__main__':
pass
......@@ -178,7 +178,3 @@ class FitSharedResults(object):
:return: FitResult instance
"""
raise NotImplementedError('')
if __name__ == '__main__':
pass
......@@ -839,7 +839,3 @@ def _add_edf_data(scan_id,
else:
progress[proc_idx] = -1
return result
if __name__ == '__main__':
pass
......@@ -362,7 +362,3 @@ def _find_scan_img_files(spec_h5_filename,
spec_h5=spec_h5_filename)
return result
if __name__ == '__main__':
pass
......@@ -166,7 +166,3 @@ def merge_scan_data(output_dir,
m_results = merger.results
return m_results
if __name__ == '__main__':
pass
......@@ -1562,7 +1562,3 @@ def _get_all_params(data_h5f):
angle=angles[idx]))
for idx, scan in enumerate(entries)])
return result
if __name__ == '__main__':
pass
......@@ -86,7 +86,3 @@ def kmap_2_qspace(xsocsH5_f,
raise ValueError('Conversion failed with CODE={0} :\n'
'{1}'''
''.format(converter.status, converter.status_msg))
if __name__ == '__main__':
pass
......@@ -450,7 +450,3 @@ def _get_ref_positions(xsocs_h5):
ref_p1 = np.median(refmtx1, axis=0)
return ref_p0, ref_p1
if __name__ == '__main__':
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment