sharppy.viz package

Submodules

Contains code to handle construction of the SHARPpy GUI.

sharppy.viz.SPCWindow module

Master class to handle the various insets, loop through the data, add in new ProfileCollections.

class sharppy.viz.SPCWindow.SPCWidget(**kwargs)[source]

Bases: PySide2.QtWidgets.QWidget

This will create the full SPC window, handle the organization of the insets, and handle all click/key events and features.

addProfileCollection(prof_col, prof_id, focus=True)[source]
advanceHighlight(direction)[source]
advanceTime(direction)[source]
closeEvent(self, event: PySide2.QtGui.QCloseEvent)[source]
defineUserParcel(parcel)[source]
getParcelName(prof, pcl)[source]
getParcelObj(prof, name)[source]
initData()[source]

Initializes all the widgets for the window. This gets initially called by __init__ :return:

inset_cfg = {('insets', 'left_inset'): 'SARS', ('insets', 'right_inset'): 'STP STATS'}
inset_generators = {'COND STP': <class 'sharppy.viz.stpef.plotSTPEF'>, 'FIRE': <class 'sharppy.viz.fire.plotFire'>, 'SARS': <class 'sharppy.viz.analogues.plotAnalogues'>, 'SHIP': <class 'sharppy.viz.ship.plotSHIP'>, 'STP STATS': <class 'sharppy.viz.stp.plotSTP'>, 'VROT': <class 'sharppy.viz.vrot.plotVROT'>, 'WINTER': <class 'sharppy.viz.winter.plotWinter'>}
inset_names = {'COND STP': 'EF-Scale Probs (Sig-Tor)', 'FIRE': 'Fire Weather', 'SARS': 'Sounding Analogues', 'SHIP': 'Sig-Hail Stats', 'STP STATS': 'Sig-Tor Stats', 'VROT': 'EF-Scale Probs (V-Rot)', 'WINTER': 'Winter Weather'}
interpProf()[source]
isAllObserved()[source]
isInterpolated()[source]
loadWidgets()[source]
makeInsetMenu(*exclude)[source]
modifyProf(idx, kwargs)[source]
modifyVector(deviant, vec_u, vec_v)[source]
parcel_cfg = {('parcel_types', 'pcl1'): 'SFC', ('parcel_types', 'pcl2'): 'ML', ('parcel_types', 'pcl3'): 'FCST', ('parcel_types', 'pcl4'): 'MU'}
paths_cfg = {('paths', 'save_img'): '/Users/travis', ('paths', 'save_txt'): '/Users/travis'}
pixmapToFile(file_name)[source]
resetProfInterpolation()[source]
resetProfModifications(args)[source]
resetVector()[source]
rmProfileCollection(prof_id)[source]
saveimage()[source]
savetext()[source]
setProfileCollection(prof_id)[source]
showCursorMenu(pos)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
swapInset()[source]
swapProfCollections()[source]
toggleCollectObserved()[source]
toggleVector(deviant)[source]
updateConfig(config, update_gui=True)[source]
updateParcel(pcl)[source]
updateProfs()[source]
updateSARS(filematch)[source]
class sharppy.viz.SPCWindow.SPCWindow(**kwargs)[source]

Bases: PySide2.QtWidgets.QMainWindow

addProfileCollection(prof_col, focus=True, check_integrity=True)[source]
closeEvent(self, event: PySide2.QtGui.QCloseEvent)[source]
closeIfEmpty()[source]
closed = <PySide2.QtCore.Signal object>
createMenuBar()[source]
createMenuName(prof_col)[source]
createProfileMenu(prof_col)[source]
focusPicker()[source]
interpProf()[source]
keyPressEvent(self, event: PySide2.QtGui.QKeyEvent)[source]
removeProfileMenu(menu_name)[source]
resetProf()[source]
rmProfileCollection(menu_name)[source]
setInterpolated(is_interpolated)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
testDataIntegrity(prof)[source]
updateConfig()[source]

sharppy.viz.advection module

Plots the Inferred Temperature Advection inset.

class sharppy.viz.advection.backgroundAdvection[source]

Bases: PySide2.QtWidgets.QFrame

Draw the background frame and lines for the Theta-E plot frame

adv_to_pix(a)[source]

Function to convert an advection value to a X pixel.

draw_centerline(qp)[source]
draw_frame(qp)[source]

Draw the background frame. qp: QtGui.QPainter object

initUI()[source]
plotBackground()[source]

Handles painting the frame.

pres_to_pix(p)[source]

Function to convert a pressure value to a Y pixel.

resizeEvent(e)[source]

Handles the event the window is resized

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.advection.plotAdvection[source]

Bases: sharppy.viz.advection.backgroundAdvection

Plot the data on the frame. Inherits the background class that plots the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

paintEvent(e)[source]

Handles painting on the frame

plotData(qp)[source]
resizeEvent(e)[source]

Handles when the window is resized

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.analogues module

The SARS Inset.

class sharppy.viz.analogues.backgroundAnalogues[source]

Bases: PySide2.QtWidgets.QFrame

Handles drawing the background frame for the SARS window.

draw_frame(qp)[source]

Draws the background frame and the text headers.

initUI()[source]

Initializes the frame.

The frame is drawn on a QPixmap, and is not rendered visible in this function.

plotBackground()[source]

Handles drawing the text background.

This draws onto a QPixmap.

resizeEvent(e)[source]

Handles when the window gets resized.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.analogues.plotAnalogues[source]

Bases: sharppy.viz.analogues.backgroundAnalogues

clearData()[source]

Handles the clearing of the pixmap in the frame.

clearSelection()[source]
drawSARS(qp, **kwargs)[source]

This draws the SARS matches.

Parameters
  • qp (a QtGui.QPainter Object) –

  • type (A string for the type of) – SARS matches. ‘HAIL’ for hail matches and ‘TOR’ for supercell matches.

mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
paintEvent(e)[source]

Handles drawing the QPixmap onto the widget.

Parameters

e (an Event object) –

plotData()[source]

Handles the drawing of the SARS matches onto the QPixmap.

resizeEvent(e)[source]

Handles when the window is resized.

Parameters

e (an Event object) –

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
setSelection(filematch)[source]

Load in the SARS analog you’ve clicked.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
updatematch = <PySide2.QtCore.Signal object>

Handles the non-background plotting of the SARS window. This inherits a backgroundAnalogues Object that takes care of drawing the frame background onto a QPixmap. This will inherit that QPixmap and continue drawing on it, finally rendering the QPixmap via the function paintEvent.

sharppy.viz.barbs module

Routines for drawing wind barbs.

sharppy.viz.barbs.drawBarb(qp, origin_x, origin_y, wdir, wspd, color='#FFFFFF', shemis=False)[source]
sharppy.viz.barbs.drawBarb_old(qp, origin_x, origin_y, u, v, color='#FFFFFF')[source]
sharppy.viz.barbs.drawFlag(path, shemis=False)[source]
sharppy.viz.barbs.drawFullBarb(path, shemis=False)[source]
sharppy.viz.barbs.drawHalfBarb(path, shemis=False)[source]

