Pages

Visualizing 3D Data Cubes with PyQtGraph

PyQtGraph has some useful tools for visualizing 3D data. I'm copying below a simple example for my own future reference.
import numpy as np
import matplotlib.pyplot as mpl
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph as pg



app = QtGui.QApplication([])

## Create window with two ImageView widgets
win = QtGui.QMainWindow()
win.resize(1000, 1000)
win.setWindowTitle('Triple Correlations')
cw = QtGui.QWidget()
win.setCentralWidget(cw)
l = QtGui.QGridLayout()
cw.setLayout(l)
imv1 = pg.ImageView()
imv2 = pg.ImageView()
l.addWidget(imv1, 0, 0)
l.addWidget(imv2, 1, 0)
win.show()

## Set your 3D data to be displayed here
data = np.random.random(3*(100,))

roi = pg.LineSegmentROI([[10, len(data)//2], [len(data)-10, len(data)//2]], pen='r')
imv1.addItem(roi)

def update():
    global data, imv1, imv2
    d2 = roi.getArrayRegion(data, imv1.imageItem, axes=(1, 2))
    imv2.setImage(d2)

roi.sigRegionChanged.connect(update)

## Display the data
imv1.setImage(data)
imv1.setHistogramRange(0, 2)
imv1.setLevels(0, 2)

update()



## Start Qt event loop unless running in interactive mode.
if __name__ == '__main__':
    import sys
    if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
        QtGui.QApplication.instance().exec_()
 

Bandlike Transport in PbS Quantum Dot Superlattices with Quantum Confinement

New paper out in Journal of Physical Chemistry Letters!

Our work demonstrates through DFT calculations that quantum dots in a superlattice or "quantum dot solid" will generally maintain the quantum confinement for which they are famous. Additionally, we investigated different superlattice-types and found that a cubic superlattice has a superior electron mobility. This is a little surprising since the majority of papers I have seen only discuss two phases for colloidal PbS QD superlattices: FCC and BCC. (There are some papers out there that have looked at solid PbSe QD superlattices so the cubic phase is possible to create.) A cubic superlattice allows neighboring QDs to have enhanced wave function overlap through the fusing facets. The (111) facets in the FCC and BCC phases block the wave function and so do not allow good transport. Our work demonstrates that it can be important to give some thought to the surface physics of different facet-types and how those facets are interconnected in order to allow optimal carrier transport.