From acd1771f538da4d8cf5562a50c31e8aaa6943b69 Mon Sep 17 00:00:00 2001 From: "Andrey E. Antipov" Date: Sun, 20 Aug 2023 19:06:58 -0700 Subject: [PATCH] data and analysis for PRL 130, 207001 (2023) (#5) * data and analysis for PRL 130, 207001 (2023) * update noxfile * Pin matplotlib to prevent bug Prevents https://github.com/matplotlib/matplotlib/issues/26287 * Pin sklearn --------- Co-authored-by: Andrey Antipov Co-authored-by: Bas Nijholt --- data/PRL130_207001.nc | 3 + notebooks/PRL130_207001.ipynb | 113 ++++++++++++++++++++++++++++++++++ noxfile.py | 1 + requirements.txt | 4 +- 4 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 data/PRL130_207001.nc create mode 100644 notebooks/PRL130_207001.ipynb diff --git a/data/PRL130_207001.nc b/data/PRL130_207001.nc new file mode 100644 index 0000000..7546964 --- /dev/null +++ b/data/PRL130_207001.nc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4962fbe917f375842d1ad3f5182b10fbbad5e10bd7cbd474cfae77f18cccfd40 +size 100075802 diff --git a/notebooks/PRL130_207001.ipynb b/notebooks/PRL130_207001.ipynb new file mode 100644 index 0000000..b551170 --- /dev/null +++ b/notebooks/PRL130_207001.ipynb @@ -0,0 +1,113 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "cc9b387c-fb17-44ef-b8bc-6b8996d2ae93", + "metadata": {}, + "outputs": [], + "source": [ + "import tgp\n", + "from tgp.plot import paper\n", + "import xarray as xr" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ebf07338-e9cb-4795-9dd1-d9ab4afd85e4", + "metadata": {}, + "outputs": [], + "source": [ + "ds_T0 = xr.load_dataset('../data/PRL130_207001.nc')\n", + "ds_T0 = tgp.prepare.prepare(ds_T0)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0d099e77-db27-4812-b880-4194a913b9d2", + "metadata": {}, + "outputs": [], + "source": [ + "ds_T0" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "30c6c010-bd14-4aea-8a07-9beca5aae77b", + "metadata": {}, + "outputs": [], + "source": [ + "# Perform temperature broadening\n", + "ds = tgp.prepare.broaden_with_temperature(ds_T0, T_mK=40)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "da44ef29-bc39-4630-bb85-6182159b867a", + "metadata": {}, + "outputs": [], + "source": [ + "# Inspect data\n", + "ds_left = ds.rename({\"bias\": \"left_bias\"})\n", + "ds_right = ds.rename({\"bias\": \"right_bias\"})\n", + "tgp.plot.two.plot_data_interactive(ds_left, ds_right)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "23f4b3bb-e322-4097-9515-6bc35ea3fe01", + "metadata": {}, + "outputs": [], + "source": [ + "# Identify regions of zero bias peaks and finite gap\n", + "ds_left, ds_right = tgp.two.extract_gap(ds_left, ds_right)\n", + "zbp_ds = tgp.two.zbp_dataset_derivative(ds_left, ds_right, average_over_cutter=False)\n", + "tgp.two.set_gap_threshold(zbp_ds, threshold_high=None)\n", + "zbp_ds = tgp.two.cluster_and_score(zbp_ds)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ab58f1b3-89b3-4b9d-bd7b-ecd58db2bf58", + "metadata": {}, + "outputs": [], + "source": [ + "selected_cutter = int(ds.where(ds[\"μ_L\"] == 0.0, drop =True).cutter_pair_index)\n", + "fig, axs = tgp.plot.paper.plot_stage2_diagram(zbp_ds, cutter_value=selected_cutter, zbp_cluster_numbers=\"all\")\n", + "axs[0].set_ylabel(r'$\\mu$ [meV]')\n", + "axs[0].set_xlabel(r'$B$ [meV]')\n", + "axs[1].set_xlabel(r'$B$ [meV]')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fe262954-88e1-43c1-83c0-aa6018661d63", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.8" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/noxfile.py b/noxfile.py index 2d701d6..c2bac9f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -10,6 +10,7 @@ "notebooks/stage-one-analysis.ipynb", "notebooks/stage-two-analysis.ipynb", "notebooks/fridge-calibration.ipynb", + "notebooks/PRL130_207001.ipynb", ] diff --git a/requirements.txt b/requirements.txt index a5272e6..b1b3817 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,13 +2,13 @@ h5netcdf ipython ipywidgets jinja2 -matplotlib +matplotlib==3.7.1 numpy pandas pyyaml rich ruamel.yaml -scikit-learn +scikit-learn==1.2.2 scipy toolz tqdm