ThorCam
A Python interface to the Thor scientific Cameras using .Net.
This library does not support the DCx cameras, only the scientific cameras.
See the docs for more information and to get started.
To install in Anaconda or native Python see the installation instructions.
Basic example
First create a subclass that prints the camera results:
from thorcam.camera import ThorCam
class MyThorCam(ThorCam):
def received_camera_response(self, msg, value):
super(MyThorCam, self).received_camera_response(msg, value)
if msg == 'image':
return
print('Received "{}" with value "{}"'.format(msg, value))
def got_image(self, image, count, queued_count, t):
print('Received image "{}" with time "{}" and counts "{}", "{}"'
.format(image, t, count, queued_count))
Then use the camera:
>>> # create camera
>>> cam = MyThorCam()
<__main__.MyThorCam at 0x25a72f6a748>
>>> # start the server etc.
>>> cam.start_cam_process()
>>> # get list of attached cams
>>> cam.refresh_cameras()
Received "serials" with value "['03756']"
>>> # open the camera
>>> cam.open_camera('03756')
Received "settings" with value "{'binning_x': 1, 'binning_x_range': [1, 24], ..."
Received "cam_open" with value "None"
>>> cam.exposure_range
[0.0, 1000000.0]
>>> cam.exposure_ms
241.948
>>> # update the exposure value
>>> cam.set_setting('exposure_ms', 150)
Received "settings" with value "{'exposure_ms': 150.0}"
>>> cam.exposure_ms
150.0
>>> # now play the camera
>>> cam.play_camera()
Received "playing" with value "True"
Received image "<ffpyplayer.pic.Image object at 0x000001D1D8D67900>" with time "2e-07" and counts "1", "1"
Received image "<ffpyplayer.pic.Image object at 0x000001D1D8D67990>" with time "0.2310473" and counts "2", "1"
Received image "<ffpyplayer.pic.Image object at 0x000001D1D8D67A68>" with time "0.4735178" and counts "3", "1"
Received image "<ffpyplayer.pic.Image object at 0x000001D1D8D67B40>" with time "0.7157285" and counts "4", "1"
Received image "<ffpyplayer.pic.Image object at 0x000001D1D8D67C18>" with time "0.9583721" and counts "5", "1"
>>> # now stop playing
>>> cam.stop_playing_camera()
Received "playing" with value "False"
>>> # close the camera
>>> cam.close_camera()
Received "cam_closed" with value "None"
>>> # close the server and everything
>>> cam.stop_cam_process(join=True)
Metadata
Release files for thorcam 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| thorcam-0.1.7.tar.gz | 16.2 kB | Without provenance | Details for thorcam-0.1.7.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| thorcam-0.1.7-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details for thorcam-0.1.7-cp310-cp310-win_amd64.whl |
| thorcam-0.1.7-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details for thorcam-0.1.7-cp39-cp39-win_amd64.whl |
| thorcam-0.1.7-cp38-cp38-win_amd64.whl | CPython 3.8 | CPython 3.8 | Windows x86-64 | Details for thorcam-0.1.7-cp38-cp38-win_amd64.whl |
| thorcam-0.1.7-cp37-cp37m-win_amd64.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-64 | Details for thorcam-0.1.7-cp37-cp37m-win_amd64.whl |
Total release size: 75.9 MB
Release files / thorcam-0.1.7.tar.gz
| Download URL | thorcam-0.1.7.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea00f15ef029ba4828ca41b797cf56aacfcc5400066d9fb9a8d7eef960d21240
|
|
BLAKE2b-256 checksum How to use checksums |
902d7ed37faa28a8d2e7b09646f8aad1275d4431804cd621c81ca06fa732d433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / thorcam-0.1.7-cp310-cp310-win_amd64.whl
| Download URL | thorcam-0.1.7-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 19.0 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
15ef3b986eff83d0176f26af215624541c33d6a500c1e6b911de2c865d60bdc2
|
|
BLAKE2b-256 checksum How to use checksums |
b74a1887df73be032e06cba2ce1977d4095b0677e00ebb03ef1d1afec54a8f95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / thorcam-0.1.7-cp39-cp39-win_amd64.whl
| Download URL | thorcam-0.1.7-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 19.0 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f259e0934bfc490b2490bd42fab26a6233e1a40f9c62e0781d538179b45a779c
|
|
BLAKE2b-256 checksum How to use checksums |
789e5650c97368896705a2df15df8bda872e8a31921666aece8a5dd1f95d8116
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / thorcam-0.1.7-cp38-cp38-win_amd64.whl
| Download URL | thorcam-0.1.7-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 19.0 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
efa1251b97e93f3a21f66de757f93ecbec6f424768fc5a6f2c9585e357fbe507
|
|
BLAKE2b-256 checksum How to use checksums |
c223d935408e6e803e364300c9cf2ca4742dde4c664d352943f41f22711a10a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / thorcam-0.1.7-cp37-cp37m-win_amd64.whl
| Download URL | thorcam-0.1.7-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 19.0 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
713b502b2c0844c6df8b9b266f86dea30774f9496bba90bb4701a7eefa8f3dfc
|
|
BLAKE2b-256 checksum How to use checksums |
18eee4ecc67f12c29dd4775f7157fed2c146bf7d6155391164b5de8f2aecf7de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.9
|
Security for thorcam 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.