Bugfix to kinesis.py when using ThorLabs HDR50/M rotation stage with BSC201 controller #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
UserWarningto be printed:model number SCC201 doesn't match the device ID prefix 40((BSC101|SSC20.)).UserWarningis printed:can't recognize motor model SCC201; setting all scales to internal units. This causes all scales to be set to internal units(1,1,1), so the stage cannot be rotated in units ofdegas intended.Debugging
SCC201(note the double C), which does not match anything inkinesis.py.BSC201, which is also not listed as an available match.40which means the model number is compared with(BSC101|SSC20.)as a regex expression by the function_model_match(). This function returnsFalse, causingget_device_info()to print a warning.Solution
BSC201andSCC201as search patterns, and include theSCC20pattern when attempting to set the scale correctly.KinesisMotor._scalevalues are(75093.25279758392, 4031005.8101743045, 826.1143307371219). This matches the values from the APT User Manual (search for "HDR50")(75091, 4030885, 826)divided by0.99997 deg(normalisation).