Plz1004wh pulse sequence feature#26
Conversation
11bc249 to
bec2370
Compare
bec2370 to
e69ebdf
Compare
emulated query response in _query_configure_sequence_effect was not correct misuse of itertools.repeat caused test_configure_pulse_sequence to not behave as expected
AnnaGiasson
left a comment
There was a problem hiding this comment.
Looks good, I see no issues with it.
I like the way you structured things, I feel like this should be good for stepped current waveforms, but might be a little annoying to use for ramping. You can always do it with a bit more logic outside the class though. Did you consider an implementation where you specify an array of currents and a fixed sample rate?
Also, learned itertools.batched is a thing; looks like it was added in 3.12. That's a nice one to remember, I've definitely had to implement that with slicing before.
|
Thanks!
With the fast load sequence for the Kik loads it is a fixed sample rate. Each step in the sequence has a current level and optional trigger pulse so that's the way I structured the sequence you feed into
I actually didn't realize itertools.batched was only added in 3.12 so that kind of kills earlier version compatibility. I'm fine with keeping it as is and making the min version 3.12 though if you are. |
Adds the ability to configure and trigger fast sequences for the
Kikusui_PLZ1004WHclass. I have been using this for a few months on the bench so most of the bugs have been resolved. Some improvements are still possible but I would like to allow colleagues to start using it without needing to switch to my fork.New Attributes
This is a simple dataclass that captures the properties of a sequence step, current and trigger in the case of the Kikusui fast sequence
SequenceStepNew Methods
Configure an arbitrary sequence of load current values
def configure_sequence(self,steps: list["Kikusui_PLZ1004WH.SequenceStep"], current_range: str = "HIGH", step_size: float = 1e-3, initialize: bool = True)Run a sequence that has been defined
def run_sequence(self)Configure a sequence of load current values that form a pulse
This is essentially a helper function that creates a pulse sequence then calls
configure_sequenceto send it to the loaddef configure_pulse_seqeunce(self, pulse_current: float, pulse_width: float, trig_delay: float, step_size: float = 1e-3, initial_idle_time: float = 10e-3, idle_current: float = 0.0, current_range: str = "HIGH", keep_load_on: bool = False)