uwsift package

Subpackages

Submodules

uwsift.common module

.py

PURPOSE Support calculations, namedtuples and constants used throughout the library and application.

REFERENCES

REQUIRES numpy numba

author:

R.K.Garcia <rayg@ssec.wisc.edu>

copyright:

2015 by University of Wisconsin Regents, see AUTHORS for more details

license:

GPLv3, see LICENSE for more details

class uwsift.common.Box(bottom, left, top, right)[source]

Bases: NamedTuple

bottom: float

Alias for field number 0

left: float

Alias for field number 1

right: float

Alias for field number 3

top: float

Alias for field number 2

class uwsift.common.Flags[source]

Bases: set

A set of enumerated Flags which may ultimately be represented as a bitfield, but observing set interface

class uwsift.common.ImageDisplayMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

PIXEL_MATRIX = 'pixel_matrix'
SIMPLE_GEOLOCATED = 'simple_geolocated'
TILED_GEOLOCATED = 'tiled_geolocated'
class uwsift.common.IndexBox(bottom: int, left: int, top: int, right: int)[source]

Bases: NamedTuple

Box using integer index values as coordinates.

This has a very similar purpose to Box, but restricts coordinates to integer values.

bottom: int

Alias for field number 0

left: int

Alias for field number 1

right: int

Alias for field number 3

top: int

Alias for field number 2

