From 90ba6321c9084fb3ad92321a45d672feebdead4e Mon Sep 17 00:00:00 2001 From: Shreyansh Fofandi Date: Fri, 22 Sep 2023 13:44:59 +0530 Subject: [PATCH 1/5] Update README.md --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a139d59..f95e094 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,19 @@ ![GitHub release (with filter)](https://img.shields.io/github/v/release/maclariz/HallPy_Teach) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/maclariz/HallPy_Teach/.github%2Fworkflows%2Fpackage-build-and-publish.yml) ![PyPI - Version](https://img.shields.io/pypi/v/HallPy_Teach) - -### Get Started -> pip install hallpy_teach - ## Description This package uses PyVISA to control and read instruments (power supplies, multimeters etc.) to run experiments in the Physics Honours Laboratory, initially for Hall Effect, although control of Curie Weiss law is also envisaged. This automates the data acquisition and allows easy recording of many data points in patterns or intervals defined by the user, and produces data files containing the results in numpy arrays, suitable for plotting and data analysis. +## Get Started +Install the package +```python +pip install HallPy_Teach +``` +Use it in a notebook with +```python +import HallPy_Teach as hp +``` + ## Guide to push updates to the package - Make your changes on a different branch - Create a [New Pull Request](https://github.com/maclariz/HallPy_Teach/compare) which merging your branch to main. From d8d68794cf9010ccc7162f6954ec88c4f1558f5f Mon Sep 17 00:00:00 2001 From: Shreyansh Fofandi Date: Fri, 22 Sep 2023 13:46:33 +0530 Subject: [PATCH 2/5] Update requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4376d65..25352d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,5 @@ numpy~=1.20.0 ipywidgets~=7.7.1 ipython~=7.20.0 PyVISA~=1.12.0 -constants~=0.6.0 \ No newline at end of file +PyVISA-py~=0.7.0 +constants~=0.6.0 From 3dc1633572566da89f76adb2539b7bf4a1b013f6 Mon Sep 17 00:00:00 2001 From: Shreyansh Fofandi Date: Fri, 22 Sep 2023 16:19:42 +0530 Subject: [PATCH 3/5] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 25352d6..7cd28c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ ipython~=7.20.0 PyVISA~=1.12.0 PyVISA-py~=0.7.0 constants~=0.6.0 +zeroconf~=0.112.0 From 3dc7930f9c27bbf6dd46bed927f70b74db8e46f3 Mon Sep 17 00:00:00 2001 From: Shreyansh Fofandi Date: Fri, 22 Sep 2023 16:44:01 +0530 Subject: [PATCH 4/5] Update README.md --- README.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f95e094..b55a657 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,44 @@ Install the package ```python pip install HallPy_Teach ``` -Use it in a notebook with +Import it in a Jupyter notebook or anyother notebook like python environment ```python import HallPy_Teach as hp ``` +Doing an experiment +There are two methods to doing experiments. +***Method 1*** requires less hassel and allows you to setup your instruments to run the experiments via a GUI. The GUI will guide you through connecting and trouble shooting the required experiment and subsiquently the intsruments required for the selected experiemnt. +***Method 2*** is a more manual approach, this is the less prefered option but we've stated the second method here anyway because it is the method one would follow if they design their own experiment file. The guide to setting up your own experiments can be found on the [HallPy_Teach Website](https://hallpy.fofandi.dev/guides/) + +### Method 1 +#### Step 1: Experiemnt & Instrument Setup +When the following code block is run you will be guided through choosing the experiment and setting up the instruments for said experiment. +```python +import HallPy_Teach as Teach +experiment = Teach.Setup() +``` + +#### Step 2: Experiment Parameters & Data Collection +***You cannot run Step 2 without compelting step 1*** +When the following code block is run you will start seeing the data being collected. +Only run this codeblock once your you've setup your experiment aparatus and you're ready to collect the data. +If the experiment requires parameters to be set, such as *voltage sweep ranges* and *data collection intervals* you will see a guide to setting the required parameter(s). +Once the data collection has started you should see the data being visualised as it comes in. Once all the data is collected you should see a prompt saying so. +```python +data = experiment.doExperiment(experiment.expInsts) +``` + +### Method 2 +***Read Method 1 before reading Method 2*** +As stated before **Method 2** is added so users can run their own designed experiments. As you can see in the example below we are importing `yourExperimentFile.py` from which we will get the custom experiment. +```python +import yourExperimentFile.py as yourExp +import HallPy_Teach as Teach +allInstruments = Teach.initInstruments() +yourExpInstruments = yourExp.setup(allInstruments) +data = yourExp.doExperiment(yourExpInstruments) +``` +As stated before **Method 2** exists so that you can run your own experiemnts which means that supporting good error handeling and guides for how to solve said errors is down to the author of the custom experiment. Just for the sake of reference, you can find a code block below which runs the `HallEffect` experiment, a experiment provided by the library, with **Method 2** instead of **Method 1**. ## Guide to push updates to the package - Make your changes on a different branch From d3867f75362e91a1a4bc87c87634dba3371d62c1 Mon Sep 17 00:00:00 2001 From: Shreyansh Fofandi Date: Fri, 22 Sep 2023 17:42:07 +0530 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b55a657..e7d73ae 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ experiment = Teach.Setup() ``` #### Step 2: Experiment Parameters & Data Collection -***You cannot run Step 2 without compelting step 1*** +***You cannot run Step 2 without compelting step 1***
When the following code block is run you will start seeing the data being collected. Only run this codeblock once your you've setup your experiment aparatus and you're ready to collect the data. If the experiment requires parameters to be set, such as *voltage sweep ranges* and *data collection intervals* you will see a guide to setting the required parameter(s).