Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix to kinesis.py when using ThorLabs HDR50/M rotation stage with BSC201 controller #46

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Overview
-------------------------

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7324875.svg
:target: https://doi.org/10.5281/zenodo.7324875

PyLabLib aims to provide support for device control and experiment automation. It interfaces with lots of different of `devices <https://pylablib.readthedocs.io/en/latest/devices/devices_root.html>`__, including several different `camera interfaces <https://pylablib.readthedocs.io/en/latest/devices/cameras_root.html>`__, `translational stages <https://pylablib.readthedocs.io/en/latest/devices/stages_root.html>`__, `oscilloscopes <https://pylablib.readthedocs.io/en/latest/devices/Tektronix.html>`__, `AWGs <https://pylablib.readthedocs.io/en/latest/devices/generic_awgs.html>`__, `sensors <https://pylablib.readthedocs.io/en/latest/devices/basic_sensors_root.html>`__, and more. The interface is implemented in a natural way through Python objects, and is easy to understand. For example, here is a complete script which steps Thorlabs KDC101 stage by 10000 steps ten times, and each time grabs a frame with Andor iXon camera:

.. code-block:: python
Expand Down
6 changes: 6 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Related projects
`Pylablib cam-control <https://github.com/AlexShkarin/pylablib-cam-control>`__ - software for universal camera control and camera data acquisition.


Citation
-------------------------

If you found this package useful in your scientific work, you can cite via `Zenodo <https://doi.org/10.5281/zenodo.7324875>`__ either referencing to the package in general using the DOI ``10.5281/zenodo.7324875``, or to a specific version, as found on the `Zenodo <https://doi.org/10.5281/zenodo.7324875>`__ page.


.. toctree::
:maxdepth: 2
:includehidden:
Expand Down
10 changes: 5 additions & 5 deletions pylablib/devices/Thorlabs/kinesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def check_background_comm(self, messageID):
"""Return message counter and the last message value (``None`` if not message received yet) of a given 'background' message"""
return self._bg_msg_counters[messageID]

_device_SN={ 20:"BSC001", 21:"BPC001", 22:"BNT001", 25:"BMS001", 26:"KST101", 27:"KDC101", 28:"KBD101", 29:"KPZ101",
30:"BSC002", 31:"BPC002", 33:"BDC101", 35:"BMS002", 37:"MFF10." ,
40:"(BSC101|SSC20.)", 41:"BPC101", 43:"BDC101", 44:"PPC001", 45:"LTS", 48:"MMR", 49:"MLJ",
_device_SN={ 20:"BSC001", 21:"BPC001", 22:"BNT001", 25:"BMS001", 26:"KST101", 27:"KDC101", 28:"KBD101", 29:"KPZ101",
30:"BSC002", 31:"BPC002", 33:"BDC101", 35:"BMS002", 37:"MFF10.",
40:"(BSC101|BSC201|SCC201|SSC20.)", 41:"BPC101", 43:"BDC101", 44:"PPC001", 45:"LTS", 48:"MMR", 49:"MLJ",
50:"MST60" , 51:"MPZ601", 52:"MNA601", 55:"K10CR1", 56:"KLS101", 57:"KNA101", 59:"KSG101",
60:"0ST001", 63:"ODC001", 64:"TLD001", 65:"TIM001", 67:"TBD001", 68:"KSC101", 69:"KPA101",
70:"BSC.03", 71:"BPC.03", 72:"BPS103", 73:"BBD103",
Expand Down Expand Up @@ -1223,7 +1223,7 @@ def _calculate_scale(self, scale):
return (ssc,ssc*time_conv*2**16,ssc*time_conv**2*2**16),units
if self._model in ["TST001","MST601"] or self._model.startswith("BSC00") or self._model.startswith("BSC10") or self._model.startswith("MPC"):
return (ssc,ssc,ssc),units
if self._model in ["TST101","KST101","MST602","K10CR1"] or self._model.startswith("BSC20"):
if self._model in ["TST101","KST101","MST602","K10CR1"] or self._model.startswith("BSC20") or self._model.startswith("SCC20"):
vpr=53.68
avr=204.94E-6
return (ssc,ssc*vpr,ssc*vpr*avr),units
Expand Down Expand Up @@ -1487,4 +1487,4 @@ def v2i(v, scale=10):
open_loop_out=current_parameters.open_loop_out if open_loop_out is None else open_loop_out
data=struct.pack("<hhhhHHhh",xmin,ymin,xmax,ymax,route,open_loop_out,xgain,ygain)
self._quad_set(0x05,data)
return self.get_output_parameters()
return self.get_output_parameters()