Skip to content

Add support for Fianium - #18

Open
jacobfeder wants to merge 3 commits into
Dionne-Lab:mainfrom
jacobfeder:main
Open

Add support for Fianium#18
jacobfeder wants to merge 3 commits into
Dionne-Lab:mainfrom
jacobfeder:main

Conversation

@jacobfeder

Copy link
Copy Markdown

Add support for SuperK FIANIUM (S4x3) devices.
I've made the interface slightly different by adding a context manager, e.g.

with Fianium() as laser:
    laser.set_emission(True)

I think this is slightly nicer as it automatically handles disconnection. Let me know what you think!

Best,
Jacob

@Briley645

Copy link
Copy Markdown
Contributor

@jacobfeder Thanks for this contribution! It looks good and I like the with/as addressing method. Sorry for this delayed response. I graduated, and I guess my notifications aren't set up right for this project.

I haven't fully looked over this yet, but my understanding is the the Extreme and Fianium should basically be the same. I remember the NKT notation for these devices being a bit confusing. Actually, I believe my laser in grad school was technically a Fianium model. Wouldn't this additional class be redundant? Perhaps it would be better to modify the original Extreme class.

What I see on a first pass is that you have:
a) added a logger function
b) added the enter_ and exit methods which i guess enable with/as
c) added read/write wrappers over the registerRead/Write functions I had within each method
d) Moved some hidden properties i had buried within methods as class attributes.

I'm not sure I think c) is more intuitive than the original, but a, b, and d seem like nice improvements.

Did the Extreme class work with your setup? The register addresses seem to be identical, so I would have imagined that everything behaves normally.

Please let me know what you think about that. I'll look into this over the next week or two, but I'm thinking it may just be better to merge your context management into the existing Extreme class.

@jacobfeder

Copy link
Copy Markdown
Author

Hey @Briley645,
Congrats on graduating! Despite the naming, I think the Extreme and Fianium are different (there's some discussion of this in the API spec) and have slightly different register maps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants