From 9e3b4118a24c66804d01a792f484db893cf2349f Mon Sep 17 00:00:00 2001 From: Mattia Almansi Date: Wed, 26 Jun 2024 04:21:28 +0200 Subject: [PATCH] rename hit rate --- notebooks/wp3/hit_rate.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/notebooks/wp3/hit_rate.ipynb b/notebooks/wp3/hit_rate.ipynb index 106ea26..0def638 100644 --- a/notebooks/wp3/hit_rate.ipynb +++ b/notebooks/wp3/hit_rate.ipynb @@ -222,7 +222,7 @@ " return ds\n", "\n", "\n", - "def compute_tercile_occupation(ds, region, defined_regions_module_name, detrend):\n", + "def tercile_analysis(ds, region, defined_regions_module_name, detrend):\n", " # Mask region\n", " defined_regions = get_defined_regions(defined_regions_module_name)\n", " mask = defined_regions.mask(ds)\n", @@ -303,7 +303,7 @@ " request_reanalysis | {\"variable\": variable},\n", " chunks=chunks,\n", " transform_chunks=False,\n", - " transform_func=compute_tercile_occupation,\n", + " transform_func=tercile_analysis,\n", " transform_func_kwargs={\n", " \"region\": region,\n", " \"defined_regions_module_name\": defined_regions_module_name,\n", @@ -352,7 +352,7 @@ " | request_kwargs,\n", " chunks=chunks,\n", " transform_chunks=False,\n", - " transform_func=compute_tercile_occupation,\n", + " transform_func=tercile_analysis,\n", " transform_func_kwargs={\n", " \"region\": region,\n", " \"defined_regions_module_name\": defined_regions_module_name,\n", @@ -442,7 +442,7 @@ "metadata": {}, "outputs": [], "source": [ - "def plot_tercile_occupations(da, **kwargs):\n", + "def plot_tercile_analysis(da, **kwargs):\n", " cmap = kwargs.pop(\"cmap\", \"RdYlBu_r\")\n", " kwargs[\"cmap\"] = plt.get_cmap(cmap, 3)\n", " cbar_kwargs = {\"ticks\": [-2 / 3, 0, 2 / 3]}\n", @@ -470,14 +470,14 @@ "centre = \"cmcc\"\n", "assert (variable in variables) and (region in regions) and (centre in centres)\n", "\n", - "plot_tercile_occupations(\n", + "plot_tercile_analysis(\n", " ds_reanalysis[variable].sel(region=region),\n", " xticks=range(1, 13),\n", ")\n", "plt.suptitle(\"ERA5\")\n", "plt.show()\n", "\n", - "facet = plot_tercile_occupations(\n", + "facet = plot_tercile_analysis(\n", " ds_seasonal[variable].sel(region=region, centre=centre),\n", " col=\"valid_year\",\n", " col_wrap=5,\n",