sharppy.viz.draggable module

Routines to handle dragging various stuff in the insets. Primarily used in the skew.py and hodo.py files to handle the click and drag feature of the sounding data.

class sharppy.viz.draggable.Draggable(x_obj, y_obj, background, cutoff=5, lock_dim=None, line_color=PySide2.QtGui.QColor.fromRgbF(1.0, 1.0, 1.0, 1.0))[source]

Bases: object

The Draggable class implements low-level clicking and dragging on widgets.

click(click_x, click_y)[source]
Check to see whether the user clicked on a vertex in this profile. If they did, initialize

the drag operation.

click_x: x coordinate in pixels of the click click_y: y coordinate in pixels of the click Returns a boolean specifying whether a drag operation was initialized.

drag(drag_x, drag_y, restrictions=None)[source]
Drag a point or a vertex in a line. Applies restrictions to the drag point based on the lock_dim

argument to the constructor and the restrictions argument to this method.

drag_x: x coordinate in pixels of the point to drag to. drag_y: y coordinate in pixels of the point to drag to. restrictions: A callable object (e.g. callback function) that takes two arguments (x and y

coordinates) and returns a modified x and y based on restrictions on the dragging. Used, for example, to restrict dragging on the temperature line to be greater than the dewpoint.

getBackground()[source]

Returns the current background as a QPixmap

getCoords()[source]

Returns the current coordinates as numpy arrays

isDragging()[source]

Returns a boolean specifying whether or not this object is in the middle of a drag operation.

release(rls_x, rls_y, restrictions=None)[source]

Release the drag, which finishes the drag operation. rls_x: x coordinate in pixels of the release point rls_y: y coordinate in pixels of the release point restrictions: [See the release argument to the drag method]

setBackground(background)[source]

Change the background pixmap. background: A QPixmap containing the new background

setCoords(x_obj, y_obj)[source]

Change the coordinates. x_obj: x coordinate(s) in pixels of the new object y_obj: y coordinate(s) in pixesl of the new object

sharppy.viz.ensemble module

Draft inset to show the Ensemble data in a scatter plot format.

class sharppy.viz.ensemble.backgroundENS[source]

Bases: PySide2.QtWidgets.QFrame

Draw the background frame and lines for the Theta-E plot frame

draw_frame(qp)[source]

Draw the background frame. qp: QtGui.QPainter object

initUI()[source]
plotBackground()[source]

Handles painting the frame.

resizeEvent(e)[source]

Handles the event the window is resized

setBlackPen(qp)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
x_to_xpix(x)[source]
y_to_ypix(y)[source]
class sharppy.viz.ensemble.plotENS[source]

Bases: sharppy.viz.ensemble.backgroundENS

Plot the data on the frame. Inherits the background class that plots the frame.

addProfileCollection(prof_coll)[source]
clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_ensemble_point(qp, prof)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles drawing of data on the frame.

resizeEvent(e)[source]

Handles when the window is resized

rmProfileCollection(prof_coll)[source]
setActiveCollection(pc_idx, **kwargs)[source]
setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.fire module

The Fire Inset.

class sharppy.viz.fire.backgroundFire[source]

Bases: PySide2.QtWidgets.QFrame

Handles drawing the background frame.

draw_frame(qp)[source]

Draws the background frame and the text headers for indices.

initUI()[source]
plotBackground()[source]

Handles drawing the text background.

resizeEvent(e)[source]

Handles when the window gets resized.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.fire.plotFire[source]

Bases: sharppy.viz.fire.backgroundFire

Handles plotting the indices in the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

drawFosberg(qp)[source]
drawHainesIndex(qp)[source]
drawPBLchar(qp)[source]
getFosbergFormat()[source]
getHainesFormat()[source]
getMaxWindFormat()[source]
getPWColor()[source]
getSfcRHFormat()[source]
mousePressEvent(e)[source]

Handles mouse click event to switch Haines Index elevations

paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles the drawing of the text on the frame.

resizeEvent(e)[source]

Handles when the window is resized.

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.generic module

Code for a generic inset. Essentially a template for future insets.

class sharppy.viz.generic.backgroundGeneric(**kwargs)[source]

Bases: PySide2.QtWidgets.QFrame

A generic class for drawing the background of a widget.

draw_frame(qp)[source]

Draws the background frame for the widget. The background frame includes the background color and the frame border. This is primarily used in the initUI function and is not necessarily intended to be called outside of it.

Parameters

qp – QtGui.QPainter object

Returns

None

draw_text(x, y, text, fontsize=12, color='#FFFFFF', linewidth=1, font='Helvetica')[source]

Draw text on the widget. :return:

draw_xticks(qp)[source]

Dray the xtick labels for the frame.

Parameters

qp – a QtGui.QPainter object

Returns

None

draw_yticks(qp)[source]

Dray the ytick labels for the frame.

Parameters

qp – a QtGui.QPainter object

Returns

None

initUI()[source]

Initialize the user interface. This will set necessary constants such as margins, min/max axes values, font sizes, etc.

Returns

None

plotBackground()[source]

Handles the drawing of the background on the widget. :return: None

resizeEvent(e)[source]

Handles what to do when the widget is resized. This will call self.initUI() when resized in order to re-generate the necessary variables.

Returns

None

set_xlim(xmin, xmax)[source]

Set the range of values for the x axis.

Parameters
  • xmin – The minimum x axis value

  • xmax – The maximum x axis value

Returns

None

set_ylim(ymin, ymax)[source]

Set the range of values for the y axis.

Parameters
  • ymin – The minimum y axis value

  • ymax – The maximum y axis value

Returns

None

staticMetaObject = <PySide2.QtCore.QMetaObject object>
x_to_pix(x)[source]

Scale an x coordinate value to pixel space and return it.

Parameters

x – An x coordinate value

Returns

x converted to pixel space

y_to_pix(y)[source]

Scale a y coordinate value to pixel space and return it.

Parameters

y – A y coordinate value

Returns

y converted to pixel space

class sharppy.viz.generic.plotGeneric(x, y, **kwargs)[source]

Bases: sharppy.viz.generic.backgroundGeneric

A generic object to plot the foreground of a plot. This inherits from the Background Class that holds frame constants, getters, and setters.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_lines(qp)[source]

Draw the line profile on the widget

Parameters

qp – QtGui.QPainter object

Returns

None

paintEvent(e)[source]

Handles the paint event and calls the functions to draw on the frame.

Parameters

e – an Event object

Returns

None

plotData()[source]

Plot the data on the frame. :return: None

resizeEvent(e)[source]

Handles the resizing of the frame

Parameters

e – an Event object

Returns

None

setProf(x, y, **kwargs)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.hodo module

Draw the hodograph inset and handle the interactivity with the hodograph.

class sharppy.viz.hodo.backgroundHodo(**kwargs)[source]

Bases: PySide2.QtWidgets.QFrame

Handles the plotting of the backgroun frame onto a QPixmap. Inherits from the QtWidgets.QFrame object. Unlike most plotting classes in SHARPPy, this class will not call the function to draw the background. This is so that the background can be redrawn when the hodograph gets centered on a vector.

