NeuXtalViz package#

NeuXtalViz is a toolkit for single-crystal diffraction analysis and visualization.

Features#

  • UB matrix calculation

  • Peak indexing and integration

  • Volume slicing

  • Experiment planning

Submodules#

NeuXtalViz.application module#

class NeuXtalViz[source]#

Bases: QMainWindow

Main application window for NeuXtalViz.

Implements a singleton QMainWindow that hosts the UB Calculator, Experiment Planner, Reciprocal Space Volume Slicer, and Structure Factor Calculator tools in a stacked widget, and provides menu actions for launching external reduction/analysis GUIs (TOPAZ, garnet, ShelXle, Olex2, FullProf, VESTA) and internal helpers such as the experiment browser and structure/diffuse interface.

Attributes:
painters

ushort

Methods

acceptDrops(/)

accessibleDescription(/)

accessibleIdentifier(/)

accessibleName(/)

actionEvent(object, /)

actions(/)

activateWindow(/)

addAction(...)

addActions(object, /)

addDockWidget(-> None)

addToolBar(-> None  -> None)

addToolBarBreak(self, /[, area])

adjustSize(/)

autoFillBackground(/)

backgroundRole(/)

backingStore(/)

baseSize(/)

blockSignals(object, /)

centralWidget(/)

changeEvent(object, /)

childAt(...)

childEvent(object, /)

children(/)

childrenRect(/)

childrenRegion(/)

clearFocus(/)

clearMask(/)

close(/)

closeEvent(event)

Stop any running live-data listener and close each tool's PyVista plotter before the window and its child widgets are destroyed.

colorCount(/)

connect(...)

connectNotify(object, /)

contentsMargins(/)

contentsRect(/)

contextMenuEvent(object, /)

contextMenuPolicy(/)

corner(object, /)

create(self, /[, arg__1, initializeWindow, ...])

createPopupMenu(/)

createWinId(/)

createWindowContainer(window, /[, parent, flags])

cursor(/)

customEvent(object, /)

deleteLater(/)

depth(/)

destroy(self, /[, destroyWindow, ...])

devType(/)

devicePixelRatio(/)

devicePixelRatioF(/)

devicePixelRatioFScale()

disconnect(...)

disconnectNotify(object, /)

dockOptions(/)

dockWidgetArea(object, /)

documentMode(/)

dragEnterEvent(object, /)

dragLeaveEvent(object, /)

dragMoveEvent(object, /)

dropEvent(object, /)

dumpObjectInfo(/)

dumpObjectTree(/)

dynamicPropertyNames(/)

effectiveWinId(/)

emit(self, signal, /, *args)

encodeMetricF(metric, value, /)

ensurePolished(/)

enterEvent(object, /)

event(object, /)

eventFilter(self, watched, event, /)

experiment_browser_GUI()

Launch the external SNS experiment browser script.

find(object, /)

findChild(self, type, /[, name, options])

findChildren() -> List[~PlaceholderType] ))

focusInEvent(object, /)

focusNextChild(/)

focusNextPrevChild(object, /)

focusOutEvent(object, /)

focusPolicy(/)

focusPreviousChild(/)

focusProxy(/)

focusWidget(/)

font(/)

fontInfo(/)

fontMetrics(/)

foregroundRole(/)

frameGeometry(/)

frameSize(/)

fullprof_GUI()

Launch the external FullProf application.

garnet_reduction_GUI()

Launch the external garnet reduction script.

geometry(/)

grab(self, /[, rectangle])

grabGesture(self, type, /[, flags])

grabKeyboard(/)

grabMouse(-> None)

grabShortcut(self, key, /[, context])

graphicsEffect(/)

graphicsProxyWidget(/)

hasFocus(/)

hasHeightForWidth(/)

hasMouseTracking(/)

hasTabletTracking(/)

height(/)

heightForWidth(object, /)

heightMM(/)

hide(/)

hideEvent(object, /)

iconSize(/)

inherits(object, /)

initPainter(object, /)

inputMethodEvent(object, /)

inputMethodHints(/)

inputMethodQuery(object, /)

insertAction(self, before, action, /)

insertActions(self, before, actions, /)

insertToolBar(self, before, toolbar, /)

insertToolBarBreak(object, /)

installEventFilter(object, /)

internalWinId(/)

isActiveWindow(/)

isAncestorOf(object, /)

isAnimated(/)

isDockNestingEnabled(/)

isEnabled(/)

isEnabledTo(object, /)

isFullScreen(/)

isHidden(/)

isLeftToRight(/)

isMaximized(/)

isMinimized(/)

isModal(/)

isQmlExposed(/)

isQuickItemType(/)

isRightToLeft(/)

isSeparator(object, /)

isSignalConnected(object, /)

isTopLevel(/)

isVisible(/)

isVisibleTo(object, /)

isWidgetType(/)

isWindow(/)

isWindowModified(/)

isWindowType(/)

keyPressEvent(object, /)

keyReleaseEvent(object, /)

keyboardGrabber()

killTimer()

layout(/)

layoutDirection(/)

