From e74d67d92ebc89d28e63ea80a236a55bf62e496f Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Mon, 22 Aug 2022 10:36:15 -0400
Subject: [PATCH] Update fitting code

---
 notebooks/InteractiveBIPFitting.ipynb | 54 +++++++--------------------
 1 file changed, 14 insertions(+), 40 deletions(-)

diff --git a/notebooks/InteractiveBIPFitting.ipynb b/notebooks/InteractiveBIPFitting.ipynb
index 0e7f24a..d602d96 100644
--- a/notebooks/InteractiveBIPFitting.ipynb
+++ b/notebooks/InteractiveBIPFitting.ipynb
@@ -11,7 +11,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 44,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -28,7 +28,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 45,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -46,6 +46,7 @@
     "            \"0\":{\n",
     "                \"1\": {\n",
     "                    \"BIP\":{\n",
+    "                        \"type\": \"invariant\",\n",
     "                        \"lambdaT\": params['lambdaT'],\n",
     "                        \"phiT\": params['phiT'],\n",
     "                        \"lambdaV\": params['lambdaV'],\n",
@@ -53,7 +54,7 @@
     "                        \"Fij\": 0.0\n",
     "                    },\n",
     "                    \"departure\":{\n",
-    "                        \"type\" : \"Exponential\", \"n\" : [], \"t\" : [], \"d\" : [], \"l\" : []\n",
+    "                        \"type\" : \"none\"\n",
     "                    }\n",
     "                }\n",
     "            }\n",
@@ -64,6 +65,7 @@
     "            \"0\":{\n",
     "                \"1\": {\n",
     "                    \"BIP\":{\n",
+    "                        \"type\": \"GERG2004\",\n",
     "                        \"betaT\": params['betaT'],\n",
     "                        \"gammaT\": params['gammaT'],\n",
     "                        \"betaV\": params['betaV'],\n",
@@ -71,7 +73,7 @@
     "                        \"Fij\": 0.0\n",
     "                    },\n",
     "                    \"departure\":{\n",
-    "                        \"type\" : \"Exponential\", \"n\" : [], \"t\" : [], \"d\" : [], \"l\" : []\n",
+    "                        \"type\" : \"none\"\n",
     "                    }\n",
     "                }\n",
     "            }\n",
@@ -83,24 +85,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 46,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "application/vnd.jupyter.widget-view+json": {
-       "model_id": "ba91703589c14cd8aed5738916db8120",
-       "version_major": 2,
-       "version_minor": 0
-      },
-      "text/plain": [
-       "interactive(children=(FloatSlider(value=0.0, description='lambdaT', max=0.1, min=-0.1, step=0.02), FloatSlider…"
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    }
-   ],
+   "outputs": [],
    "source": [
     "def get_critical_curve(params):\n",
     "    \"\"\" Trace the critical curve and return values \"\"\"    \n",
@@ -149,25 +136,12 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 47,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "application/vnd.jupyter.widget-view+json": {
-       "model_id": "016c474e578d4c45af03a968b7e1381c",
-       "version_major": 2,
-       "version_minor": 0
-      },
-      "text/plain": [
-       "interactive(children=(FloatSlider(value=0.99, description='betaT', max=1.1, min=0.9, step=0.01), FloatSlider(v…"
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    }
-   ],
+   "outputs": [],
    "source": [
+    "#crit_curve_plotter(**{'betaT': 1.0, 'gammaT': 1.0, 'betaV': 1.0, 'gammaV': 1, 'type': 'GERG'})\n",
+    "\n",
     "interactive_plot = interactive(crit_curve_plotter, betaT=(0.9,1.1,0.01),gammaT=(0.5,2,0.02),betaV=(0.9,1.1,0.02),gammaV=(0.2,2,0.02), type=['GERG'])\n",
     "output = interactive_plot.children[-1]\n",
     "output.layout.height = '400px'\n",
@@ -177,7 +151,7 @@
  ],
  "metadata": {
   "kernelspec": {
-   "display_name": "Python 3",
+   "display_name": "Python 3 (ipykernel)",
    "language": "python",
    "name": "python3"
   },
@@ -191,7 +165,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.8.5"
+   "version": "3.10.4"
   }
  },
  "nbformat": 4,
-- 
GitLab