ncv 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ncv/__init__.py +58 -0
- ncv/__main__.py +35 -0
- ncv/app.py +1757 -0
- ncv/dimensions.py +172 -0
- ncv/images/Accent.png +0 -0
- ncv/images/Blues.png +0 -0
- ncv/images/BrBG.png +0 -0
- ncv/images/BuGn.png +0 -0
- ncv/images/BuPu.png +0 -0
- ncv/images/CMRmap.png +0 -0
- ncv/images/Dark2.png +0 -0
- ncv/images/GnBu.png +0 -0
- ncv/images/Grays.png +0 -0
- ncv/images/Greens.png +0 -0
- ncv/images/Greys.png +0 -0
- ncv/images/OrRd.png +0 -0
- ncv/images/Oranges.png +0 -0
- ncv/images/PRGn.png +0 -0
- ncv/images/Paired.png +0 -0
- ncv/images/Pastel1.png +0 -0
- ncv/images/Pastel2.png +0 -0
- ncv/images/PiYG.png +0 -0
- ncv/images/PuBu.png +0 -0
- ncv/images/PuBuGn.png +0 -0
- ncv/images/PuOr.png +0 -0
- ncv/images/PuRd.png +0 -0
- ncv/images/Purples.png +0 -0
- ncv/images/RdBu.png +0 -0
- ncv/images/RdGy.png +0 -0
- ncv/images/RdPu.png +0 -0
- ncv/images/RdYlBu.png +0 -0
- ncv/images/RdYlGn.png +0 -0
- ncv/images/Reds.png +0 -0
- ncv/images/Set1.png +0 -0
- ncv/images/Set2.png +0 -0
- ncv/images/Set3.png +0 -0
- ncv/images/Spectral.png +0 -0
- ncv/images/Wistia.png +0 -0
- ncv/images/YlGn.png +0 -0
- ncv/images/YlGnBu.png +0 -0
- ncv/images/YlOrBr.png +0 -0
- ncv/images/YlOrRd.png +0 -0
- ncv/images/afmhot.png +0 -0
- ncv/images/autumn.png +0 -0
- ncv/images/berlin.png +0 -0
- ncv/images/binary.png +0 -0
- ncv/images/bone.png +0 -0
- ncv/images/brg.png +0 -0
- ncv/images/bwr.png +0 -0
- ncv/images/cividis.png +0 -0
- ncv/images/cool.png +0 -0
- ncv/images/coolwarm.png +0 -0
- ncv/images/copper.png +0 -0
- ncv/images/cubehelix.png +0 -0
- ncv/images/flag.png +0 -0
- ncv/images/gist_earth.png +0 -0
- ncv/images/gist_gray.png +0 -0
- ncv/images/gist_grey.png +0 -0
- ncv/images/gist_heat.png +0 -0
- ncv/images/gist_ncar.png +0 -0
- ncv/images/gist_rainbow.png +0 -0
- ncv/images/gist_stern.png +0 -0
- ncv/images/gist_yarg.png +0 -0
- ncv/images/gist_yerg.png +0 -0
- ncv/images/gnuplot.png +0 -0
- ncv/images/gnuplot2.png +0 -0
- ncv/images/gray.png +0 -0
- ncv/images/grey.png +0 -0
- ncv/images/hot.png +0 -0
- ncv/images/hsv.png +0 -0
- ncv/images/inferno.png +0 -0
- ncv/images/jet.png +0 -0
- ncv/images/magma.png +0 -0
- ncv/images/managua.png +0 -0
- ncv/images/ncvue_icon.ico +0 -0
- ncv/images/ncvue_icon.png +0 -0
- ncv/images/nipy_spectral.png +0 -0
- ncv/images/ocean.png +0 -0
- ncv/images/pink.png +0 -0
- ncv/images/plasma.png +0 -0
- ncv/images/prism.png +0 -0
- ncv/images/rainbow.png +0 -0
- ncv/images/seismic.png +0 -0
- ncv/images/spring.png +0 -0
- ncv/images/summer.png +0 -0
- ncv/images/tab10.png +0 -0
- ncv/images/tab20.png +0 -0
- ncv/images/tab20b.png +0 -0
- ncv/images/tab20c.png +0 -0
- ncv/images/terrain.png +0 -0
- ncv/images/turbo.png +0 -0
- ncv/images/twilight.png +0 -0
- ncv/images/twilight_shifted.png +0 -0
- ncv/images/vanimo.png +0 -0
- ncv/images/viridis.png +0 -0
- ncv/images/winter.png +0 -0
- ncv/ncvcontour.py +981 -0
- ncv/ncvmain.py +226 -0
- ncv/ncvmap.py +1758 -0
- ncv/ncvmethods.py +1253 -0
- ncv/ncvscatter.py +1345 -0
- ncv/ncvscreen.py +147 -0
- ncv/ncvutils.py +1166 -0
- ncv/ncvwidgets.py +860 -0
- ncv/qt_compat.py +21 -0
- ncv/session.py +147 -0
- ncv/themes/azure-2.0/Dark screenshot.png +0 -0
- ncv/themes/azure-2.0/LICENSE +21 -0
- ncv/themes/azure-2.0/Light screenshot.png +0 -0
- ncv/themes/azure-2.0/README.md +109 -0
- ncv/themes/azure-2.0/azure.tcl +89 -0
- ncv/themes/azure-2.0/example.py +306 -0
- ncv/themes/azure-2.0/theme/dark/box-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/box-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/box-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/box-invalid.png +0 -0
- ncv/themes/azure-2.0/theme/dark/button-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/card.png +0 -0
- ncv/themes/azure-2.0/theme/dark/check-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/check-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/check-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/check-tri-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/check-tri-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/check-tri-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/circle-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/circle-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/circle-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/combo-button-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/combo-button-focus.png +0 -0
- ncv/themes/azure-2.0/theme/dark/combo-button-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/down-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/down.png +0 -0
- ncv/themes/azure-2.0/theme/dark/empty.png +0 -0
- ncv/themes/azure-2.0/theme/dark/hor-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/hor-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/hor-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/notebook.png +0 -0
- ncv/themes/azure-2.0/theme/dark/off-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/on-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/on-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/outline-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/outline-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/radio-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/radio-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/radio-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/radio-tri-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/radio-tri-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/radio-tri-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/rect-accent-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/rect-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/rect-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/rect-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/right.png +0 -0
- ncv/themes/azure-2.0/theme/dark/scale-hor.png +0 -0
- ncv/themes/azure-2.0/theme/dark/scale-vert.png +0 -0
- ncv/themes/azure-2.0/theme/dark/separator.png +0 -0
- ncv/themes/azure-2.0/theme/dark/size.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tab-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tab-disabled.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tab-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tick-hor-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tick-hor-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tick-hor-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tick-vert-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tick-vert-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tick-vert-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tree-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/tree-pressed.png +0 -0
- ncv/themes/azure-2.0/theme/dark/up-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/up.png +0 -0
- ncv/themes/azure-2.0/theme/dark/vert-accent.png +0 -0
- ncv/themes/azure-2.0/theme/dark/vert-basic.png +0 -0
- ncv/themes/azure-2.0/theme/dark/vert-hover.png +0 -0
- ncv/themes/azure-2.0/theme/dark.tcl +537 -0
- ncv/themes/azure-2.0/theme/light/box-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/box-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/box-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/box-invalid.png +0 -0
- ncv/themes/azure-2.0/theme/light/button-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/card.png +0 -0
- ncv/themes/azure-2.0/theme/light/check-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/check-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/check-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/check-tri-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/check-tri-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/check-tri-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/circle-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/circle-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/circle-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/combo-button-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/combo-button-focus.png +0 -0
- ncv/themes/azure-2.0/theme/light/combo-button-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/down-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/down.png +0 -0
- ncv/themes/azure-2.0/theme/light/empty.png +0 -0
- ncv/themes/azure-2.0/theme/light/hor-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/hor-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/hor-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/notebook.png +0 -0
- ncv/themes/azure-2.0/theme/light/off-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/off-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/on-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/on-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/on-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/outline-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/outline-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/radio-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/radio-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/radio-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/radio-tri-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/radio-tri-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/radio-tri-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/rect-accent-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/rect-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/rect-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/rect-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/right.png +0 -0
- ncv/themes/azure-2.0/theme/light/scale-hor.png +0 -0
- ncv/themes/azure-2.0/theme/light/scale-vert.png +0 -0
- ncv/themes/azure-2.0/theme/light/separator.png +0 -0
- ncv/themes/azure-2.0/theme/light/size.png +0 -0
- ncv/themes/azure-2.0/theme/light/tab-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/tab-disabled.png +0 -0
- ncv/themes/azure-2.0/theme/light/tab-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/tick-hor-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/tick-hor-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/tick-hor-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/tick-vert-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/tick-vert-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/tick-vert-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light/tree-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/tree-pressed.png +0 -0
- ncv/themes/azure-2.0/theme/light/up-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/up.png +0 -0
- ncv/themes/azure-2.0/theme/light/vert-accent.png +0 -0
- ncv/themes/azure-2.0/theme/light/vert-basic.png +0 -0
- ncv/themes/azure-2.0/theme/light/vert-hover.png +0 -0
- ncv/themes/azure-2.0/theme/light.tcl +537 -0
- ncv/themes/customtkinter/blue.json +155 -0
- ncv/themes/customtkinter/dark-blue.json +155 -0
- ncv/themes/customtkinter/green.json +155 -0
- ncv/themes/customtkinter/ncvue-blue.json +169 -0
- ncv/tooltip.py +196 -0
- ncv-0.0.1.dist-info/LICENSE +674 -0
- ncv-0.0.1.dist-info/METADATA +25 -0
- ncv-0.0.1.dist-info/RECORD +249 -0
- ncv-0.0.1.dist-info/WHEEL +5 -0
- ncv-0.0.1.dist-info/entry_points.txt +2 -0
- ncv-0.0.1.dist-info/top_level.txt +1 -0
ncv/__init__.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ncv: a quick NetCDF viewer.
|
|
3
|
+
|
|
4
|
+
The public API is Qt-first. Legacy Tk modules remain in the source tree during
|
|
5
|
+
the port, but they are not imported eagerly so optional dependencies such as
|
|
6
|
+
Cartopy cannot break ``import ncv``.
|
|
7
|
+
"""
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from .ncvutils import DIMMETHODS
|
|
11
|
+
from .ncvutils import add_cyclic, has_cyclic
|
|
12
|
+
from .ncvutils import format_coord_contour, format_coord_map
|
|
13
|
+
from .ncvutils import format_coord_scatter, get_slice, get_slice_values
|
|
14
|
+
from .ncvutils import get_standard_name, get_units
|
|
15
|
+
from .ncvutils import list_intersection, parse_entry, selvar, set_axis_label
|
|
16
|
+
from .ncvutils import set_miss, spinbox_values, vardim2var
|
|
17
|
+
from .ncvutils import xzip_dim_name_length, zip_dim_name_length
|
|
18
|
+
from .session import HAVE_XARRAY, NcvSession
|
|
19
|
+
|
|
20
|
+
try:
|
|
21
|
+
from ._version import __version__
|
|
22
|
+
except ImportError: # pragma: no cover
|
|
23
|
+
__version__ = "0.0.0.dev0"
|
|
24
|
+
|
|
25
|
+
__author__ = "Matthias Cuntz"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def ncv(ncfile=None, miss=None, usex=False):
|
|
29
|
+
"""Launch the Qt ncv application."""
|
|
30
|
+
from .app import ncv as _ncv
|
|
31
|
+
|
|
32
|
+
return _ncv(ncfile=ncfile, miss=miss, usex=usex)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
__all__ = [
|
|
36
|
+
"DIMMETHODS",
|
|
37
|
+
"HAVE_XARRAY",
|
|
38
|
+
"NcvSession",
|
|
39
|
+
"add_cyclic",
|
|
40
|
+
"format_coord_contour",
|
|
41
|
+
"format_coord_map",
|
|
42
|
+
"format_coord_scatter",
|
|
43
|
+
"get_slice",
|
|
44
|
+
"get_slice_values",
|
|
45
|
+
"get_standard_name",
|
|
46
|
+
"get_units",
|
|
47
|
+
"has_cyclic",
|
|
48
|
+
"list_intersection",
|
|
49
|
+
"ncv",
|
|
50
|
+
"parse_entry",
|
|
51
|
+
"selvar",
|
|
52
|
+
"set_axis_label",
|
|
53
|
+
"set_miss",
|
|
54
|
+
"spinbox_values",
|
|
55
|
+
"vardim2var",
|
|
56
|
+
"xzip_dim_name_length",
|
|
57
|
+
"zip_dim_name_length",
|
|
58
|
+
]
|
ncv/__main__.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Command line entry point for ncv."""
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
|
|
7
|
+
import numpy as np
|
|
8
|
+
|
|
9
|
+
from .app import ncv
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main():
|
|
13
|
+
parser = argparse.ArgumentParser(
|
|
14
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
15
|
+
description="A minimal GUI for a quick view of netcdf files.",
|
|
16
|
+
)
|
|
17
|
+
parser.add_argument(
|
|
18
|
+
"-m", "--miss", action="store", type=float,
|
|
19
|
+
default=np.nan, dest="miss", metavar="missing_value",
|
|
20
|
+
help="Set value to missing value (default: numpy.nan)",
|
|
21
|
+
)
|
|
22
|
+
parser.add_argument(
|
|
23
|
+
"-x", "--xarray", action="store_true",
|
|
24
|
+
default=False, dest="usex", help="Use xarray to read input files",
|
|
25
|
+
)
|
|
26
|
+
parser.add_argument(
|
|
27
|
+
"ncfile", nargs="*", default=None, metavar="netcdf_file",
|
|
28
|
+
help="netcdf file",
|
|
29
|
+
)
|
|
30
|
+
args = parser.parse_args()
|
|
31
|
+
return ncv(ncfile=args.ncfile, miss=args.miss, usex=args.usex)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
if __name__ == "__main__":
|
|
35
|
+
raise SystemExit(main())
|