leaveEvent(object, /)

locale(/)

logicalDpiX(/)

logicalDpiY(/)

lower(/)

mapFrom(-> PySide6.QtCore.QPoint)

mapFromGlobal()

mapFromParent()

mapTo(-> PySide6.QtCore.QPoint)

mapToGlobal()

mapToParent()

mask(/)

maximumHeight(/)

maximumSize(/)

maximumWidth(/)

menuBar(/)

menuWidget(/)

metaObject(/)

metric(object, /)

minimumHeight(/)

minimumSize(/)

minimumSizeHint(/)

minimumWidth(/)

mouseDoubleClickEvent(object, /)

mouseGrabber()

mouseMoveEvent(object, /)

mousePressEvent(object, /)

mouseReleaseEvent(object, /)

move(-> None)

moveEvent(object, /)

moveToThread(object, /)

nativeEvent(self, eventType, message, /)

nativeParentWidget(/)

nextInFocusChain(/)

normalGeometry(/)

objectName(/)

olex2_GUI()

Launch the external Olex2 application.

overrideWindowFlags(object, /)

overrideWindowState(object, /)

paintEngine(/)

paintEvent(object, /)

paintingActive(/)

palette(/)

parent(/)

parentWidget(/)

physicalDpiX(/)

physicalDpiY(/)

pos(/)

previousInFocusChain(/)

property(object, /)

raise_(/)

receivers(object, /)

rect(/)

redirected(object, /)

releaseKeyboard(/)

releaseMouse(/)

releaseShortcut(object, /)

removeAction(object, /)

removeDockWidget(object, /)

removeEventFilter(object, /)

removeToolBar(object, /)

removeToolBarBreak(object, /)

render(, sourceRegion, renderFlags, renderFlags)

repaint(-> None  -> None  -> None)

resize(-> None)

resizeDocks(self, docks, sizes, orientation, /)

resizeEvent(object, /)

restoreDockWidget(object, /)

restoreGeometry(object, /)

restoreState(self, state, /[, version])

saveGeometry(/)

saveState(self, /[, version])

screen(/)

scroll(-> None)

sender(/)

senderSignalIndex(/)

setAcceptDrops(object, /)

setAccessibleDescription(object, /)

setAccessibleIdentifier(object, /)

setAccessibleName(object, /)

setAnimated(object, /)

setAttribute(self, arg__1, /[, on])

setAutoFillBackground(object, /)

setBackgroundRole(object, /)

setBaseSize(-> None)

setCentralWidget(object, /)

setContentsMargins(-> None)

setContextMenuPolicy(object, /)

setCorner(self, corner, area, /)

setCursor(object, /)

setDisabled(object, /)

setDockNestingEnabled(object, /)

setDockOptions(object, /)

setDocumentMode(object, /)

setEnabled(object, /)

setFixedHeight(object, /)

setFixedSize(-> None)

setFixedWidth(object, /)

setFocus(-> None)

setFocusPolicy(object, /)

setFocusProxy(object, /)

setFont(object, /)

setForegroundRole(object, /)

setGeometry(-> None)

setGraphicsEffect(object, /)

setHidden(object, /)

setIconSize(object, /)

setInputMethodHints(object, /)

setLayout(object, /)

setLayoutDirection(object, /)

setLocale(object, /)

setMask()

setMaximumHeight(object, /)

setMaximumSize(-> None)

setMaximumWidth(object, /)

setMenuBar(object, /)

setMenuWidget(object, /)

setMinimumHeight(object, /)

setMinimumSize(-> None)

setMinimumWidth(object, /)

setMouseTracking(object, /)

setObjectName(object, /)

setPalette(object, /)

setParent(-> None)

setProperty(self, name, value, /)

setScreen(object, /)

setShortcutAutoRepeat(self, id, /[, enable])

setShortcutEnabled(self, id, /[, enable])

setSizeIncrement(-> None)

setSizePolicy(-> None)

setStatusBar(object, /)

setStatusTip(object, /)

setStyle(object, /)

setStyleSheet(object, /)

setTabOrder(arg__1, arg__2, /)

setTabPosition(self, areas, tabPosition, /)

setTabShape(object, /)

setTabletTracking(object, /)

setToolButtonStyle(object, /)

setToolTip(object, /)

setToolTipDuration(object, /)

setUnifiedTitleAndToolBarOnMac(object, /)

setUpdatesEnabled(object, /)

setVisible(object, /)

setWhatsThis(object, /)

setWindowFilePath(object, /)

setWindowFlag(self, arg__1, /[, on])

setWindowFlags(object, /)

setWindowIcon(object, /)

setWindowIconText(object, /)

setWindowModality(object, /)

setWindowModified(object, /)

setWindowOpacity(object, /)

setWindowRole(object, /)

setWindowState(object, /)

setWindowTitle(object, /)

sharedPainter(/)

shelxle_GUI()

Launch the external ShelXle application.

show(/)

showEvent(object, /)

showFullScreen(/)

showMaximized(/)

showMinimized(/)

showNormal(/)

show_about_dialog()

Display the "About NeuXtalViz" information dialog.