center_hodo(point)[source]

Center the hodograph in the window. It will either center it about the origin, about the mean wind vector, or the storm motion vector.

Parameters

point (A (u,v) vector that the hodograph is to be centered on.) –

draw_axes(qp)[source]

Draw the X, Y Axes.

Parameters

qp (QtGui.QPainter object) –

draw_frame(qp)[source]

Draw frame around object.

Parameters

qp (QtGui.QPainter object) –

draw_ring(spd, qp)[source]

Draw a range ring.

Parameters
  • spd (wind speed) –

  • qp (QtGui.QPainter object) –

hodo_to_pix(ang, spd)[source]

Function to convert a (direction, speed) to (x, y) coordinates.

Parameters
  • ang (wind direction) –

  • spd (wind speed) –

initUI()[source]

Initialize the User Interface

pix_to_uv(xx, yy)[source]

Function to convert (x,y) to (u,v) coordinates.

Parameters
  • xx (the x pixel value) –

  • yy (the y pixel value) –

plotBackground()[source]

Handles painting the frame background onto the QPixmap.

resizeEvent(e)[source]

Resize the plot based on adjusting the main window.

Parameters

e (an Event object) –

staticMetaObject = <PySide2.QtCore.QMetaObject object>
uv_to_pix(u, v)[source]

Function to convert (u, v) to (x, y) coordinates.

Parameters
  • u (the u wind component) –

  • v (the v wind component) –

wheelEvent(e)[source]

Handeles the zooming of the hodograph window.

Parameters

e (an Event object) –

class sharppy.viz.hodo.plotHodo(**kwargs)[source]

Bases: sharppy.viz.hodo.backgroundHodo

Plots the data on the hodograph. Inherits from the backgroundHodo class that plots the background frame onto a QPixmap.

addProfileCollection(prof_coll)[source]
calculateStormMode()[source]

Logic based off of some of the key findings in Dial et al. (2010)

clearData()[source]

Clears/resets the base QPixmap.

cursorMove(hght)[source]
cursorToggle(toggle)[source]
drawCorfidi(qp)[source]

Draw the Corfidi upshear/downshear vectors

Parameters

qp (a QPainter object) –

drawCriticalAngle(qp)[source]

Plot the critical angle on the hodograph and show the value in the hodograph.

Parameters

qp (QtGui.QPainter object) –

drawLCLtoEL_MW(qp)[source]

Draws the LCL to EL mean wind onto the hodo.

Parameters

qp (a QPainter object) –

drawSMV(qp)[source]

Draws the storm motion vector.

Parameters

qp (QtGui.QPainter object) –

draw_hodo(qp, prof, colors, width=2)[source]

Plot the Hodograph.

Parameters

qp (QtGui.QPainter object) –

draw_profile(qp, prof, color='#6666CC', width=2)[source]

Plot the Hodograph.

Parameters

qp (QtGui.QPainter object) –

modified = <PySide2.QtCore.Signal object>
modified_vector = <PySide2.QtCore.Signal object>
mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mouseMoveEvent(e)[source]

Handles the tracking of the mouse to provide the dynamic readouts.

Parameters

e (an Event object) –

mousePressEvent(e)[source]

Handles when the mouse is pressed. Used to set the storm motion vector.

Parameters

e (an Event object) –

mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
paintEvent(e)[source]

Handles painting the QPixmap onto the QWidget frame.

Parameters

e (an Event object) –

plotBndy(direction)[source]
plotData()[source]

Handles the plotting of the data in the QPixmap.

reset = <PySide2.QtCore.Signal object>
reset_vector = <PySide2.QtCore.Signal object>
resizeEvent(e)[source]

Resize the plot based on adjusting the main window.

Parameters

e (an Event object) –

rmProfileCollection(prof_coll)[source]
setActiveCollection(pc_idx, **kwargs)[source]
setAllObserved(all_observed, update_gui=True)[source]
setBlackPen(qp)[source]
setBndyCursor()[source]
setDeviant(deviant)[source]
setMWCenter()[source]
setNoCursor()[source]
setNormalCenter()[source]
setPreferences(update_gui=True, **kwargs)[source]
setSRCenter()[source]
showCursorMenu(pos)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
toggle_vector = <PySide2.QtCore.Signal object>
updateDraggables()[source]
wheelEvent(e)[source]

Handles the zooming of the hodograph.

Parameters

e (an Event object) –

sharppy.viz.kinematics module

The Kinematics Inset

class sharppy.viz.kinematics.backgroundKinematics(**kwargs)[source]

Bases: PySide2.QtWidgets.QFrame

Handles drawing the background frame.

draw_frame(qp)[source]

Draws the background frame and the text headers for indices.

initUI()[source]
plotBackground()[source]

Handles drawing the text background.

resizeEvent(e)[source]

Handles when the window gets resized.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.kinematics.plotKinematics(**kwargs)[source]

Bases: sharppy.viz.kinematics.backgroundKinematics

Handles plotting the indices in the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

drawBarbs(qp)[source]
drawKinematics(qp)[source]

qp: QtGui.QPainter object

paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles the drawing of the text on the frame.

resizeEvent(e)[source]

Handles when the window is resized.

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.map module

Code to handle drawing the map in the Picker

class sharppy.viz.map.MapWidget(data_source, init_time, async_object, **kwargs)[source]

Bases: PySide2.QtWidgets.QWidget

clicked = <PySide2.QtCore.Signal object>
drawMap()[source]
drawPolitical(qp)[source]
drawStations(qp)[source]
getBackground()[source]
hasInternet(has_connection)[source]
initMap()[source]
initUI()[source]
keyPressEvent(self, event: PySide2.QtGui.QKeyEvent)[source]
mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
paintEvent(self, event: PySide2.QtGui.QPaintEvent)[source]
resetViewport(ctr_lat=None, ctr_lon=None)[source]
resizeEvent(self, event: PySide2.QtGui.QResizeEvent)[source]
saveProjection(config)[source]
setCurrentTime(data_time, init=False)[source]
setDataSource(data_source, data_time, init=False)[source]
setProjection(proj)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
wheelEvent(self, event: PySide2.QtGui.QWheelEvent)[source]
class sharppy.viz.map.Mapper(lambda_0, phi_0, proj='npstere')[source]

Bases: object

data_dir = '/Users/travis/build/sharppy/SHARPpy/sharppy/databases/shapefiles'
getBoundary(name)[source]
getCoordPaths()[source]
getLambda0()[source]
getLatBounds()[source]
getPhi0()[source]
getProjection()[source]
max_lat = {'merc': 35.0, 'npstere': 90.0, 'spstere': 0.0}
min_lat = {'merc': -35.0, 'npstere': 0.0, 'spstere': -90.0}
setLambda0(lambda_0)[source]
setProjection(proj)[source]

sharppy.viz.preferences module

Code to handle the preferences window.

class sharppy.viz.preferences.ColorPreview(styles, default='standard', **kwargs)[source]

Bases: PySide2.QtWidgets.QWidget

changeImage(img_index)[source]
paintEvent(self, event: PySide2.QtGui.QPaintEvent)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.preferences.ColorSwatch(color, parent=None)[source]

Bases: PySide2.QtWidgets.QWidget

A color swatch widget for displaying and selecting colors.

enterEvent(e)[source]

Enter event handler (sets the cursor to a pointing hand).

getColor()[source]

Returns the current color as a QColor

getHexColor()[source]

Returns the current color as a hex string.

leaveEvent(e)[source]

Leave event handler (sets the cursor to whatever it was before).

mousePressEvent(e)[source]

Mouse press event handler (opens a dialog to select a new color for the swatch).

paintEvent(e)[source]

Paint event handler

setColor(new_color)[source]

Set the color of the swatch. new_color: A QColor containing the new color.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.preferences.PrefDialog(config, parent=None)[source]

Bases: PySide2.QtWidgets.QDialog

The preferences dialog box for SHARPpy.

applyChanges()[source]

Apply the state of the preferences box to the configuration and close the box.

static initConfig(config)[source]

Initialize the configuration with the user preferences [static method]. config: A Config object containing the configuration.

rejectChanges()[source]

Close the box without applying the changes to the configuration.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
sharppy.viz.preferences.resource_path()[source]

sharppy.viz.ship module

The SHIP-Stats Inset.

class sharppy.viz.ship.backgroundSHIP[source]

Bases: PySide2.QtWidgets.QFrame

Draw the background frame and lines for the Theta-E plot frame

draw_frame(qp)[source]

Draw the background frame. qp: QtGui.QPainter object

initUI()[source]
plotBackground()[source]

Handles painting the frame.

resizeEvent(e)[source]

Handles the event the window is resized

ship_to_pix(ship)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.ship.plotSHIP[source]

Bases: sharppy.viz.ship.backgroundSHIP

Plot the data on the frame. Inherits the background class that plots the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_ship(qp)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles painting on the frame

resizeEvent(e)[source]

Handles when the window is resized

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
ship_color(ship)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.skew module

Draw the skew-t and handle the interactivity with the Skew-T

class sharppy.viz.skew.backgroundSkewT(plot_omega=False)[source]

Bases: PySide2.QtWidgets.QWidget

draw_dry_adiabat(theta, qp)[source]

Draw the given moist adiabat.

draw_frame(qp)[source]

Draw the frame around the Skew-T.

draw_isobar(p, flag, qp)[source]

Draw background isobars.

draw_isotherm(t, qp)[source]

Draw background isotherms.

draw_isotherm_labels(t, qp)[source]

Add Isotherm Labels.

draw_mixing_ratios(w, pmin, qp)[source]

Draw the mixing ratios.

draw_moist_adiabat(tw, qp)[source]

Draw the given moist adiabat.

initUI()[source]

Initialize the User Interface.

pix_to_pres(y)[source]

Function to convert a Y pixel to a pressure level.

pix_to_tmpc(x, y)[source]

Function to convert an (x, y) pixel into a temperature

plotBackground()[source]
pres_to_pix(p)[source]

Function to convert a pressure value (level) to a Y pixel.

resizeEvent(e)[source]

Resize the plot based on adjusting the main window.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
tmpc_to_pix(t, p)[source]

Function to convert a (temperature, pressure) coordinate to an X pixel.

wheelEvent(self, event: PySide2.QtGui.QWheelEvent)[source]
class sharppy.viz.skew.plotSkewT(**kwargs)[source]

Bases: sharppy.viz.skew.backgroundSkewT

addProfileCollection(prof_coll)[source]
clearData()[source]

Handles the clearing of the pixmap in the frame.

closeEvent(self, event: PySide2.QtGui.QCloseEvent)[source]
cursor_move = <PySide2.QtCore.Signal object>
cursor_toggle = <PySide2.QtCore.Signal object>
drawBarbs(prof, qp, color=None)[source]
drawSTDEV(pres, data, stdev, color, qp, width=1)[source]

Draw the error bars on the profile.

drawTitles(qp)[source]
drawTrace(data, color, qp, width=3, style=PySide2.QtCore.Qt.PenStyle.SolidLine, p=None, stdev=None, label=True)[source]

Draw an environmental trace.

drawVirtualParcelTrace(ttrace, ptrace, qp, width=1, color=None)[source]

Draw a parcel trace.

draw_effective_layer(qp)[source]

Draw the bounds of the effective inflow layer.

draw_height(h, qp)[source]
draw_max_lapse_rate_layer(qp, bound=4.5)[source]

Draw the bounds of the maximum lapse rate layer.

draw_omega_profile(qp)[source]
draw_parcel_levels(qp)[source]
draw_pbl_level(qp)[source]
draw_sig_levels(qp, plevel=1000, color=None, var_id='')[source]
draw_temp_levels(qp)[source]
getPlotTitle(prof_coll)[source]
getReadoutVal(var)[source]
getStyleSheet(color, fsize=11)[source]
liftparcellevel(i)[source]
modified = <PySide2.QtCore.Signal object>
modifySfc()[source]
mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
omeg_to_pix(omeg)[source]
paintEvent(self, event: PySide2.QtGui.QPaintEvent)[source]
parcel = <PySide2.QtCore.Signal object>
plotData()[source]

Plot the data used in a Skew-T.

reset = <PySide2.QtCore.Signal object>
resizeEvent(e)[source]

Resize the plot based on adjusting the main window.

rmProfileCollection(prof_coll)[source]
setActiveCollection(pc_idx, **kwargs)[source]
setAllObserved(all_observed, update_gui=True)[source]
setDGZ(flag)[source]
setDeviant(deviant)[source]
setNoCursor()[source]
setPBLLevel(flag)[source]
setParcel(parcel)[source]
setPreferences(update_gui=True, **kwargs)[source]
setReadoutCursor()[source]
showCursorMenu(pos)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
updateReadout()[source]
wheelEvent(self, event: PySide2.QtGui.QWheelEvent)[source]

sharppy.viz.slinky module

Draw the storm slinky.

class sharppy.viz.slinky.backgroundSlinky[source]

Bases: PySide2.QtWidgets.QFrame

Draw the background frame and lines for the Storm Slinky. Draws onto a QPixmap.

center_frame()[source]

Center the slinky in the window.

draw_axes(qp)[source]

Draw the X, Y Axes.

Parameters

qp (QtGui.QPainter object) –

draw_frame(qp)[source]

Draw the background frame.

Parameters

qp (QtGui.QPainter object) –

initUI()[source]
plotBackground()[source]

Draws the background frame onto the QPixmap.

resizeEvent(e)[source]

Handles the event the window is resized.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
xy_to_pix(x, y)[source]

x: the x distance component y: the y distance component

class sharppy.viz.slinky.plotSlinky(**kwargs)[source]

Bases: sharppy.viz.slinky.backgroundSlinky

Plots the data on the frame. Inherits from the backgroundSlinky class and draws on the QPixmap that is initialized there.

clearData()[source]

Handles the clearing of the pixmap in the frame.

paintEvent(e)[source]

Handles painting the QPixmap onto the frame.

Parameters

e (an Event object) –

plotData()[source]

