Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xsocs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
22
Issues
22
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kmap
xsocs
Commits
518dea63
Commit
518dea63
authored
Nov 12, 2018
by
Thomas Vincent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean-up useless if __name__ == "__main__"
parent
5cf6d933
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
0 additions
and
159 deletions
+0
-159
xsocs/fit/Centroid.py
xsocs/fit/Centroid.py
+0
-4
xsocs/fit/Gaussian.py
xsocs/fit/Gaussian.py
+0
-3
xsocs/fit/Plotter.py
xsocs/fit/Plotter.py
+0
-4
xsocs/fit/SilxFitter.py
xsocs/fit/SilxFitter.py
+0
-4
xsocs/gui/Utils.py
xsocs/gui/Utils.py
+0
-4
xsocs/gui/XsocsGui.py
xsocs/gui/XsocsGui.py
+0
-9
xsocs/gui/model/Node.py
xsocs/gui/model/Node.py
+0
-4
xsocs/gui/model/TreeView.py
xsocs/gui/model/TreeView.py
+0
-3
xsocs/gui/process/FitWidget.py
xsocs/gui/process/FitWidget.py
+0
-3
xsocs/gui/process/MergeWidget.py
xsocs/gui/process/MergeWidget.py
+0
-4
xsocs/gui/process/QSpaceWidget.py
xsocs/gui/process/QSpaceWidget.py
+0
-4
xsocs/gui/project/FitGroup.py
xsocs/gui/project/FitGroup.py
+0
-3
xsocs/gui/project/Hdf5Nodes.py
xsocs/gui/project/Hdf5Nodes.py
+0
-4
xsocs/gui/project/IntensityGroup.py
xsocs/gui/project/IntensityGroup.py
+0
-4
xsocs/gui/project/ProjectItem.py
xsocs/gui/project/ProjectItem.py
+0
-4
xsocs/gui/project/ProjectNodes.py
xsocs/gui/project/ProjectNodes.py
+0
-4
xsocs/gui/project/QSpaceGroup.py
xsocs/gui/project/QSpaceGroup.py
+0
-3
xsocs/gui/project/ShiftGroup.py
xsocs/gui/project/ShiftGroup.py
+0
-4
xsocs/gui/project/XsocsProject.py
xsocs/gui/project/XsocsProject.py
+0
-4
xsocs/gui/silx_imports/ImageRois.py
xsocs/gui/silx_imports/ImageRois.py
+0
-4
xsocs/gui/view/fitview/DropPlotWidget.py
xsocs/gui/view/fitview/DropPlotWidget.py
+0
-4
xsocs/gui/view/fitview/FitModel.py
xsocs/gui/view/fitview/FitModel.py
+0
-4
xsocs/gui/view/shift/ShiftSubject.py
xsocs/gui/view/shift/ShiftSubject.py
+0
-4
xsocs/gui/view/shift/ShiftView.py
xsocs/gui/view/shift/ShiftView.py
+0
-4
xsocs/gui/widgets/AcqParamsWidget.py
xsocs/gui/widgets/AcqParamsWidget.py
+0
-3
xsocs/gui/widgets/Buttons.py
xsocs/gui/widgets/Buttons.py
+0
-4
xsocs/gui/widgets/Containers.py
xsocs/gui/widgets/Containers.py
+0
-4
xsocs/gui/widgets/PlotGrabber.py
xsocs/gui/widgets/PlotGrabber.py
+0
-4
xsocs/io/ShiftH5.py
xsocs/io/ShiftH5.py
+0
-4
xsocs/io/XsocsH5.py
xsocs/io/XsocsH5.py
+0
-4
xsocs/process/fit/Fitter.py
xsocs/process/fit/Fitter.py
+0
-4
xsocs/process/fit/fitresults.py
xsocs/process/fit/fitresults.py
+0
-4
xsocs/process/fit/peak_fit.py
xsocs/process/fit/peak_fit.py
+0
-4
xsocs/process/fit/sharedresults.py
xsocs/process/fit/sharedresults.py
+0
-4
xsocs/process/merge/KmapMerger.py
xsocs/process/merge/KmapMerger.py
+0
-4
xsocs/process/merge/KmapSpecParser.py
xsocs/process/merge/KmapSpecParser.py
+0
-4
xsocs/process/merge/helpers.py
xsocs/process/merge/helpers.py
+0
-4
xsocs/process/qspace/QSpaceConverter.py
xsocs/process/qspace/QSpaceConverter.py
+0
-4
xsocs/process/qspace/helpers.py
xsocs/process/qspace/helpers.py
+0
-4
xsocs/process/shift/shift.py
xsocs/process/shift/shift.py
+0
-4
No files found.
xsocs/fit/Centroid.py
View file @
518dea63
...
...
@@ -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
xsocs/fit/Gaussian.py
View file @
518dea63
...
...
@@ -196,6 +196,3 @@ class GaussianPlotter(Plotter):
def
getPlotTitle
(
self
):
return
'Gaussian'
if
__name__
==
'__main__'
:
pass
xsocs/fit/Plotter.py
View file @
518dea63
...
...
@@ -40,7 +40,3 @@ class Plotter(object):
def
getPlotTitle
(
self
):
raise
NotImplementedError
(
'Not implemented'
)
if
__name__
==
'__main__'
:
pass
xsocs/fit/SilxFitter.py
View file @
518dea63
...
...
@@ -158,7 +158,3 @@ class SilxPlotter(Plotter):
def
getPlotTitle
(
self
):
return
'Silx Gaussian Fit'
if
__name__
==
'__main__'
:
pass
xsocs/gui/Utils.py
View file @
518dea63
...
...
@@ -57,7 +57,3 @@ def grabWidget(widget):
else
:
pixmap
=
widget
.
grab
()
return
pixmap
if
__name__
==
'__main__'
:
pass
xsocs/gui/XsocsGui.py
View file @
518dea63
...
...
@@ -385,12 +385,3 @@ class XsocsGui(Qt.QMainWindow):
self
.
__setupProject
(
projectFile
=
projectFile
)
return
True
# ####################################################################
# ####################################################################
# ####################################################################
if
__name__
==
'__main__'
:
pass
xsocs/gui/model/Node.py
View file @
518dea63
...
...
@@ -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
xsocs/gui/model/TreeView.py
View file @
518dea63
...
...
@@ -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
xsocs/gui/process/FitWidget.py
View file @
518dea63
...
...
@@ -408,6 +408,3 @@ class FitWidget(Qt.QWidget):
self
.
__fitter
=
None
self
.
sigProcessDone
.
emit
(
self
.
__outputFile
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/process/MergeWidget.py
View file @
518dea63
...
...
@@ -1242,7 +1242,3 @@ class MergeWidget(Qt.QDialog):
self
.
__output
[
'prefix'
]
=
prefix
self
.
__prefixEdit
.
setText
(
prefix
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/process/QSpaceWidget.py
View file @
518dea63
...
...
@@ -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
xsocs/gui/project/FitGroup.py
View file @
518dea63
...
...
@@ -107,6 +107,3 @@ class FitItem(ProjectItem):
fitFile
=
self
.
fitFile
if
fitFile
is
None
:
return
if
__name__
==
'__main__'
:
pass
xsocs/gui/project/Hdf5Nodes.py
View file @
518dea63
...
...
@@ -314,7 +314,3 @@ class H5DatasetNode(H5Base):
self
.
_setDataInternal
(
ModelColumns
.
ValueColumn
,
text
,
role
=
Qt
.
Qt
.
DisplayRole
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/project/IntensityGroup.py
View file @
518dea63
...
...
@@ -294,7 +294,3 @@ class ProgressNode(Node):
else
:
text
=
'?'
return
ModelDataList
(
text
,
None
,
Qt
.
Qt
.
DisplayRole
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/project/ProjectItem.py
View file @
518dea63
...
...
@@ -301,7 +301,3 @@ class ProjectItem(XsocsH5Base):
:return:
"""
pass
if
__name__
==
'__main__'
:
pass
xsocs/gui/project/ProjectNodes.py
View file @
518dea63
...
...
@@ -719,7 +719,3 @@ class FitItemNode(ProjectNode):
.
triggered
.
connect
(
lambda
checked
:
self
.
delete
(
view
))
return
qMenu
if
__name__
==
'__main__'
:
pass
xsocs/gui/project/QSpaceGroup.py
View file @
518dea63
...
...
@@ -125,6 +125,3 @@ class QSpaceItem(ProjectItem):
FitGroup
(
self
.
filename
,
self
.
path
+
'/'
+
QSpaceItem
.
FitGroupPath
,
mode
=
self
.
mode
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/project/ShiftGroup.py
View file @
518dea63
...
...
@@ -133,7 +133,3 @@ class ShiftItem(ProjectItem):
shiftFile
=
self
.
shiftFile
if
shiftFile
is
None
:
return
if
__name__
==
'__main__'
:
pass
xsocs/gui/project/XsocsProject.py
View file @
518dea63
...
...
@@ -130,7 +130,3 @@ class XsocsProject(ProjectItem):
return
ShiftGroup
(
self
.
filename
,
self
.
ShiftGroupPath
,
mode
=
mode
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/silx_imports/ImageRois.py
View file @
518dea63
...
...
@@ -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
xsocs/gui/view/fitview/DropPlotWidget.py
View file @
518dea63
...
...
@@ -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
xsocs/gui/view/fitview/FitModel.py
View file @
518dea63
...
...
@@ -298,7 +298,3 @@ class FitModel(Model):
mimeData
.
setData
(
'application/FitModel'
,
data
)
return
mimeData
if
__name__
==
'__main__'
:
pass
xsocs/gui/view/shift/ShiftSubject.py
View file @
518dea63
...
...
@@ -563,7 +563,3 @@ class ShiftSubject(Qt.QObject):
if
progressCb
:
progressCb
(
100
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/view/shift/ShiftView.py
View file @
518dea63
...
...
@@ -1139,7 +1139,3 @@ class ShiftWidget(Qt.QMainWindow):
self
.
__setPanel
.
setCurrentModelIndex
(
mdlIndex
)
self
.
__linearShiftBn
.
setEnabled
(
True
)
self
.
__linearShiftWholeRangeBn
.
setEnabled
(
True
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/widgets/AcqParamsWidget.py
View file @
518dea63
...
...
@@ -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
xsocs/gui/widgets/Buttons.py
View file @
518dea63
...
...
@@ -70,7 +70,3 @@ class FixedSizePushButon(Qt.QPushButton):
fm
=
self
.
fontMetrics
()
width
=
fm
.
width
(
self
.
text
())
+
border
self
.
setFixedWidth
(
width
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/widgets/Containers.py
View file @
518dea63
...
...
@@ -76,7 +76,3 @@ class SubGroupBox(Qt.QGroupBox):
stop: 0 gray, stop: 1 lightgray);
}
"""
)
if
__name__
==
'__main__'
:
pass
xsocs/gui/widgets/PlotGrabber.py
View file @
518dea63
...
...
@@ -59,7 +59,3 @@ class PlotGrabber(XsocsPlot2D):
:return:
"""
return
grabWidget
(
self
)
if
__name__
==
'__main__'
:
pass
xsocs/io/ShiftH5.py
View file @
518dea63
...
...
@@ -190,7 +190,3 @@ class ShiftH5Writer(ShiftH5):
else
:
h5_f
[
dsetPath
].
resize
(
indices
.
shape
)
self
.
_set_array_data
(
dsetPath
,
indices
)
if
__name__
==
'__main__'
:
pass
xsocs/io/XsocsH5.py
View file @
518dea63
...
...
@@ -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
xsocs/process/fit/Fitter.py
View file @
518dea63
...
...
@@ -69,7 +69,3 @@ class Fitter(object):
:return:
"""
raise
NotImplementedError
(
'Not implemented.'
)
if
__name__
==
'__main__'
:
pass
xsocs/process/fit/fitresults.py
View file @
518dea63
...
...
@@ -324,7 +324,3 @@ class FitResult(object):
fitH5
.
set_status
(
entry
,
FitH5QAxis
.
qz_axis
,
zstatus
)
if
__name__
==
'__main__'
:
pass
xsocs/process/fit/peak_fit.py
View file @
518dea63
...
...
@@ -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
xsocs/process/fit/sharedresults.py
View file @
518dea63
...
...
@@ -178,7 +178,3 @@ class FitSharedResults(object):
:return: FitResult instance
"""
raise
NotImplementedError
(
''
)
if
__name__
==
'__main__'
:
pass
xsocs/process/merge/KmapMerger.py
View file @
518dea63
...
...
@@ -839,7 +839,3 @@ def _add_edf_data(scan_id,
else
:
progress
[
proc_idx
]
=
-
1
return
result
if
__name__
==
'__main__'
:
pass
xsocs/process/merge/KmapSpecParser.py
View file @
518dea63
...
...
@@ -362,7 +362,3 @@ def _find_scan_img_files(spec_h5_filename,
spec_h5
=
spec_h5_filename
)
return
result
if
__name__
==
'__main__'
:
pass
xsocs/process/merge/helpers.py
View file @
518dea63
...
...
@@ -166,7 +166,3 @@ def merge_scan_data(output_dir,
m_results
=
merger
.
results
return
m_results
if
__name__
==
'__main__'
:
pass
xsocs/process/qspace/QSpaceConverter.py
View file @
518dea63
...
...
@@ -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
xsocs/process/qspace/helpers.py
View file @
518dea63
...
...
@@ -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
xsocs/process/shift/shift.py
View file @
518dea63
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment