Skip to content

Commit 4a7cdfb

Browse files
authored
Merge pull request #67 from VektrexElectronicSystems/development-sandbox
Development sandbox v1.13.0
2 parents 2989534 + 2f6c4a8 commit 4a7cdfb

File tree

75 files changed

+497
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+497
-85
lines changed

README.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,33 @@ To run these sequences in a more feature rich IDE, use the free [Visual Studio C
8484
### Packages
8585
SpikeSafePythonSamples requires packages to run all scripts.
8686

87-
There are two ways to install these packages:
88-
1. See Section [Automatically Install Packages](#automatically-install-packages)
89-
2. See Section [Manually Install Packages](#manually-install-packages)
87+
There are three ways to install these packages:
88+
1. See Section [Automatically Install Packages with Requirements Text file](#automatically-install-packages-with-python-script)
89+
1. See Section [Automatically Install Packages with Python Script](#automatically-install-packages-with-python-script)
90+
1. See Section [Manually Install Packages](#manually-install-packages)
9091

9192
After all packages are installed, refer to section [Package Helpers](#package-helpers) to verify package details.
9293

93-
#### Automatically Install Packages
94+
#### Automatically Install Packages with Requirements Text file
95+
All necessary SpikeSafePythonSamples packages may be installed automatically using the `requirements.txt` file. Follow these steps:ff
96+
97+
1. Ensure you have `pip` installed and updated. You can check and install `pip` using the following commands:
98+
| OS | Command |
99+
| - | - |
100+
| Windows | `py -m pip install --upgrade pip` |
101+
| macOS | `python3 -m pip install --upgrade pip` |
102+
103+
2. Navigate to the root directory of the SpikeSafePythonSamples project where the `requirements.txt` file is located.
104+
105+
3. Run the following command to install all required packages:
106+
| OS | Command |
107+
| - | - |
108+
| Windows | `py -m pip install -r requirements.txt` |
109+
| macOS | `python3 -m pip install -r requirements.txt` |
110+
111+
After running these commands, all necessary packages will be installed, and you can proceed with running the SpikeSafePythonSamples scripts.
112+
113+
#### Automatically Install Packages with Python Script
94114
All necessary SpikeSafePythonSamples packages may be installed automatically. See [Install SpikeSafePythonSamples Packages](/getting_started/install_spikesafe_python_samples_packages/) and run the python .py script in this directory.
95115

96116
#### Manually Install Packages
@@ -99,19 +119,7 @@ All necessary SpikeSafePythonSamples packages may be installed manually. Perform
99119
##### Installing pip Package
100120
Installing packages use [pip](https://pypi.org/project/pip/). It is recommended that pip be updated to latest version.
101121

102-
First, check if your environment has pip installed, run command:
103-
| OS | Command |
104-
| - | - |
105-
| Windows | `py -m pip --version` |
106-
| macOS | `python3 -m pip --version` |
107-
108-
If your environment does not have pip installed, run command:
109-
| OS | Command |
110-
| - | - |
111-
| Windows | `py -m ensurepip --upgrade` |
112-
| macOS | `python3 -m ensurepip --upgrade` |
113-
114-
To install/upgrade pip, run command:
122+
Ensure you have `pip` installed and updated. You can check and install `pip` using the following commands:
115123
| OS | Command |
116124
| - | - |
117125
| Windows | `py -m pip install --upgrade pip` |
@@ -123,8 +131,8 @@ The [spikesafe-python](https://pypi.org/project/spikesafe-python/) library will
123131
To install this package, run command:
124132
| OS | Command |
125133
| - | - |
126-
| Windows | `py -m pip install spikesafe-python` |
127-
| macOS | `python3 -m pip install spikesafe-python` |
134+
| Windows | `py -m pip install --upgrade spikesafe-python` |
135+
| macOS | `python3 -m pip install --upgrade spikesafe-python` |
128136

129137
Once the spikesafe-python package is installed, each script in this repository can be run independently as a standalone Python file. Run a file in its current state and verify that the expected outputs are obtained, as specified by the file's markdown description.
130138

@@ -136,26 +144,26 @@ Some sequences involve graphing measurement results. To properly graph results,
136144
To install this package, run command:
137145
| OS | Command |
138146
| - | - |
139-
| Windows | `py -m pip install matplotlib` |
140-
| macOS | `python3 -m pip install matplotlib` |
147+
| Windows | `py -m pip install --upgrade matplotlib` |
148+
| macOS | `python3 -m pip install --upgrade matplotlib` |
141149

142150
##### Installing PyCLibrary Package
143151
Some sequences require external C resources, and requires the [PyCLibrary](https://pyclibrary.readthedocs.io/en/latest/) library. Once the PyCLibrary library is installed, each sequence that involves external C resources can be run as a standalone Python file.
144152

145153
To install this package, run command:
146154
| OS | Command |
147155
| - | - |
148-
| Windows | `py -m pip install pyclibrary` |
149-
| macOS | `python3 -m pip install pyclibrary` |
156+
| Windows | `py -m pip install --upgrade pyclibrary` |
157+
| macOS | `python3 -m pip install --upgrade pyclibrary` |
150158

151159
##### Installing pyserial Package
152160
Some sequences involve connecting to a serial interface instrument and requires the [pyserial](https://pypi.org/project/pyserial/) library (version 3.5 or greater). Once the pyserial library is installed, each sequence that involves a serial interface can be run as a standalone Python file.
153161

154162
To install this package, run command:
155163
| OS | Command |
156164
| - | - |
157-
| Windows | `py -m pip install pyserial` |
158-
| macOS | `python3 -m pip install pyserial` |
165+
| Windows | `py -m pip install --upgrade pyserial` |
166+
| macOS | `python3 -m pip install --upgrade pyserial` |
159167

160168
#### Package Helpers
161169

4.71 KB
Loading

application_specific_examples/fixed_pulse_count_using_software_timing/FixedPulseCountUsingSoftwareTimingExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
log.info("Python version: {}".format(sys.version))
4040

4141
# instantiate new TcpSocket to connect to SpikeSafe
42-
tcp_socket = TcpSocket()
42+
tcp_socket = TcpSocket(enable_logging=False)
4343
tcp_socket.open_socket(ip_address, port_number)
4444

4545
# reset to default state and check for all events,

application_specific_examples/making_tj_measurements/TjMeasurement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def calculate_Vf0(start_point, end_point, digitizer_data_list):
9595
log.info("Python version: {}".format(sys.version))
9696

9797
# instantiate new TcpSocket to connect to SpikeSafe
98-
tcp_socket = TcpSocket()
98+
tcp_socket = TcpSocket(enable_logging=False)
9999
tcp_socket.open_socket(ip_address, port_number)
100100

101101
# reset to default state and check for all events, this will automatically abort digitizer in order get it into a known state. This is good practice when connecting to a SpikeSafe PSMU
4.71 KB
Loading

application_specific_examples/making_transient_dual_interface_measurement/digitizer_log_sampling_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def receive_user_input_and_log():
5656
### start of main program
5757
try:
5858
# instantiate new TcpSocket to connect to SpikeSafe
59-
tcp_socket = TcpSocket()
59+
tcp_socket = TcpSocket(enable_logging=False)
6060
tcp_socket.open_socket(ip_address, port_number)
6161

6262
# reset to default state and check for all events, this will automatically abort digitizer in order get it into a known state. This is good practice when connecting to a SpikeSafe PSMU

application_specific_examples/measuring_dc_staircase_voltages/MeasuringDcStaircaseVoltages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
log.info("Python version: {}".format(sys.version))
5555

5656
# instantiate new TcpSocket to connect to PSMU
57-
tcp_socket = TcpSocket()
57+
tcp_socket = TcpSocket(enable_logging=False)
5858
tcp_socket.open_socket(ip_address, port_number)
5959

6060
# reset to default state and check for all events, this will automatically abort digitizer in order get it into a known state. This is good practice when connecting to a SpikeSafe PSMU

application_specific_examples/measuring_wavelength_spectrum/WavelengthSpectrumExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
### SpikeSafe Connection and Configuration (Start of typical sequence)
146146

147147
# instantiate new TcpSocket to connect to SpikeSafe
148-
tcp_socket = TcpSocket()
148+
tcp_socket = TcpSocket(enable_logging=False)
149149
tcp_socket.open_socket(ip_address, port_number)
150150

151151
# reset SpikeSafe to default state and check for all events

application_specific_examples/pulse_tuning/PulseTuningExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def run_single_pulse_tuning_test(load_impedance, rise_time):
8282
log.info("Python version: {}".format(sys.version))
8383

8484
# instantiate new TcpSocket to connect to SpikeSafe
85-
tcp_socket = TcpSocket()
85+
tcp_socket = TcpSocket(enable_logging=False)
8686
tcp_socket.open_socket(ip_address, port_number)
8787

8888
# reset to default state and check for all events,

application_specific_examples/running_liv_sweeps/LIVSweepExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
### SpikeSafe Connection and Configuration (Start of typical sequence)
154154

155155
# instantiate new TcpSocket to connect to SpikeSafe
156-
tcp_socket = TcpSocket()
156+
tcp_socket = TcpSocket(enable_logging=False)
157157
tcp_socket.open_socket(ip_address, port_number)
158158

159159
# reset to default state and check for all events, this will automatically abort digitizer in order get it into a known state. This is good practice when connecting to a SpikeSafe PSMU

0 commit comments

Comments
 (0)