-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support the online correlator in the cli #263
Comments
Yes, there's a TyperDict class that we currently use, which allows dictionaries to be passed as With configs, these are also parsed as expected with nesting e.g.
I would image this is the most flexible thing to use, and means we don't pollute the options too much, but there may be other alternatives.
With a kwargs input as described above, is there anything we couldn't do, in general? The only immediate limitation I can think of is of the observables, which I think will be limited to named functions that we look up, as we've discussed previously, but in theory anything that the function takes should be generally passable through (potentially nested) kwargs, shouldn't it? |
We will have to limit to the named built-ins. It can all be done from parsing the kwargs there is no problem. Just this could lead to (powerful) but extremely long cli agrument inputs though e.g.
Looking at the cli examples most things are very simple, I suppose I'm asking is there any appetite for common shorthands? That could be fraught with difficulties so maybe it is best left verbose. But E.g. if someones wants the VAF for 5 ps there could be some special option Max correlation lag is of course all controllable from the parameters But looking at the cli examples most things are very simple, One thing that would help is perhaps sensible defaults for the parameters, which I assume can be done if the dict if partial, and also only needing to specify |
Is there an alternative? In theory I suppose you could create an interface for the observables that allows them to be passed via a tuple/list or something as well as their keywords, to simplify the input if you pass them in the correct order (along the lines of
I wrote the above before I read the rest of this... I think we can include shorthands/defaults where it makes sense, but I think at least for now they should be nested within Ideally I think we want to be able to control as much as possible, as generally we end up coming back to add it later if we don't immediately, but that doesn't mean they all always need to be specified. I think we also have to accept that this is inevitably more complicated than some other options, but yes defaults and shorthands might simplify some things. I tend to unpack the dicts when they go to their relevant Python function, so none of them ever have to be complete at the moment - they almost provide a way to update defaults. |
We can support requesting the built-in correlations from the cli, so that it is not just an interface for direct python users. I'll need to look into how this is done elsewhere in janus.
We could have user composeable correlations using dicts?
--correlate {a: stress_xy, b: stress_xy, blocks: 1, points: 10, ...}
which should be easily translatable.
Or even things simply like
--vaf
but that may clash with post-process?
Questions
The text was updated successfully, but these errors were encountered: