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

just questions to understand some design-choices #22

Open
orgua opened this issue Feb 8, 2022 · 0 comments
Open

just questions to understand some design-choices #22

orgua opened this issue Feb 8, 2022 · 0 comments

Comments

@orgua
Copy link

orgua commented Feb 8, 2022

First: thanks for this elegant module! It works as expected. But I'm left with some questions while porting my scripts.

May I ask why the high-level comfort-functions like .apply_voltage are only accessible from the device-class (Keithley2600) and not from the smu-class (Keithley2600Base) that replicates the TSP-Syntax in python?
Well, for obvious reason there should be no name-collision. But apart from that?
The biggest drawback is that scripted measurement-functions for a job on one specific smu-channel always need two parameters (device- and smu-class) instead of just one (smu-class) only to use these two parameters always in combination for the high-level-functions (example A). the only alternative would be to not use the high-level-functions (example B). Both options complicate things more than they should.

Am I overseeing something here, apart from hacky solutions? Wouldn't something like example C be the most elegant solution?

example:

def calibrationA(keithley, smu):
    # ability to choose smu-channel and use high-level functions
    keithley.apply_voltage(smu, 5)
    return keithley.measure_current(smu)

def calibrationB(smu):
    # only low-level TSP-Syntax possible
    smu.source.levelv = 5
    smu.source.limiti = 0.1
    smu.source.autorangev = smu.AUTORANGE_ON
    smu.source.func = smu.OUTPUT_DCVOLTS
    value = smu.measure.i()
    smu.source.output = smu.OUTPUT_OFF
    return value

def calibrationC(smu):
    # possible solution with less code-overhead
    smu.apply_voltage(5)
    smu.source.limiti = 0.1
    return smu.measure_current()

My second concern is the high-level function .set_integration_time(). Why does someone want to set this in seconds and deal with unportable code that may cause aliasing-fragments, when setting the time to no multiple of the cycle-time? I understand that seconds are a universal SI-Unit, but there is a reason why the original parameter is "nplc", which is set to 1.
This implementation seems more harmful than helpful, doesn't it?

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

No branches or pull requests

1 participant