signalsBlocked(/)

size(/)

sizeHint(/)

sizeIncrement(/)

sizePolicy(/)

splitDockWidget(self, after, dockwidget, ...)

stackUnder(object, /)

startTimer(self, interval, /[, timerType])

statusBar(/)

statusTip(/)

structdiff_GUI()

Launch the command browser interface as a separate process.

style(/)

styleSheet(/)

tabPosition(object, /)

tabShape(/)

tabifiedDockWidgets(object, /)

tabifyDockWidget(self, first, second, /)

tabletEvent(object, /)

takeCentralWidget(/)

testAttribute(object, /)

thread(/)

timerEvent(object, /)

toolBarArea(object, /)

toolBarBreak(object, /)

toolButtonStyle(/)

toolTip(/)

toolTipDuration(/)

topLevelWidget(/)

topaz_reduction_GUI()

Prompt for a TOPAZ reduction directory and launch its main.py.

tr(self, sourceText, /[, disambiguation, n])

underMouse(/)

ungrabGesture(object, /)

unifiedTitleAndToolBarOnMac(/)

unsetCursor(/)

unsetLayoutDirection(/)

unsetLocale(/)

update(-> None  -> None  -> None)

updateGeometry(/)

updateMicroFocus(self, /[, query])

updatesEnabled(/)

vesta_GUI()

Launch the external VESTA application.

visibleRegion(/)

whatsThis(/)

wheelEvent(object, /)

width(/)

widthMM(/)

winId(/)

window(/)

windowFilePath(/)

windowFlags(/)

windowHandle(/)

windowIcon(/)

windowIconText(/)

windowModality(/)

windowOpacity(/)

windowRole(/)

windowState(/)

windowTitle(/)

windowType(/)

x(/)

y(/)

DockOption

PaintDeviceMetric

RenderFlag

customContextMenuRequested

destroyed

iconSizeChanged

objectNameChanged

tabifiedDockWidgetActivated

toolButtonStyleChanged

windowIconChanged

windowIconTextChanged

windowTitleChanged

closeEvent(event)[source]#

Stop any running live-data listener and close each tool’s PyVista plotter before the window and its child widgets are destroyed.

A running StartLiveData/MonitorLiveData listener is a background Mantid algorithm independent of the Qt event loop; it would otherwise keep polling (and holding its DAQ connection open) after the window closes, so it must be cancelled explicitly here.

BasePlotter.__del__ calls close() on garbage collection if a plotter was never explicitly closed. If that happens after Qt has already destroyed the underlying C++ QtInteractor object (e.g. as part of normal window teardown), it raises a shiboken “already deleted” RuntimeError. Closing each plotter here, while the widgets are still alive, avoids that.

experiment_browser_GUI()[source]#

Launch the external SNS experiment browser script.

Shows a critical error dialog if /SNS/software/scd/experiment.sh cannot be launched.

fullprof_GUI()[source]#

Launch the external FullProf application.

Shows a critical error dialog if the fullprof executable cannot be launched.

garnet_reduction_GUI()[source]#

Launch the external garnet reduction script.

Shows a critical error dialog if /SNS/software/scd/garnet.sh cannot be launched.

olex2_GUI()[source]#

Launch the external Olex2 application.

Shows a critical error dialog if /SNS/software/scd/olex2/olex2 cannot be launched.

shelxle_GUI()[source]#

Launch the external ShelXle application.

Shows a critical error dialog if the shelxle executable cannot be launched.

show_about_dialog()[source]#

Display the “About NeuXtalViz” information dialog.

structdiff_GUI()[source]#

Launch the command browser interface as a separate process.

Runs views/command_browser.py (located next to this module) with the python interpreter. Shows a critical error dialog if the script cannot be launched.

topaz_reduction_GUI()[source]#

Prompt for a TOPAZ reduction directory and launch its main.py.

Opens a directory selection dialog (starting from the last used TOPAZ path), and if the chosen directory contains a main.py script, launches it with mantidpython. Shows a warning if main.py is missing, or a critical error dialog if launching fails.

vesta_GUI()[source]#

Launch the external VESTA application.

Shows a critical error dialog if the VESTA executable cannot be launched.

gui()[source]#

Create and run the NeuXtalViz Qt application.

Installs a global exception handler, creates the QApplication, detects whether the system palette is dark or light to select a matching qdarkstyle theme (and PyVista plot theme), then creates and shows the main NeuXtalViz window and starts the Qt event loop. This is the console-script entry point installed as neuxtalviz.

handle_exception(exc_type, exc_value, exc_traceback)[source]#

Display an uncaught exception in a critical message dialog.

Intended to be installed as sys.excepthook so that unhandled exceptions are shown to the user in a Qt dialog with the full traceback available as detailed text, instead of only being printed to the console.

Parameters:
exc_typetype

The class of the raised exception.

exc_valueBaseException

The exception instance that was raised.

exc_tracebacktraceback

The traceback object associated with the exception.

Module contents#

Module to load the version created by versioningit

Will fall back to a default if NeuXtalViz is not installed