Draws the data onto the QPixmap.

plotSMV(qp)[source]

Draws the line representing the Storm Motion Vector.

Parameters

qp (a QtGui.QPainter object) –

plotSlinky(qp)[source]

Plots the circles of the Storm Slinky.

Parameters

qp (a QtGui.QPainter object) –

plotTilt(qp)[source]

Plots the data for the updraft tilt.

Parameters

qp (a QtGui.QPainter object) –

resizeEvent(e)[source]

Handles when the window is resized.

Parameters

e (an Event object) –

setDeviant(deviant)[source]
setParcel(pcl)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.speed module

Draw the wind speed with height.

class sharppy.viz.speed.backgroundSpeed[source]

Bases: PySide2.QtWidgets.QFrame

Handles drawing the plot background.

draw_frame(qp)[source]

Draws the frame boarders.

draw_speed(s, qp, delta=0, drawlabel=True)[source]

s: wind speed qp: QtGui.QPainter object

initUI()[source]
plotBackground()[source]

Handles painting the frame.

pres_to_pix(p)[source]

Function to convert a pressure value to a Y pixel.

resizeEvent(e)[source]

Handles when the window is resized.

speed_to_pix(s)[source]

Function to convert a wind speed value to a X pixel.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.speed.plotSpeed[source]

Bases: sharppy.viz.speed.backgroundSpeed

Handles plotting the data in the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_profile(qp)[source]

qp: QtGui.QPainter object

paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles drawing the data on the frame.

resizeEvent(e)[source]

Handles when the window is resized.

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.srwinds module

Draw the storm-relative winds with height inset.

class sharppy.viz.srwinds.backgroundWinds[source]

Bases: PySide2.QtWidgets.QFrame

Handles the plotting of the frame boarders and ticks. Draws the frame onto a QPixmap.

draw_frame(qp)[source]

Draws the background frame.

Parameters

qp (QtGui.QPainter object) –

draw_height(h, qp)[source]

Draw background height ticks in km.

Parameters
  • h (height in km) –

  • qp (QtGui.QPainter object) –

draw_speed(s, qp)[source]

Draw background speed ticks.

Parameters
  • s (windpeed) –

  • qp (QtGui.QPainter object) –

hgt_to_pix(h)[source]

Function to convert a height value (km) to a Y pixel.

Parameters

h (height in km) –

initUI()[source]

Initializes the frame attributes and QPixmap.

plotBackground()[source]

This paints the frame background onto the QPixmap.

resizeEvent(e)[source]

Handles the event the window is resized.

speed_to_pix(s)[source]

Function to convert a wind speed value to a X pixel.

Parameters

s (speed in kts) –

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.srwinds.plotWinds[source]

Bases: sharppy.viz.srwinds.backgroundWinds

Draws the storm relative winds vs. height. Inherits from the backgroundWinds class that contains the QPixmap with the background frame drawn on it.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_profile(qp)[source]

Draws the storm relative wind profile.

Parameters

qp (QtGui.QPainter object) –

paintEvent(e)[source]

Handles the painting of the QPixmap onto the QWidget.

Parameters

e (an Event object) –

plotData()[source]

Handles painting the plot data onto the QPixmap.

resizeEvent(e)[source]

Handles when the window is resized.

Parameters

e (an Event object) –

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.stp module

The STP Stats Inset

class sharppy.viz.stp.backgroundSTP[source]

Bases: PySide2.QtWidgets.QFrame

Draw the background frame and lines for the STP plot frame

draw_frame(qp)[source]

Draw the background frame. qp: QtGui.QPainter object

initUI()[source]
plotBackground()[source]

Handles painting the frame.

resizeEvent(e)[source]

Handles the event the window is resized

staticMetaObject = <PySide2.QtCore.QMetaObject object>
stp_to_pix(stp)[source]
class sharppy.viz.stp.plotSTP[source]

Bases: sharppy.viz.stp.backgroundSTP

Plot the data on the frame. Inherits the background class that plots the frame.

cape_prob(cape)[source]
clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_box(qp)[source]
draw_stp(qp)[source]
ebwd_prob(ebwd)[source]
esrh_prob(esrh)[source]
lcl_prob(lcl)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles painting on the frame

resizeEvent(e)[source]

Handles when the window is resized

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
stpc_prob(stpc)[source]
stpf_prob(stpf)[source]

sharppy.viz.stpef module

The STP EF Inset

class sharppy.viz.stpef.backgroundSTPEF[source]

Bases: PySide2.QtWidgets.QFrame

Draw the background frame and lines for the Theta-E plot frame

draw_frame(qp)[source]

Draw the background frame. qp: QtGui.QPainter object

initUI()[source]
plotBackground()[source]

Handles painting the frame.

prob_to_pix(prob)[source]
resizeEvent(e)[source]

Handles the event the window is resized

setBlackPen(qp)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
stpc_to_pix(stpc)[source]
class sharppy.viz.stpef.plotSTPEF[source]

Bases: sharppy.viz.stpef.backgroundSTPEF

Plot the data on the frame. Inherits the background class that plots the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_stp(qp)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles painting on the frame

resizeEvent(e)[source]

Handles when the window is resized

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.thermo module

The Thermodynamic Indices Inset

class sharppy.viz.thermo.backgroundText(**kwargs)[source]

Bases: PySide2.QtWidgets.QFrame

Handles drawing the background frame onto a QPixmap. Inherits a QtWidgets.QFrame Object.

draw_frame(qp)[source]

Draws the background frame and the text headers for indices.

initUI()[source]

Initializes frame variables such as padding, width, height, etc, as well as the QPixmap that contains the frame drawing.

plotBackground()[source]

Handles drawing the text background onto the QPixmap.

resizeEvent(e)[source]

Handles when the window gets resized.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.thermo.plotText(pcl_types)[source]

Bases: sharppy.viz.thermo.backgroundText

clearData()[source]

Handles the clearing of the pixmap in the frame.

drawConvectiveIndices(qp)[source]

This handles the drawing of the parcel indices.

Parameters

qp (QtGui.QPainter object) –

drawIndices(qp)[source]

Draws the non-parcel indices.

Parameters

qp (QtGui.QPainter object) –

drawSevere(qp)[source]

This handles the severe indices, such as STP, sig hail, etc.

Parameters

qp (QtGui.QPainter object) –

mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
paintEvent(e)[source]

Handles when the window gets painted. This renders the QPixmap that the backgroundText Object contians. For the actual drawing of the data, see the plotData function.

e: an Event Object

plotData()[source]

Handles the drawing of the text onto the QPixmap. This is where the actual data gets plotted/drawn.

resizeEvent(e)[source]

Handles when the window is resized.

e: an Event Object

setDefaultParcel()[source]
setDeviant(deviant)[source]
setParcels(prof)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
updatepcl = <PySide2.QtCore.Signal object>

Handles plotting the indices in the frame. Inherits a backgroundText Object that contains a QPixmap with the frame drawn on it. All drawing gets done on this QPixmap, and then the QPixmap gets rendered by the paintEvent function.

sharppy.viz.thetae module

