Custom Functions phase options: allow CFs to call any sequencer phase that a driver may have, rather than dictating when its main() phase executes. Or allow switching between these two types of behavior for simple data analysis versus detailed experiment-control use cases. I think this would also allow for multiple CFs to be used in a sequencer more seamlessly. In the past I have tried and failed to use one CF as the ‘brain’ and another CF as the ‘body’ to configure the experiments, and another CF as the data-acquisition loop. It didn’t work.
‘Verbose mode’ class methods: I use a function like below to print sweepme sequencer phases in most of my code. I manually edit the string to match the device and sequencer phase, i.e. ‘laser apply()’. It’d be nice if this was a more built-in, such that one could select ‘verbose mode’ in the driver GUI, and the device shortname and sequencer phase would print in the debug window.
def optional_print(self, string, activate=True):
#prints if verbose mode is called for, and includes optional activation boolean
if self.verbose_mode and activate:
print(string)
return
Histogram plotting option that also calculates mean and stdev and displays them on the plot.
Regarding No. 1, you can add any sequencer call function such as signin, configure, apply, … to your Custom Function. These will be executed at the corresponding sequencer step.
Oh, I didn’t know this. I don’t see anything about apply() being available for CFs in the wiki. Are there any limitations to what phases can be called from a CF?
All in all I think CFs should follow a syntax similar to the devices (loggers, switches etc), since it is easier to learn one style. I’m sure there are reasons not to do that, but as I bring a student up to speed on this project I find the differences between CFs and device drivers to be somewhat capricious. Not to mention the get-setGUIparameter() differences.
It would be more straightforward if CFs had no main() phase, and instead could just have function definitions for whatever phase you wanted them to be executed in, and as many of those as you wanted, i.e. transfer(), configure(), apply(), process().
@DJW Thanks for taking the time to write your ideas for new features.
Regarding CustomFunction I do not immediately see how we can improve it without making it too complex. Maybe, I would need to see your use case to better understand what you are looking for. In case you need to support with creating CustomFunction in general, please write us via email and maybe there is already a solution with the current system.
I added the verbose mode to the backlog. We are considering to use Pythons logging module in future where a user can also select different logging levels. I also like your idea that SweepMe! could print out each phase of a selected driver. As a driver has many possiblephases, we need to find a way to only show selected ones or used ones.
Histogram plot was already in the backlog, but there are quite a lot of other items piling up that are similar or more important right now. It should be possible to use CF to create a custom histogram widget on your own where you are free to handover data:
We are happy about your feedback. Still, it can take some time to process these backlog items. Sometimes we can process them earlier if they fit in with a current customer project. Please contact us if you need a feature immediately or if you need support with the software.