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

Refactor ASI Stages #868

Open
AdvancedImagingUTSW opened this issue Apr 26, 2024 · 2 comments
Open

Refactor ASI Stages #868

AdvancedImagingUTSW opened this issue Apr 26, 2024 · 2 comments
Labels
refactoring Improving existing code by either reduction, readability, ease of use or some combination

Comments

@AdvancedImagingUTSW
Copy link
Collaborator

AdvancedImagingUTSW commented Apr 26, 2024

I think it may be time to adopt a similar strategy for our ASI stages as we have done with our Hamamatsu cameras. Currently, there is a fair amount of code duplication.

I would propose that we consolidate all of the stage_asi_... classes into a single file, stage_asi. We should create a ASIStage(StageBase) class that provides the vast majority of the functionality. Then, TigerController(ASIStage), MS2000(ASIStage), and MFC2000(ASIStage) classes that implement the minor differences between their command protocols.

Some similar strategy should also be done with the APIs.

@AdvancedImagingUTSW AdvancedImagingUTSW added the refactoring Improving existing code by either reduction, readability, ease of use or some combination label Apr 26, 2024
@AdvancedImagingUTSW
Copy link
Collaborator Author

It also doesn't seem like the MS2000 and the MFC2000 classes should be permitted to operate as a shared device.

@AdvancedImagingUTSW
Copy link
Collaborator Author

The build_ASI_Stage_connection(com_port, baud_rate=115200) method should also be abstracted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Improving existing code by either reduction, readability, ease of use or some combination
Projects
None yet
Development

No branches or pull requests

1 participant