Draw the equivalent potential temperature profile.

class sharppy.viz.thetae.backgroundThetae[source]

Bases: PySide2.QtWidgets.QFrame

Draw the background frame and lines for the Theta-E plot. Draws the background on a QPixmap.

Inherits a QtWidgets.QFrame Object

clear()[source]

Clear the widget

draw_frame(qp)[source]

Draw the background frame.

Parameters

qp (QtGui.QPainter object) –

draw_isobar(p, qp)[source]

Draw background isobar ticks.

Parameters
  • p (pressure in hPa or mb) –

  • qp (QtGui.QPainter object) –

draw_thetae(t, qp)[source]

Draw background Theta-E ticks.

Parameters
  • t (Theta-E in degrees Kelvin) –

  • qp (QtGui.QPainter object) –

initUI()[source]

Initializes window variables and the QPixmap that gets drawn on.

plotBackground()[source]

Handles the drawing of the background onto the QPixmap.

pres_to_pix(p)[source]

Function to convert a pressure value (hPa) to a Y pixel.

Parameters

p (pressure in hPa or mb) –

resizeEvent(e)[source]

Handles the event the window is resized.

Parameters

e (an Event object) –

staticMetaObject = <PySide2.QtCore.QMetaObject object>
theta_to_pix(t)[source]

Function to convert a Theta-E value (K) to a X pixel.

Parameters

t (temperature in Kelvin) –

class sharppy.viz.thetae.plotThetae[source]

Bases: sharppy.viz.thetae.backgroundThetae

Draws the theta-E window. Inherits from the backgroundThetae class that handles plotting of the frame. Draws the contours to the QPixmap inherited by the backgroundThetae class.

draw_profile(qp)[source]

Draw the Theta-E v. Pres profile.

Parameters

qp (QtGui.QPainter object) –

paintEvent(e)[source]

Draws the QPixmap onto the QWidget.

Parameters

e (an Event object) –

plotData()[source]

Plots the data onto the QPixmap.

resizeEvent(e)[source]

Handles when the window is resized.

Parameters

e (an Event object) –

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.vrot module

The VROT Inset.

class sharppy.viz.vrot.backgroundVROT[source]

Bases: PySide2.QtWidgets.QFrame

Draw the background frame and lines for the Theta-E plot frame

draw_frame(qp)[source]

Draw the background frame. qp: QtGui.QPainter object

initUI()[source]
plotBackground()[source]

Handles painting the frame.

prob_to_pix(prob)[source]
resizeEvent(e)[source]

Handles the event the window is resized

setBlackPen(qp)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
vrot_to_pix(vrot)[source]

Function to convert a wind speed value to a X pixel.

Parameters

s (speed in kts) –

class sharppy.viz.vrot.plotVROT[source]

Bases: sharppy.viz.vrot.backgroundVROT

Plot the data on the frame. Inherits the background class that plots the frame.

draw_vrot(qp)[source]
interp_vrot()[source]
mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
openInputDialog()[source]

Opens the text version of the input dialog

paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles painting on the frame

resizeEvent(e)[source]

Handles when the window is resized

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.watch module

Draw the possible hazard type.

class sharppy.viz.watch.backgroundWatch[source]

Bases: PySide2.QtWidgets.QFrame

Draw the background frame and lines for the watch plot frame

draw_frame(qp)[source]

Draw the background frame. qp: QtGui.QPainter object

initUI()[source]
plotBackground()[source]
resizeEvent(e)[source]

Handles the event the window is resized

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.watch.plotWatch[source]

Bases: sharppy.viz.watch.backgroundWatch

Plot the data on the frame. Inherits the background class that plots the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

paintEvent(e)[source]

Handles painting on the frame

plotData()[source]
resizeEvent(e)[source]

Handles when the window is resized

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

sharppy.viz.winter module

The Winter Inset

class sharppy.viz.winter.backgroundWinter[source]

Bases: PySide2.QtWidgets.QFrame

Handles drawing the background frame.

draw_frame(qp)[source]

Draws the background frame and the text headers for indices.

initUI()[source]
plotBackground()[source]

Handles drawing the text background.

resizeEvent(e)[source]

Handles when the window gets resized.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.winter.plotWinter[source]

Bases: sharppy.viz.winter.backgroundWinter

Handles plotting the indices in the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

drawDGZLayer(qp)[source]
drawInitial(qp)[source]

qp: QtGui.QPainter object

drawOPRH(qp)[source]
drawPrecipType(qp)[source]
drawPrecipTypeTemp(qp)[source]
drawWCLayer(qp)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles the drawing of the text on the frame.

resizeEvent(e)[source]

Handles when the window is resized.

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

Module contents

class sharppy.viz.plotSkewT(**kwargs)[source]

Bases: sharppy.viz.skew.backgroundSkewT

addProfileCollection(prof_coll)[source]
clearData()[source]

Handles the clearing of the pixmap in the frame.

closeEvent(self, event: PySide2.QtGui.QCloseEvent)[source]
cursor_move = <PySide2.QtCore.Signal object>
cursor_toggle = <PySide2.QtCore.Signal object>
drawBarbs(prof, qp, color=None)[source]
drawSTDEV(pres, data, stdev, color, qp, width=1)[source]

Draw the error bars on the profile.

drawTitles(qp)[source]
drawTrace(data, color, qp, width=3, style=PySide2.QtCore.Qt.PenStyle.SolidLine, p=None, stdev=None, label=True)[source]

Draw an environmental trace.

drawVirtualParcelTrace(ttrace, ptrace, qp, width=1, color=None)[source]

Draw a parcel trace.

draw_effective_layer(qp)[source]

Draw the bounds of the effective inflow layer.

draw_height(h, qp)[source]
draw_max_lapse_rate_layer(qp, bound=4.5)[source]

Draw the bounds of the maximum lapse rate layer.

draw_omega_profile(qp)[source]
draw_parcel_levels(qp)[source]
draw_pbl_level(qp)[source]
draw_sig_levels(qp, plevel=1000, color=None, var_id='')[source]
draw_temp_levels(qp)[source]
getPlotTitle(prof_coll)[source]
getReadoutVal(var)[source]
getStyleSheet(color, fsize=11)[source]
liftparcellevel(i)[source]
modified = <PySide2.QtCore.Signal object>
modifySfc()[source]
mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
omeg_to_pix(omeg)[source]
paintEvent(self, event: PySide2.QtGui.QPaintEvent)[source]
parcel = <PySide2.QtCore.Signal object>
plotData()[source]

Plot the data used in a Skew-T.

reset = <PySide2.QtCore.Signal object>
resizeEvent(e)[source]

Resize the plot based on adjusting the main window.

rmProfileCollection(prof_coll)[source]
setActiveCollection(pc_idx, **kwargs)[source]
setAllObserved(all_observed, update_gui=True)[source]
setDGZ(flag)[source]
setDeviant(deviant)[source]
setNoCursor()[source]
setPBLLevel(flag)[source]
setParcel(parcel)[source]
setPreferences(update_gui=True, **kwargs)[source]
setReadoutCursor()[source]
showCursorMenu(pos)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
updateReadout()[source]
wheelEvent(self, event: PySide2.QtGui.QWheelEvent)[source]
class sharppy.viz.plotHodo(**kwargs)[source]

