A set of APIs to Light Conversion devices
Project description
lightcon
Installation
Pip
pip install lightcon
Changelog
1.1
Added
fast_daq module examples/fast_daq_wrapper_example.py
1.0
Initial release
Modules
lightcon.beam_alignment
Beam Alignment App REST client
lightcon.common
Tools and converters
lightcon.harpia
HARPIA Service App REST client
lightcon.fast_daq
Interface to the fast single-channel DAQ (E13-10023-02 or newer) DLL wrapper Example:
import lightcon.fast_daq
fdw = lightcon.fast_daq.FastDaqWrapper()
if fdw.is_connected():
# sets missing trigger/clock timeout, after which TimeoutException is raised
fdw.set_timeout(1000)
# choose channel 'PFI0' for external clocking, 'internal' for internal clocking. Use 'rising' or 'falling' for active_edge
fdw.configure_sample_clock(channel = 'PFI0', active_edge = 'rising')
# choose channel 'PFI0' for external clocking, 'internal' for internal triggering
fdw.configure_start_trigger(channel = 'internal')
# sets external trigger delay for sampling to 100 ns
fdw.set_external_trigger_delay(1000)
# acquires n = 1000 samples as one-dimensional array
data = fdw.get_daq_data(10)
fdw.close()
lightcon.harpia_daq
Interface to the universal six-channel DAQ (PE04-005-04 or newer) DLL wrapper Example:
import lightcon.harpia_daq
# provide in ascending order to keep plot labels right
enabled_channels = ['AI0', 'AI1', 'AI3']
hdw = lightcon.harpia_daq.HarpiaDaqWrapper()
if hdw.is_connected:
# sets missing trigger/clock timeout, after which TimeoutException is raised
hdw.set_timeout(100)
# enable analog input channels
hdw.enable_channels(enabled_channels)
# choose channel 'PFI0' - 'PFI5' for external clocking, 'internal' for internal clocking. Use 'rising' or 'falling' for active_edge
hdw.configure_sample_clock(channel = 'internal', active_edge = 'falling')
# choose channel 'PFI0' - 'PFI5' for external clocking, 'internal' for internal triggering
hdw.configure_start_trigger(channel = 'PFI0')
# acquires n=1000 samples and arranges to (m,n) two-dimensonal array, where m is number of enabled channels (in ascending order)
data = hdw.get_daq_data(1000)
lightcon.timing_controller
Timing controller API
Example:
import lightcon.timing_controller
tc = TimingController()
tc.connect()
if tc.connected:
print ('Trigger source', 'EXTERNAL' if tc.get_trigger_source() == 1 else 'INTERNAL {:} Hz'.format(tc.get_frequency()))
print ('\n'.join(['Channel {:}, delay {:} ns, {:}'.format(i, tc.get_delay(i), 'ENABLED' if tc.get_enabled(i)==1 else 'DISABLED') for i in [1,2,3,4]]))
Output:
Connected to timer_stopwatch on COM12 (E131001401, firmware version: 1.0.1)
Trigger source INTERNAL 1750 Hz
Channel 1, delay 0 ns, DISABLED
Channel 2, delay 0 ns, DISABLED
Channel 3, delay 0 ns, DISABLED
Channel 4, delay 0 ns, DISABLED
lightcon.wintopas
WinTopas REST client
lightcon.camera_app_client
CameraApp REST client
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lightcon-1.1.31.tar.gz
(123.2 kB
view details)
Built Distribution
lightcon-1.1.31-py3-none-any.whl
(136.2 kB
view details)
File details
Details for the file lightcon-1.1.31.tar.gz
.
File metadata
- Download URL: lightcon-1.1.31.tar.gz
- Upload date:
- Size: 123.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb57757d41f813c60f94ccd5e249a2573c051c20041036ceff1d8eddd3e09b4e |
|
MD5 | e2902eb186a4ebae46ec3a0d902d940b |
|
BLAKE2b-256 | 4f184aac58a486669e8a7a4a30611ea8d463e67b4e1612b6da29a0ddb31bd840 |
File details
Details for the file lightcon-1.1.31-py3-none-any.whl
.
File metadata
- Download URL: lightcon-1.1.31-py3-none-any.whl
- Upload date:
- Size: 136.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56448c38b945c31677d6f8997324c58d826713e1e254055dd75f943f810fe7d3 |
|
MD5 | 9ed98b73537f98a9397d63e3d7aa9be2 |
|
BLAKE2b-256 | aa2a10194bcddf46df6f645f4f98a41e37f1c3c3742821ae951ce02c263834cd |