From b49c0d1e942be1f2dfd6f1a9147c06aa797e8699 Mon Sep 17 00:00:00 2001
From: Alexey Shkarin <alexey.shkarin@mpl.mpg.de>
Date: Tue, 15 Nov 2022 21:55:05 +0100
Subject: [PATCH 1/3] Added Zenodo citation

---
 README.rst     | 3 +++
 docs/index.rst | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/README.rst b/README.rst
index 0204198..0e98450 100644
--- a/README.rst
+++ b/README.rst
@@ -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
diff --git a/docs/index.rst b/docs/index.rst
index c76fd82..d3eb6b9 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -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:

From 7d4029402e085b6009ac2cca75c76f9265a945c0 Mon Sep 17 00:00:00 2001
From: Martti Nirkko <m.nirkko@obviotec.com>
Date: Fri, 7 Jul 2023 11:40:25 +0200
Subject: [PATCH 2/3] Update kinesis.py

Fix to avoid warnings and calculate scale correctly when connecting to a HDR50/M rotational stage with BSC201 controller.
---
 pylablib/devices/Thorlabs/kinesis.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pylablib/devices/Thorlabs/kinesis.py b/pylablib/devices/Thorlabs/kinesis.py
index 5574319..3b7ebe3 100644
--- a/pylablib/devices/Thorlabs/kinesis.py
+++ b/pylablib/devices/Thorlabs/kinesis.py
@@ -171,8 +171,8 @@ def check_background_comm(self, messageID):
         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"   ,
+                    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", 
@@ -1391,4 +1391,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()
\ No newline at end of file
+        return self.get_output_parameters()

From f9dbaa4ad590a1b9456d777e422cf2f160665beb Mon Sep 17 00:00:00 2001
From: Martti Nirkko <m.nirkko@obviotec.com>
Date: Fri, 7 Jul 2023 12:15:03 +0200
Subject: [PATCH 3/3] Update kinesis.py

Sets the scale correctly when using a HDR50 rotation stage and a BSC201 motor controller, which gets recognised by the model query as SCC201.
---
 pylablib/devices/Thorlabs/kinesis.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pylablib/devices/Thorlabs/kinesis.py b/pylablib/devices/Thorlabs/kinesis.py
index 3b7ebe3..5690481 100644
--- a/pylablib/devices/Thorlabs/kinesis.py
+++ b/pylablib/devices/Thorlabs/kinesis.py
@@ -1128,7 +1128,7 @@ def _calculate_scale(self, scale):
             return (ssc,ssc*time_conv*2**16,ssc*time_conv**2*2**16),units
         if model in ["TST001","MST601"] or model.startswith("BSC00") or model.startswith("BSC10"):
             return (ssc,ssc,ssc),units
-        if model in ["TST101","KST101","MST602","K10CR1"] or model.startswith("BSC20"):
+        if model in ["TST101","KST101","MST602","K10CR1"] or model.startswith("BSC20") or model.startswith("SCC20"):
             vpr=53.68
             avr=204.94E-6
             return (ssc,ssc*vpr,ssc*vpr*avr),units