Bases: sharppy.viz.hodo.backgroundHodo

Plots the data on the hodograph. Inherits from the backgroundHodo class that plots the background frame onto a QPixmap.

addProfileCollection(prof_coll)[source]
calculateStormMode()[source]

Logic based off of some of the key findings in Dial et al. (2010)

clearData()[source]

Clears/resets the base QPixmap.

cursorMove(hght)[source]
cursorToggle(toggle)[source]
drawCorfidi(qp)[source]

Draw the Corfidi upshear/downshear vectors

Parameters

qp (a QPainter object) –

drawCriticalAngle(qp)[source]

Plot the critical angle on the hodograph and show the value in the hodograph.

Parameters

qp (QtGui.QPainter object) –

drawLCLtoEL_MW(qp)[source]

Draws the LCL to EL mean wind onto the hodo.

Parameters

qp (a QPainter object) –

drawSMV(qp)[source]

Draws the storm motion vector.

Parameters

qp (QtGui.QPainter object) –

draw_hodo(qp, prof, colors, width=2)[source]

Plot the Hodograph.

Parameters

qp (QtGui.QPainter object) –

draw_profile(qp, prof, color='#6666CC', width=2)[source]

Plot the Hodograph.

Parameters

qp (QtGui.QPainter object) –

modified = <PySide2.QtCore.Signal object>
modified_vector = <PySide2.QtCore.Signal object>
mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mouseMoveEvent(e)[source]

Handles the tracking of the mouse to provide the dynamic readouts.

Parameters

e (an Event object) –

mousePressEvent(e)[source]

Handles when the mouse is pressed. Used to set the storm motion vector.

Parameters

e (an Event object) –

mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
paintEvent(e)[source]

Handles painting the QPixmap onto the QWidget frame.

Parameters

e (an Event object) –

plotBndy(direction)[source]
plotData()[source]

Handles the plotting of the data in the QPixmap.

reset = <PySide2.QtCore.Signal object>
reset_vector = <PySide2.QtCore.Signal object>
resizeEvent(e)[source]

Resize the plot based on adjusting the main window.

Parameters

e (an Event object) –

rmProfileCollection(prof_coll)[source]
setActiveCollection(pc_idx, **kwargs)[source]
setAllObserved(all_observed, update_gui=True)[source]
setBlackPen(qp)[source]
setBndyCursor()[source]
setDeviant(deviant)[source]
setMWCenter()[source]
setNoCursor()[source]
setNormalCenter()[source]
setPreferences(update_gui=True, **kwargs)[source]
setSRCenter()[source]
showCursorMenu(pos)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
toggle_vector = <PySide2.QtCore.Signal object>
updateDraggables()[source]
wheelEvent(e)[source]

Handles the zooming of the hodograph.

Parameters

e (an Event object) –

class sharppy.viz.plotText(pcl_types)[source]

Bases: sharppy.viz.thermo.backgroundText

clearData()[source]

Handles the clearing of the pixmap in the frame.

drawConvectiveIndices(qp)[source]

This handles the drawing of the parcel indices.

Parameters

qp (QtGui.QPainter object) –

drawIndices(qp)[source]

Draws the non-parcel indices.

Parameters

qp (QtGui.QPainter object) –

drawSevere(qp)[source]

This handles the severe indices, such as STP, sig hail, etc.

Parameters

qp (QtGui.QPainter object) –

mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
paintEvent(e)[source]

Handles when the window gets painted. This renders the QPixmap that the backgroundText Object contians. For the actual drawing of the data, see the plotData function.

e: an Event Object

plotData()[source]

Handles the drawing of the text onto the QPixmap. This is where the actual data gets plotted/drawn.

resizeEvent(e)[source]

Handles when the window is resized.

e: an Event Object

setDefaultParcel()[source]
setDeviant(deviant)[source]
setParcels(prof)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
updatepcl = <PySide2.QtCore.Signal object>

Handles plotting the indices in the frame. Inherits a backgroundText Object that contains a QPixmap with the frame drawn on it. All drawing gets done on this QPixmap, and then the QPixmap gets rendered by the paintEvent function.

class sharppy.viz.plotThetae[source]

Bases: sharppy.viz.thetae.backgroundThetae

Draws the theta-E window. Inherits from the backgroundThetae class that handles plotting of the frame. Draws the contours to the QPixmap inherited by the backgroundThetae class.

draw_profile(qp)[source]

Draw the Theta-E v. Pres profile.

Parameters

qp (QtGui.QPainter object) –

paintEvent(e)[source]

Draws the QPixmap onto the QWidget.

Parameters

e (an Event object) –

plotData()[source]

Plots the data onto the QPixmap.

resizeEvent(e)[source]

Handles when the window is resized.

Parameters

e (an Event object) –

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotWinds[source]

Bases: sharppy.viz.srwinds.backgroundWinds

Draws the storm relative winds vs. height. Inherits from the backgroundWinds class that contains the QPixmap with the background frame drawn on it.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_profile(qp)[source]

Draws the storm relative wind profile.

Parameters

qp (QtGui.QPainter object) –

paintEvent(e)[source]

Handles the painting of the QPixmap onto the QWidget.

Parameters

e (an Event object) –

plotData()[source]

Handles painting the plot data onto the QPixmap.

resizeEvent(e)[source]

Handles when the window is resized.

Parameters

e (an Event object) –

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotSpeed[source]

Bases: sharppy.viz.speed.backgroundSpeed

Handles plotting the data in the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_profile(qp)[source]

qp: QtGui.QPainter object

paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles drawing the data on the frame.

resizeEvent(e)[source]

Handles when the window is resized.

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotKinematics(**kwargs)[source]

Bases: sharppy.viz.kinematics.backgroundKinematics

Handles plotting the indices in the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

drawBarbs(qp)[source]
drawKinematics(qp)[source]

qp: QtGui.QPainter object

paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles the drawing of the text on the frame.

resizeEvent(e)[source]

Handles when the window is resized.

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotAnalogues[source]

Bases: sharppy.viz.analogues.backgroundAnalogues

clearData()[source]

Handles the clearing of the pixmap in the frame.

clearSelection()[source]
drawSARS(qp, **kwargs)[source]

This draws the SARS matches.

Parameters
  • qp (a QtGui.QPainter Object) –

  • type (A string for the type of) – SARS matches. ‘HAIL’ for hail matches and ‘TOR’ for supercell matches.

mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
paintEvent(e)[source]

Handles drawing the QPixmap onto the widget.

Parameters

e (an Event object) –

plotData()[source]

Handles the drawing of the SARS matches onto the QPixmap.

resizeEvent(e)[source]

Handles when the window is resized.

Parameters

e (an Event object) –

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
setSelection(filematch)[source]

Load in the SARS analog you’ve clicked.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
updatematch = <PySide2.QtCore.Signal object>