class uwsift.common.Info(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Standard keys for info dictionaries Note: some fields correspond to database fields in workspace.metadatabase !

ALGEBRAIC = 'algebraic'
CATEGORY = 'category'
CELL_HEIGHT = 'cell_height'
CELL_WIDTH = 'cell_width'
CENTRAL_WAVELENGTH = 'nominal_wavelength'
CLIM = 'clim'
COLORMAP = 'colormap'
DATASET_NAME = 'dataset_name'
DISPLAY_FAMILY = 'display_family'
DISPLAY_NAME = 'display_name'
DISPLAY_TIME = 'display_time'
FAMILY = 'family'
GRID_FIRST_INDEX_X = 'grid_first_index_x'
GRID_FIRST_INDEX_Y = 'grid_first_index_y'
GRID_ORIGIN = 'grid_layout_origin'
INSTRUMENT = 'instrument'
KIND = 'kind'
LONG_NAME = 'long_name'
OBS_DURATION = 'obsduration'
OBS_TIME = 'obstime'
ORIGIN_X = 'origin_x'
ORIGIN_Y = 'origin_y'
PATHNAME = 'path'
PLATFORM = 'platform'
PROJ = 'proj4'
SCENE = 'scene'
SCHED_TIME = 'timeline'
SERIAL = 'serial'
SHAPE = 'shape'
SHORT_NAME = 'short_name'
STANDARD_NAME = 'standard_name'
STYLE = 'style'
UNITS = 'units'
UNIT_CONVERSION = 'unit_conversion'
UNKNOWN = '???'
UUID = 'uuid'
VALID_RANGE = 'valid_range'
class uwsift.common.Instrument(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

ABI = 'ABI'
AHI = 'AHI'
AMI = 'AMI'
AVHRR3 = 'AVHRR-3'
FCI = 'FCI'
GENERATED = 'Generated'
GFS = 'GFS'
GLM = 'GLM'
LI = 'LI'
MIXED = 'Mixed'
NAM = 'NAM'
SEVIRI = 'SEVIRI'
UNKNOWN = '???'
class uwsift.common.Kind(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Kind of entities we’re working with.

COMPOSITE = 1
IMAGE = 1
LINES = 7
MC_IMAGE = 10
OUTLINE = 2
POINTS = 9
RGB = 4
SHAPE = 3
UNKNOWN = 0
VECTORS = 8
class uwsift.common.LayerModelColumns[source]

Bases: object

NAME = 2
PROBE_UNIT = 5
PROBE_VALUE = 4
SOURCE = 1
VISIBILITY = 0
WAVELENGTH = 3
class uwsift.common.LayerVisibility(visible: bool, opacity: float)[source]

Bases: NamedTuple

Combine the two parameters controlling the visibility of layers.

opacity: float

Alias for field number 1

visible: bool

Alias for field number 0

class uwsift.common.Platform(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

GK2A = 'GEO-KOMPSAT-2A'
GOES_16 = 'G16'
GOES_17 = 'G17'
GOES_18 = 'G18'
GOES_19 = 'G19'
HIMAWARI_8 = 'Himawari-8'
HIMAWARI_9 = 'Himawari-9'
M01 = 'Metop-B'
M02 = 'Metop-A'
M03 = 'Metop-C'
MIXED = 'Mixed'
MSG1 = 'Meteosat-8'
MSG2 = 'Meteosat-9'
MSG3 = 'Meteosat-10'
MSG4 = 'Meteosat-11'
MTGI1 = 'MTG-I1'
NWP = 'NWP'
SYSTEM = 'System'
UNKNOWN = '???'
class uwsift.common.Point(y, x)[source]

Bases: NamedTuple

x: float

Alias for field number 1

y: float

Alias for field number 0

class uwsift.common.Presentation(uuid: UUID | None, kind: Kind, visible: bool = True, colormap: object = None, style: object = None, climits: tuple | list = (inf, -inf), gamma: float | List[float] = 1.0, opacity: float = 1.0)[source]

Bases: object

Presentation information for a layer and dataset.

climits: tuple | list = (inf, -inf)
colormap: object = None
gamma: float | List[float] = 1.0
kind: Kind
opacity: float = 1.0
style: object = None
uuid: UUID | None
visible: bool = True
class uwsift.common.Resolution(dy: float, dx: float)[source]

Bases: NamedTuple

Pixel resolution (km per pixel).

dx: float

Alias for field number 1

dy: float

Alias for field number 0

class uwsift.common.State(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

State for products in document.

ARRIVING = 2
ATTACHED = 5
CACHED = 3
DANGLING = -1
ONSCREEN = 6
POTENTIAL = 1
UNKNOWN = 0
class uwsift.common.Tool(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Names for cursor tools.

PAN_ZOOM = 'pan_zoom'
POINT_PROBE = 'point_probe'
REGION_PROBE = 'region_probe'
class uwsift.common.ViewBox(bottom: float, left: float, top: float, right: float, dy: float, dx: float)[source]

Bases: NamedTuple

Combination of Box + Resolution.

bottom: float

Alias for field number 0

dx: float

Alias for field number 5

dy: float

Alias for field number 4

left: float

Alias for field number 1

right: float

Alias for field number 3

top: float

Alias for field number 2

uwsift.queue module

queue.py

PURPOSE Global background task queue for loading, rendering, et cetera. Use TheQueue.add() to create background behavior. Note that Qt4 facilities other than signals should not be used on the task queue!

REFERENCES

REQUIRES

author:

R.K.Garcia <rayg@ssec.wisc.edu>

copyright:

2014 by University of Wisconsin Regents, see AUTHORS for more details

license:

GPLv3, see LICENSE for more details

class uwsift.queue.TaskQueue(process_pool=None)[source]

Bases: QObject

Global background task queue for loading, rendering, et cetera. Includes state updates and GUI links. Eventually will include thread pools and multiprocess pools. Two threads for interactive tasks (high priority), one thread for background tasks (low priority): 0, 1, 2

add(key, task_iterable, description, interactive=False, and_then=None, use_process_pool=False, use_thread_pool=False)[source]

Add an iterable task which will yield progress information dictionaries.

Expect behavior like this:

for task in queue:
   for status_info in task:
       update_display(status_info)
   pop_display(final_status_info)
Parameters:
  • key (str) – unique key for task. Queuing the same key will result in the old task being removed and the new one deferred to the end

  • task_iterable (iter) – callable resulting in an iterable, or an iterable itself to be run on the background

property depth
progress_ratio(current_progress=None)[source]
property remaining
class uwsift.queue.Worker(myid: int)[source]

Bases: QThread

Worker thread use by TaskQueue

add(key, task_iterable)[source]
run(self)[source]

uwsift.satpy_compat module

Wrappers around Satpy to handle changes between versions.

uwsift.satpy_compat.get_id_items(id_obj)[source]
uwsift.satpy_compat.get_id_value(id_obj, key, default=None)[source]
uwsift.satpy_compat.id_from_attrs(attrs)[source]

uwsift.version module

Module contents

uwsift.init_user_config_dirs(user_config_dirs: list)[source]
uwsift.overwrite_import(package_name: str, custom_import_path: str, *, verbose=True)[source]