예제 #1
0
def initialize_image(axes, data, dataview):
    "Initializes the image from the datacube"

    yimage = analysis.yimage_calc(data, dataview)
    maxval = analysis.maxval_calc(data, dataview)

    img = axes.imshow(yimage, interpolation="nearest", clim=(0, maxval), cmap="spectral")

    xdata = analysis.xdata_calc(data, dataview)
    slice1 = dataview.slider_val
    if dataview.display_ev:
        axes.set_title("Current Slice ev:%0.2f" % float(xdata[slice1]))
    else:
        axes.set_title("Current Slice Wavelength:%0.2f" % float(xdata[slice1]))

    plt.yticks([])
    plt.xticks([])

    return img
예제 #2
0
def plot_image(img, axes, data, dataview):
    """updates the image on screen with a new cube slice from slider"""
    yimage = analysis.yimage_calc(data, dataview)
    img.set_array(yimage)
    max_color, min_color = analysis.colors_calc(data, dataview)
    if dataview.auto_color:
        img.autoscale()
        vmin, vmax = img.get_clim()
        dataview.mincolor = vmin
        dataview.maxcolor = vmax
    else:
        img.set_clim(vmax=max_color, vmin=min_color)
    xdata = analysis.xdata_calc(data, dataview)
    slice1 = dataview.slider_val
    if dataview.display_ev:
        axes.set_title("Current Slice ev:%0.2f" % float(xdata[slice1]))
    else:
        axes.set_title("Current Slice Wavelength:%0.0f " % float(xdata[slice1]))

    img.figure.canvas.draw()
예제 #3
0
def plot_image(img, axes, data, dataview):
    """updates the image on screen with a new cube slice from slider"""
    yimage = analysis.yimage_calc(data, dataview)
    img.set_array(yimage)
    max_color, min_color = analysis.colors_calc(data, dataview)
    if dataview.auto_color:
        img.autoscale()
        vmin, vmax = img.get_clim()
        dataview.mincolor = vmin
        dataview.maxcolor = vmax
    else:
        img.set_clim(vmax=max_color, vmin=min_color)
    xdata = analysis.xdata_calc(data, dataview)
    slice1 = dataview.slider_val
    if dataview.display_ev:
        axes.set_title('Current Slice ev:%0.2f' % float(xdata[slice1]))
    else:
        axes.set_title('Current Slice Wavelength:%0.0f ' %
                       float(xdata[slice1]))

    img.figure.canvas.draw()
예제 #4
0
def initialize_image(axes, data, dataview):
    'Initializes the image from the datacube'

    yimage = analysis.yimage_calc(data, dataview)
    maxval = analysis.maxval_calc(data, dataview)

    img = axes.imshow(yimage,
                      interpolation='nearest',
                      clim=(0, maxval),
                      cmap='spectral')

    xdata = analysis.xdata_calc(data, dataview)
    slice1 = dataview.slider_val
    if dataview.display_ev:
        axes.set_title('Current Slice ev:%0.2f' % float(xdata[slice1]))
    else:
        axes.set_title('Current Slice Wavelength:%0.2f' % float(xdata[slice1]))

    plt.yticks([])
    plt.xticks([])

    return img
예제 #5
0
def plot_pyqt(imv, data, dataview):
    yimage = analysis.yimage_calc(data, dataview)
    yimage = np.rot90(yimage, 1)
    imv.setImage(yimage)
예제 #6
0
def plot_pyqt(imv, data, dataview):
    yimage = analysis.yimage_calc(data, dataview)
    yimage = np.rot90(yimage, 1)
    imv.setImage(yimage)