Handles the non-background plotting of the SARS window. This inherits a backgroundAnalogues Object that takes care of drawing the frame background onto a QPixmap. This will inherit that QPixmap and continue drawing on it, finally rendering the QPixmap via the function paintEvent.

class sharppy.viz.plotWatch[source]

Bases: sharppy.viz.watch.backgroundWatch

Plot the data on the frame. Inherits the background class that plots the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

paintEvent(e)[source]

Handles painting on the frame

plotData()[source]
resizeEvent(e)[source]

Handles when the window is resized

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotSlinky(**kwargs)[source]

Bases: sharppy.viz.slinky.backgroundSlinky

Plots the data on the frame. Inherits from the backgroundSlinky class and draws on the QPixmap that is initialized there.

clearData()[source]

Handles the clearing of the pixmap in the frame.

paintEvent(e)[source]

Handles painting the QPixmap onto the frame.

Parameters

e (an Event object) –

plotData()[source]

Draws the data onto the QPixmap.

plotSMV(qp)[source]

Draws the line representing the Storm Motion Vector.

Parameters

qp (a QtGui.QPainter object) –

plotSlinky(qp)[source]

Plots the circles of the Storm Slinky.

Parameters

qp (a QtGui.QPainter object) –

plotTilt(qp)[source]

Plots the data for the updraft tilt.

Parameters

qp (a QtGui.QPainter object) –

resizeEvent(e)[source]

Handles when the window is resized.

Parameters

e (an Event object) –

setDeviant(deviant)[source]
setParcel(pcl)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotAdvection[source]

Bases: sharppy.viz.advection.backgroundAdvection

Plot the data on the frame. Inherits the background class that plots the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

paintEvent(e)[source]

Handles painting on the frame

plotData(qp)[source]
resizeEvent(e)[source]

Handles when the window is resized

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotSTP[source]

Bases: sharppy.viz.stp.backgroundSTP

Plot the data on the frame. Inherits the background class that plots the frame.

cape_prob(cape)[source]
clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_box(qp)[source]
draw_stp(qp)[source]
ebwd_prob(ebwd)[source]
esrh_prob(esrh)[source]
lcl_prob(lcl)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles painting on the frame

resizeEvent(e)[source]

Handles when the window is resized

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
stpc_prob(stpc)[source]
stpf_prob(stpf)[source]
class sharppy.viz.plotWinter[source]

Bases: sharppy.viz.winter.backgroundWinter

Handles plotting the indices in the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

drawDGZLayer(qp)[source]
drawInitial(qp)[source]

qp: QtGui.QPainter object

drawOPRH(qp)[source]
drawPrecipType(qp)[source]
drawPrecipTypeTemp(qp)[source]
drawWCLayer(qp)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles the drawing of the text on the frame.

resizeEvent(e)[source]

Handles when the window is resized.

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotFire[source]

Bases: sharppy.viz.fire.backgroundFire

Handles plotting the indices in the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

drawFosberg(qp)[source]
drawHainesIndex(qp)[source]
drawPBLchar(qp)[source]
getFosbergFormat()[source]
getHainesFormat()[source]
getMaxWindFormat()[source]
getPWColor()[source]
getSfcRHFormat()[source]
mousePressEvent(e)[source]

Handles mouse click event to switch Haines Index elevations

paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles the drawing of the text on the frame.

resizeEvent(e)[source]

Handles when the window is resized.

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotSHIP[source]

Bases: sharppy.viz.ship.backgroundSHIP

Plot the data on the frame. Inherits the background class that plots the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_ship(qp)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles painting on the frame

resizeEvent(e)[source]

Handles when the window is resized

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
ship_color(ship)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotSTPEF[source]

Bases: sharppy.viz.stpef.backgroundSTPEF

Plot the data on the frame. Inherits the background class that plots the frame.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_stp(qp)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles painting on the frame

resizeEvent(e)[source]

Handles when the window is resized

setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotVROT[source]

Bases: sharppy.viz.vrot.backgroundVROT

Plot the data on the frame. Inherits the background class that plots the frame.

draw_vrot(qp)[source]
interp_vrot()[source]
mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
openInputDialog()[source]

Opens the text version of the input dialog

paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles painting on the frame

resizeEvent(e)[source]

Handles when the window is resized

setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.Mapper(lambda_0, phi_0, proj='npstere')[source]

Bases: object

data_dir = '/Users/travis/build/sharppy/SHARPpy/sharppy/databases/shapefiles'
getBoundary(name)[source]
getCoordPaths()[source]
getLambda0()[source]
getLatBounds()[source]
getPhi0()[source]
getProjection()[source]
max_lat = {'merc': 35.0, 'npstere': 90.0, 'spstere': 0.0}
min_lat = {'merc': -35.0, 'npstere': 0.0, 'spstere': -90.0}
setLambda0(lambda_0)[source]
setProjection(proj)[source]
class sharppy.viz.MapWidget(data_source, init_time, async_object, **kwargs)[source]

Bases: PySide2.QtWidgets.QWidget

clicked = <PySide2.QtCore.Signal object>
drawMap()[source]
drawPolitical(qp)[source]
drawStations(qp)[source]
getBackground()[source]
hasInternet(has_connection)[source]
initMap()[source]
initUI()[source]
keyPressEvent(self, event: PySide2.QtGui.QKeyEvent)[source]
mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent)[source]
paintEvent(self, event: PySide2.QtGui.QPaintEvent)[source]
resetViewport(ctr_lat=None, ctr_lon=None)[source]
resizeEvent(self, event: PySide2.QtGui.QResizeEvent)[source]
saveProjection(config)[source]
setCurrentTime(data_time, init=False)[source]
setDataSource(data_source, data_time, init=False)[source]
setProjection(proj)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
wheelEvent(self, event: PySide2.QtGui.QWheelEvent)[source]
class sharppy.viz.plotGeneric(x, y, **kwargs)[source]

Bases: sharppy.viz.generic.backgroundGeneric

A generic object to plot the foreground of a plot. This inherits from the Background Class that holds frame constants, getters, and setters.

clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_lines(qp)[source]

Draw the line profile on the widget

Parameters

qp – QtGui.QPainter object

Returns

None

paintEvent(e)[source]

Handles the paint event and calls the functions to draw on the frame.

Parameters

e – an Event object

Returns

None

plotData()[source]

Plot the data on the frame. :return: None

resizeEvent(e)[source]

Handles the resizing of the frame

Parameters

e – an Event object

Returns

None

setProf(x, y, **kwargs)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class sharppy.viz.plotENS[source]

Bases: sharppy.viz.ensemble.backgroundENS

Plot the data on the frame. Inherits the background class that plots the frame.

addProfileCollection(prof_coll)[source]
clearData()[source]

Handles the clearing of the pixmap in the frame.

draw_ensemble_point(qp, prof)[source]
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent)[source]
plotData()[source]

Handles drawing of data on the frame.

resizeEvent(e)[source]

Handles when the window is resized

rmProfileCollection(prof_coll)[source]
setActiveCollection(pc_idx, **kwargs)[source]
setDeviant(deviant)[source]
setPreferences(update_gui=True, **prefs)[source]
setProf(prof)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>