YorkUphysLabV2 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- YorkUphysLab/Actuator/Actuator.py +133 -0
- YorkUphysLab/Actuator/__init__.py +0 -0
- YorkUphysLab/GwINSTEK/AFG2000.py +164 -0
- YorkUphysLab/GwINSTEK/GPD3303D.py +218 -0
- YorkUphysLab/GwINSTEK/__init__.py +0 -0
- YorkUphysLab/HVcontrol/HV_control.py +133 -0
- YorkUphysLab/HVcontrol/__init__.py +0 -0
- YorkUphysLab/ScoutScale/ScoutSTX.py +131 -0
- YorkUphysLab/ScoutScale/__init__.py +0 -0
- YorkUphysLab/Tektronix/TBS1000.py +456 -0
- YorkUphysLab/Tektronix/__init__.py +0 -0
- YorkUphysLab/Utility/Utility.py +56 -0
- YorkUphysLab/Utility/__init__.py +0 -0
- YorkUphysLab/__init__.py +1 -0
- YorkUphysLab/__version__.py +1 -0
- example/YorkUphysLab_example.py +50 -0
- yorkuphyslabv2-2.0.0.dist-info/METADATA +43 -0
- yorkuphyslabv2-2.0.0.dist-info/RECORD +21 -0
- yorkuphyslabv2-2.0.0.dist-info/WHEEL +5 -0
- yorkuphyslabv2-2.0.0.dist-info/licenses/LICENSE +21 -0
- yorkuphyslabv2-2.0.0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from YorkUphysLab.ScoutScale import ScoutSTX as Scale
|
|
2
|
+
from YorkUphysLab.GwINSTEK import GPD3303D as PSU
|
|
3
|
+
from YorkUphysLab.Actuator import Actuator as ACT
|
|
4
|
+
from YorkUphysLab.HVcontrol import HV_control as HV
|
|
5
|
+
from YorkUphysLab.Utility import Utility
|
|
6
|
+
|
|
7
|
+
import time
|
|
8
|
+
|
|
9
|
+
# 1. Test the ScoutSTX class
|
|
10
|
+
scale = Scale.ScoutSTX()
|
|
11
|
+
scale.connect()
|
|
12
|
+
|
|
13
|
+
wt = scale.read_weight_time()
|
|
14
|
+
if wt: print(f"Weight: {wt[0]} g, at {wt[1]}")
|
|
15
|
+
|
|
16
|
+
w = scale.read_weight()
|
|
17
|
+
if w: print(f"Weight: {w} g")
|
|
18
|
+
|
|
19
|
+
# close the connection
|
|
20
|
+
scale.close_connection()
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# 2. Test the GPD3303D class
|
|
24
|
+
psu = PSU.GPD3303D()
|
|
25
|
+
psu.connect()
|
|
26
|
+
|
|
27
|
+
# 3. Test the Actuator class
|
|
28
|
+
DAQ_mame = 'SDAQ-25' # you can find the DAQ name in the NI MAX software: Devices and Interfaces
|
|
29
|
+
|
|
30
|
+
actuator = ACT.Actuator(DAQ_mame, psu)
|
|
31
|
+
if actuator.switch_on():
|
|
32
|
+
actuator.set_position(10)
|
|
33
|
+
time.sleep(2)
|
|
34
|
+
print(f'New position: {actuator.get_position()} mm')
|
|
35
|
+
actuator.switch_off()
|
|
36
|
+
|
|
37
|
+
# 4. Test the HV_control class
|
|
38
|
+
hv = HV.HV_control(psu)
|
|
39
|
+
if hv.switch_on():
|
|
40
|
+
hv.set_hv(1.5)
|
|
41
|
+
time.sleep(2)
|
|
42
|
+
actual_HV = hv.get_hv()
|
|
43
|
+
print(f'Actual HV = {actual_HV} kV')
|
|
44
|
+
time.sleep(5)
|
|
45
|
+
hv.switch_off()
|
|
46
|
+
|
|
47
|
+
# 5. Save data to a CSV file
|
|
48
|
+
desktop_path = "C:\\Users\\mkareem\\OneDrive - York University\\Desktop"
|
|
49
|
+
data = [[1, 2], [3, 4]]
|
|
50
|
+
Utility.write_data_to_csv(data, desktop_path, "test123.csv")
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: YorkUphysLabV2
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: A Python package to control YU physics labs equipment. V2 updated to work with new versions of setup.
|
|
5
|
+
Author-email: "Bruce Howard (maintainer)" <blhoward@yorku.ca>, "Mohammad Kareem (original author)" <mkareem@yorku.ca>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/brucehoward-physics/YorkUphysLab
|
|
8
|
+
Project-URL: Issues, https://github.com/m-kareem/YorkUphysLab/issues
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.7
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: nidaqmx
|
|
15
|
+
Requires-Dist: pyserial
|
|
16
|
+
Requires-Dist: pyvisa-py
|
|
17
|
+
Requires-Dist: numpy
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
|
|
20
|
+
# York University physics lab
|
|
21
|
+
|
|
22
|
+
This package includes the required drivers to control some of the hardwares in physics labs at York University.
|
|
23
|
+
|
|
24
|
+
## How to install
|
|
25
|
+
|
|
26
|
+
```pip install --no-cache-dir --upgrade YorkUphysLabV2```
|
|
27
|
+
|
|
28
|
+
## How to use
|
|
29
|
+
|
|
30
|
+
See the examples script: YorkUphysLab_example.py
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Developed by:
|
|
34
|
+
|
|
35
|
+
Mohammad Kareem, Ph.D.
|
|
36
|
+
Laboratory Technologist
|
|
37
|
+
Department of Physics & Astronomy
|
|
38
|
+
Faculty of Science | YORK UNIVERSITY
|
|
39
|
+
4700 Keele Street, Toronto, Ontario, Canada M3J 1P3
|
|
40
|
+
|
|
41
|
+
## Maintained in V2 by:
|
|
42
|
+
|
|
43
|
+
Bruce Howard, Ph.D.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
YorkUphysLab/__init__.py,sha256=C7_gE0lIQJ8Wh2jgU8C8P_xyvq76bKTf0gm8bGYhMBk,37
|
|
2
|
+
YorkUphysLab/__version__.py,sha256=TnqNNwaBLFdW4A3XLFoX8-Y2k0vWV35ZkYILdAgoxCY,22
|
|
3
|
+
YorkUphysLab/Actuator/Actuator.py,sha256=8y_YFEKgX3NQfgQWsIB2QHFaxhmOnPtSe--nIBuFf4Y,4206
|
|
4
|
+
YorkUphysLab/Actuator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
YorkUphysLab/GwINSTEK/AFG2000.py,sha256=dSLGXmIkI5nxcwmiwd2RXKV4AzxHjK25g6CfaTW-aPw,5696
|
|
6
|
+
YorkUphysLab/GwINSTEK/GPD3303D.py,sha256=dMpfuz0d3mSu-Z_kl5lYD0fJF2OYcGgFJrxTZ0GV4FI,7853
|
|
7
|
+
YorkUphysLab/GwINSTEK/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
YorkUphysLab/HVcontrol/HV_control.py,sha256=5Jxb6rbJRFNd7l5tVtU4mC2xrG_BJu38bhVtwzP4zvo,3966
|
|
9
|
+
YorkUphysLab/HVcontrol/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
YorkUphysLab/ScoutScale/ScoutSTX.py,sha256=am8eg7UnKLizXcdfP3zTFw38Ar2RfwI3vIWC2JdWehA,4266
|
|
11
|
+
YorkUphysLab/ScoutScale/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
YorkUphysLab/Tektronix/TBS1000.py,sha256=odegFDms587_mV7W2y8UqeEp-2Ad3zbzwHDbX47f1is,18957
|
|
13
|
+
YorkUphysLab/Tektronix/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
YorkUphysLab/Utility/Utility.py,sha256=kt7YeUIbrs4GybGXsAy7O7y_QDs5hpkzDYYAo1iIufY,1593
|
|
15
|
+
YorkUphysLab/Utility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
example/YorkUphysLab_example.py,sha256=5wltbUmwXVgFVO9OZq4yBJKqjC-QheT8Enj0SHFJ9a0,1314
|
|
17
|
+
yorkuphyslabv2-2.0.0.dist-info/licenses/LICENSE,sha256=XKvX3YUYicsgqVZdU9azZF7aRKcVVOsg7ZrwG0LUKYs,1072
|
|
18
|
+
yorkuphyslabv2-2.0.0.dist-info/METADATA,sha256=Q0PJqNwgOwHiA9R04ygeTFjdvitdoLrnAae4qZOleko,1273
|
|
19
|
+
yorkuphyslabv2-2.0.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
20
|
+
yorkuphyslabv2-2.0.0.dist-info/top_level.txt,sha256=X36kf67tvmxaMXaTbQVDbAuts5Vx0gd6ONa3jDWT8aU,21
|
|
21
|
+
yorkuphyslabv2-2.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Mohammad Kareem
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|