-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature: add "requested destination" or other save specs? #131
Comments
Sounds good to me! Maybe also an extra metadata dictionary to allow for downstream uses we can't conceive of now? Are you imagining these all as required arguments, or optional? |
everything optional. you should probably always be able to call |
ooh right because requested_destination is the name. Rather than something like "save_params" which would be it's own object |
yeah, for now, the writer (over in pymmcore-plus) would have all the parameters. This is just a bare-minimum sort of start. seq = MDASequence(requested_destination='...')
class MDARunner():
def run(self, events: MDASequence):
if seq.requested_destination:
for writer in self.writers: # these are the objects with as-of-yet undetermined parameters
writer.set_destination(seq.requested_destination) but... I dunno |
a little bit of an aside here: in a couple places you've given examples of how to work with many writers. Is that just a generality thing, or are their use cases im not thinking of for multiple writers? unless we think of something like the napari display as also being a writer |
yeah, good question. I can't see an immediate use case for multiple writers... but I do think that so far, the writer "spec" fits a general category of something that I can see multiple of: namely, anything that wants to be notified at the start, end, and each frame of an acquisition, let's call it a handler: class Handler:
def sequenceStarted(): ...
def frameReady(): ...
def sequenceFinished(): ... so, I'm kinda mentally leaving that possibility open :) |
Should we add something like
requested_destination
to MDASequence?I don't (immediately) want to add a whole lot of specific saving stuff, but a single field requesting a destination path might be very useful for possible downstream writers: It would provide a directory, base name, and extension. Writers could then increment that base name as desired (until any further spec added instructions on that sort of thing)
@ianhi ?
The text was updated successfully, but these errors were encountered: