{"action":"created","comment":{"url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/comments/84318745","pull_request_review_id":5100847,"id":84318745,"diff_hunk":"@@ -0,0 +1,510 @@\n+\"\"\"\n+pyart.graph.radarmapdisplay_cartopy\n+===================================\n+\n+Class for creating plots on a geographic map using a Radar object using Cartopy\n+for drawing maps.\n+\n+.. autosummary::\n+    :toctree: generated/\n+    :template: dev_template.rst\n+\n+    RadarMapDisplayCartopy\n+\n+\"\"\"\n+\n+import numpy as np\n+try:\n+    import cartopy\n+    _CARTOPY_AVAILABLE = True\n+except ImportError:\n+    _CARTOPY_AVAILABLE = False\n+\n+from .radardisplay import RadarDisplay\n+from .common import parse_ax_fig, parse_norm_vmin_vmax, parse_cmap\n+from ..exceptions import MissingOptionalDependency\n+\n+\n+class RadarMapDisplayCartopy(RadarDisplay):\n+    \"\"\"\n+    A display object for creating plots on a geographic map from data in a\n+    Radar object.\n+\n+    This class is still a work in progress.  Some functionality may not work\n+    correctly. Please report any problems to the Py-ART GitHub Issue Tracker.\n+\n+    Parameters\n+    ----------\n+    radar : Radar\n+        Radar object to use for creating plots.\n+    shift : (float, float)\n+        Shifts in km to offset the calculated x and y locations.\n+\n+    Attributes\n+    ----------\n+    plots : list\n+        List of plots created.\n+    plot_vars : list\n+        List of fields plotted, order matches plot list.\n+    cbs : list\n+        List of colorbars created.\n+    origin : str\n+        'Origin' or 'Radar'.\n+    shift : (float, float)\n+        Shift in meters.\n+    loc : (float, float)\n+        Latitude and Longitude of radar in degrees.\n+    fields : dict\n+        Radar fields.\n+    scan_type : str\n+        Scan type.\n+    ranges : array\n+        Gate ranges in meters.\n+    azimuths : array\n+        Azimuth angle in degrees.\n+    elevations : array\n+        Elevations in degrees.\n+    fixed_angle : array\n+        Scan angle in degrees.\n+    proj : Proj\n+        Object for performing cartographic transformations specific to the\n+        geographic map plotted.\n+    basemap : Basemap\n+        Last plotted basemap, None when no basemap has been plotted.\n+\n+\n+    \"\"\"\n+\n+    def __init__(self, radar, shift=(0.0, 0.0)):\n+        \"\"\" Initialize the object. \"\"\"\n+        # check that basemap is available\n+        if not _CARTOPY_AVAILABLE:\n+            raise MissingOptionalDependency(\n+                \"Cartopy is required to use RadarMapDisplayCartopy but is \" +\n+                \"not installed\")\n+\n+        # initalize the base class\n+        RadarDisplay.__init__(self, radar, shift=shift)\n+\n+        # additional attributes needed for plotting on a basemap.\n+        self.basemap = None\n+        self._x0 = None     # x axis radar location in map coords (meters)\n+        self._y0 = None     # y axis radar location in map coords (meters)\n+        return\n+\n+    def _check_basemap(self):\n+        \"\"\" Check that basemap is not None, raise ValueError if it is. \"\"\"\n+        if self.basemap is None:\n+            raise ValueError('no basemap plotted')\n+\n+    def plot_ppi_map(\n+            self, field, sweep=0, mask_tuple=None,\n+            vmin=None, vmax=None, cmap=None, norm=None, mask_outside=False,\n+            title=None, title_flag=True,\n+            colorbar_flag=True, colorbar_label=None, ax=None, fig=None,\n+            lat_lines=None, lon_lines=None,\n+            projection=None, area_thresh=10000,\n+            min_lon=None, max_lon=None, min_lat=None, max_lat=None,\n+            width=None, height=None, lon_0=None, lat_0=None,\n+            resolution='110m', shapefile=None, edges=True, gatefilter=None,\n+            basemap=None, filter_transitions=True, embelish=True,\n+            ticks=None, ticklabs=None, **kwargs):\n+        \"\"\"\n+        Plot a PPI volume sweep onto a geographic map.\n+\n+        Additional arguments are passed to Basemap.\n+\n+        Parameters\n+        ----------\n+        field : str\n+            Field to plot.\n+        sweep : int, optional\n+            Sweep number to plot.\n+\n+        Other Parameters\n+        ----------------\n+        mask_tuple : (str, float)\n+            Tuple containing the field name and value below which to mask\n+            field prior to plotting, for example to mask all data where\n+            NCP < 0.5 set mask_tuple to ['NCP', 0.5]. None performs no masking.\n+        vmin : float\n+            Luminance minimum value, None for default value.\n+            Parameter is ignored is norm is not None.\n+        vmax : float\n+            Luminance maximum value, None for default value.\n+            Parameter is ignored is norm is not None.\n+        norm : Normalize or None, optional\n+            matplotlib Normalize instance used to scale luminance data.  If not\n+            None the vmax and vmin parameters are ignored.  If None, vmin and\n+            vmax are used for luminance scaling.\n+        cmap : str or None\n+            Matplotlib colormap name. None will use the default colormap for\n+            the field being plotted as specified by the Py-ART configuration.\n+        mask_outside : bool\n+            True to mask data outside of vmin, vmax.  False performs no\n+            masking.\n+        title : str\n+            Title to label plot with, None to use default title generated from\n+            the field and tilt parameters. Parameter is ignored if title_flag\n+            is False.\n+        title_flag : bool\n+            True to add a title to the plot, False does not add a title.\n+        colorbar_flag : bool\n+            True to add a colorbar with label to the axis.  False leaves off\n+            the colorbar.\n+        ticks : array\n+            Colorbar custom tick label locations.\n+        ticklabs : array\n+            Colorbar custom tick labels.\n+        colorbar_label : str\n+            Colorbar label, None will use a default label generated from the\n+            field information.\n+        ax : Axis\n+            Axis to plot on. If provided, must have a Cartopy crs projection.\n+        fig : Figure\n+            Figure to add the colorbar to. None will use the current figure.\n+        lat_lines, lon_lines : array or None\n+            Locations at which to draw latitude and longitude lines.\n+            None will use default values which are resonable for maps of\n+            North America.\n+        projection : cartopy.crs class\n+            Map projection supported by cartopy.","path":"pyart/graph/radarmapdisplay_cartopy.py","position":171,"original_position":171,"commit_id":"d24fee92110fa88a4ede1699ac18550292ad19ca","original_commit_id":"d24fee92110fa88a4ede1699ac18550292ad19ca","user":{"login":"jjhelmus","id":1050278,"avatar_url":"https://avatars.githubusercontent.com/u/1050278?v=3","gravatar_id":"","url":"https://api.github.com/users/jjhelmus","html_url":"https://github.com/jjhelmus","followers_url":"https://api.github.com/users/jjhelmus/followers","following_url":"https://api.github.com/users/jjhelmus/following{/other_user}","gists_url":"https://api.github.com/users/jjhelmus/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhelmus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhelmus/subscriptions","organizations_url":"https://api.github.com/users/jjhelmus/orgs","repos_url":"https://api.github.com/users/jjhelmus/repos","events_url":"https://api.github.com/users/jjhelmus/events{/privacy}","received_events_url":"https://api.github.com/users/jjhelmus/received_events","type":"User","site_admin":false},"body":"Add text indicating that the default is a Lambert conformal projection centered at lat_0.","created_at":"2016-10-20T16:08:57Z","updated_at":"2016-10-20T16:21:20Z","html_url":"https://github.com/ARM-DOE/pyart/pull/612#discussion_r84318745","pull_request_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/612","_links":{"self":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/comments/84318745"},"html":{"href":"https://github.com/ARM-DOE/pyart/pull/612#discussion_r84318745"},"pull_request":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/612"}}},"pull_request":{"url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/612","id":89876336,"html_url":"https://github.com/ARM-DOE/pyart/pull/612","diff_url":"https://github.com/ARM-DOE/pyart/pull/612.diff","patch_url":"https://github.com/ARM-DOE/pyart/pull/612.patch","issue_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/612","number":612,"state":"open","locked":false,"title":"support for cartopy for mapping","user":{"login":"jsignell","id":4806877,"avatar_url":"https://avatars.githubusercontent.com/u/4806877?v=3","gravatar_id":"","url":"https://api.github.com/users/jsignell","html_url":"https://github.com/jsignell","followers_url":"https://api.github.com/users/jsignell/followers","following_url":"https://api.github.com/users/jsignell/following{/other_user}","gists_url":"https://api.github.com/users/jsignell/gists{/gist_id}","starred_url":"https://api.github.com/users/jsignell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsignell/subscriptions","organizations_url":"https://api.github.com/users/jsignell/orgs","repos_url":"https://api.github.com/users/jsignell/repos","events_url":"https://api.github.com/users/jsignell/events{/privacy}","received_events_url":"https://api.github.com/users/jsignell/received_events","type":"User","site_admin":false},"body":"After the discussion in #483.","created_at":"2016-10-18T18:51:47Z","updated_at":"2016-10-20T16:21:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7edb03658dea6063283443a6c519461cebd32f77","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/612/commits","review_comments_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/612/comments","review_comment_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/612/comments","statuses_url":"https://api.github.com/repos/ARM-DOE/pyart/statuses/d24fee92110fa88a4ede1699ac18550292ad19ca","head":{"label":"jsignell:cartopy-plot","ref":"cartopy-plot","sha":"d24fee92110fa88a4ede1699ac18550292ad19ca","user":{"login":"jsignell","id":4806877,"avatar_url":"https://avatars.githubusercontent.com/u/4806877?v=3","gravatar_id":"","url":"https://api.github.com/users/jsignell","html_url":"https://github.com/jsignell","followers_url":"https://api.github.com/users/jsignell/followers","following_url":"https://api.github.com/users/jsignell/following{/other_user}","gists_url":"https://api.github.com/users/jsignell/gists{/gist_id}","starred_url":"https://api.github.com/users/jsignell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsignell/subscriptions","organizations_url":"https://api.github.com/users/jsignell/orgs","repos_url":"https://api.github.com/users/jsignell/repos","events_url":"https://api.github.com/users/jsignell/events{/privacy}","received_events_url":"https://api.github.com/users/jsignell/received_events","type":"User","site_admin":false},"repo":{"id":66003886,"name":"pyart","full_name":"jsignell/pyart","owner":{"login":"jsignell","id":4806877,"avatar_url":"https://avatars.githubusercontent.com/u/4806877?v=3","gravatar_id":"","url":"https://api.github.com/users/jsignell","html_url":"https://github.com/jsignell","followers_url":"https://api.github.com/users/jsignell/followers","following_url":"https://api.github.com/users/jsignell/following{/other_user}","gists_url":"https://api.github.com/users/jsignell/gists{/gist_id}","starred_url":"https://api.github.com/users/jsignell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsignell/subscriptions","organizations_url":"https://api.github.com/users/jsignell/orgs","repos_url":"https://api.github.com/users/jsignell/repos","events_url":"https://api.github.com/users/jsignell/events{/privacy}","received_events_url":"https://api.github.com/users/jsignell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsignell/pyart","description":"The Python-ARM Radar Toolkit. A data model driven interactive toolkit for working with weather radar data. ","fork":true,"url":"https://api.github.com/repos/jsignell/pyart","forks_url":"https://api.github.com/repos/jsignell/pyart/forks","keys_url":"https://api.github.com/repos/jsignell/pyart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsignell/pyart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsignell/pyart/teams","hooks_url":"https://api.github.com/repos/jsignell/pyart/hooks","issue_events_url":"https://api.github.com/repos/jsignell/pyart/issues/events{/number}","events_url":"https://api.github.com/repos/jsignell/pyart/events","assignees_url":"https://api.github.com/repos/jsignell/pyart/assignees{/user}","branches_url":"https://api.github.com/repos/jsignell/pyart/branches{/branch}","tags_url":"https://api.github.com/repos/jsignell/pyart/tags","blobs_url":"https://api.github.com/repos/jsignell/pyart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsignell/pyart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsignell/pyart/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsignell/pyart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsignell/pyart/statuses/{sha}","languages_url":"https://api.github.com/repos/jsignell/pyart/languages","stargazers_url":"https://api.github.com/repos/jsignell/pyart/stargazers","contributors_url":"https://api.github.com/repos/jsignell/pyart/contributors","subscribers_url":"https://api.github.com/repos/jsignell/pyart/subscribers","subscription_url":"https://api.github.com/repos/jsignell/pyart/subscription","commits_url":"https://api.github.com/repos/jsignell/pyart/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsignell/pyart/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsignell/pyart/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsignell/pyart/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsignell/pyart/contents/{+path}","compare_url":"https://api.github.com/repos/jsignell/pyart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsignell/pyart/merges","archive_url":"https://api.github.com/repos/jsignell/pyart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsignell/pyart/downloads","issues_url":"https://api.github.com/repos/jsignell/pyart/issues{/number}","pulls_url":"https://api.github.com/repos/jsignell/pyart/pulls{/number}","milestones_url":"https://api.github.com/repos/jsignell/pyart/milestones{/number}","notifications_url":"https://api.github.com/repos/jsignell/pyart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsignell/pyart/labels{/name}","releases_url":"https://api.github.com/repos/jsignell/pyart/releases{/id}","deployments_url":"https://api.github.com/repos/jsignell/pyart/deployments","created_at":"2016-08-18T14:27:59Z","updated_at":"2016-08-18T14:28:01Z","pushed_at":"2016-09-26T20:12:37Z","git_url":"git://github.com/jsignell/pyart.git","ssh_url":"git@github.com:jsignell/pyart.git","clone_url":"https://github.com/jsignell/pyart.git","svn_url":"https://github.com/jsignell/pyart","homepage":"http://arm-doe.github.io/pyart/","size":67495,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ARM-DOE:master","ref":"master","sha":"c2620b67310959809f90de1f74cc5a6a8f0c69e5","user":{"login":"ARM-DOE","id":2540600,"avatar_url":"https://avatars.githubusercontent.com/u/2540600?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-DOE","html_url":"https://github.com/ARM-DOE","followers_url":"https://api.github.com/users/ARM-DOE/followers","following_url":"https://api.github.com/users/ARM-DOE/following{/other_user}","gists_url":"https://api.github.com/users/ARM-DOE/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-DOE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-DOE/subscriptions","organizations_url":"https://api.github.com/users/ARM-DOE/orgs","repos_url":"https://api.github.com/users/ARM-DOE/repos","events_url":"https://api.github.com/users/ARM-DOE/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-DOE/received_events","type":"Organization","site_admin":false},"repo":{"id":6248645,"name":"pyart","full_name":"ARM-DOE/pyart","owner":{"login":"ARM-DOE","id":2540600,"avatar_url":"https://avatars.githubusercontent.com/u/2540600?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-DOE","html_url":"https://github.com/ARM-DOE","followers_url":"https://api.github.com/users/ARM-DOE/followers","following_url":"https://api.github.com/users/ARM-DOE/following{/other_user}","gists_url":"https://api.github.com/users/ARM-DOE/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-DOE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-DOE/subscriptions","organizations_url":"https://api.github.com/users/ARM-DOE/orgs","repos_url":"https://api.github.com/users/ARM-DOE/repos","events_url":"https://api.github.com/users/ARM-DOE/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-DOE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARM-DOE/pyart","description":"The Python-ARM Radar Toolkit. A data model driven interactive toolkit for working with weather radar data. ","fork":false,"url":"https://api.github.com/repos/ARM-DOE/pyart","forks_url":"https://api.github.com/repos/ARM-DOE/pyart/forks","keys_url":"https://api.github.com/repos/ARM-DOE/pyart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARM-DOE/pyart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARM-DOE/pyart/teams","hooks_url":"https://api.github.com/repos/ARM-DOE/pyart/hooks","issue_events_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/events{/number}","events_url":"https://api.github.com/repos/ARM-DOE/pyart/events","assignees_url":"https://api.github.com/repos/ARM-DOE/pyart/assignees{/user}","branches_url":"https://api.github.com/repos/ARM-DOE/pyart/branches{/branch}","tags_url":"https://api.github.com/repos/ARM-DOE/pyart/tags","blobs_url":"https://api.github.com/repos/ARM-DOE/pyart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARM-DOE/pyart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARM-DOE/pyart/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARM-DOE/pyart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARM-DOE/pyart/statuses/{sha}","languages_url":"https://api.github.com/repos/ARM-DOE/pyart/languages","stargazers_url":"https://api.github.com/repos/ARM-DOE/pyart/stargazers","contributors_url":"https://api.github.com/repos/ARM-DOE/pyart/contributors","subscribers_url":"https://api.github.com/repos/ARM-DOE/pyart/subscribers","subscription_url":"https://api.github.com/repos/ARM-DOE/pyart/subscription","commits_url":"https://api.github.com/repos/ARM-DOE/pyart/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARM-DOE/pyart/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARM-DOE/pyart/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARM-DOE/pyart/contents/{+path}","compare_url":"https://api.github.com/repos/ARM-DOE/pyart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARM-DOE/pyart/merges","archive_url":"https://api.github.com/repos/ARM-DOE/pyart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARM-DOE/pyart/downloads","issues_url":"https://api.github.com/repos/ARM-DOE/pyart/issues{/number}","pulls_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls{/number}","milestones_url":"https://api.github.com/repos/ARM-DOE/pyart/milestones{/number}","notifications_url":"https://api.github.com/repos/ARM-DOE/pyart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARM-DOE/pyart/labels{/name}","releases_url":"https://api.github.com/repos/ARM-DOE/pyart/releases{/id}","deployments_url":"https://api.github.com/repos/ARM-DOE/pyart/deployments","created_at":"2012-10-16T17:51:30Z","updated_at":"2016-10-18T12:44:11Z","pushed_at":"2016-10-20T15:48:51Z","git_url":"git://github.com/ARM-DOE/pyart.git","ssh_url":"git@github.com:ARM-DOE/pyart.git","clone_url":"https://github.com/ARM-DOE/pyart.git","svn_url":"https://github.com/ARM-DOE/pyart","homepage":"http://arm-doe.github.io/pyart/","size":75301,"stargazers_count":83,"watchers_count":83,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":65,"mirror_url":null,"open_issues_count":49,"forks":65,"open_issues":49,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/612"},"html":{"href":"https://github.com/ARM-DOE/pyart/pull/612"},"issue":{"href":"https://api.github.com/repos/ARM-DOE/pyart/issues/612"},"comments":{"href":"https://api.github.com/repos/ARM-DOE/pyart/issues/612/comments"},"review_comments":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/612/comments"},"review_comment":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/612/commits"},"statuses":{"href":"https://api.github.com/repos/ARM-DOE/pyart/statuses/d24fee92110fa88a4ede1699ac18550292ad19ca"}}}}
{"actor":{"display_login":"jjhelmus"}}