-
Notifications
You must be signed in to change notification settings - Fork 46
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
Recording rework #176
base: dev
Are you sure you want to change the base?
Recording rework #176
Conversation
- moved `SaveMode` - moved `SaveFormat` This is part of a refactoring work of the manager.
- possibility to return a list of frame IDs as an union
- now inherits from `SignalInterface` - added method for unpacking data chunks to evaluate missing frames
- automatically made at startup
- now passing the `detectorManager` reference directly
- `imageProcessing`: dictionary for storing image processing algorithms - for metadata storage - note: this may change - `dtype`: detector data type - default value: `uint16` - `frameInterval` time difference between acquired frames - reference unit: microseconds - default value: 1000
- UNTESTED!
- Using multiple workers, one for each detector
@jonatanalvelid could this rework be cause of problems in case one would use different detectors but maybe they're synchronized with some scanners? @kasasxav I tried replicating as close as possible your original work so to maintain a resemblance of retro-compatibility but I could not understand how you handle the case where the |
Hey, Yes, so ImSwitch has three modules so far: imcontrol, imreconstruct, imscripting. Another option is to both save in files and RAM, and the benefit is that you will still have the raw data stored in your disk but you don't need to load it again for reconstruction, you'll have it directly in the reconstruction module. |
@jacopoabramo As far as I can see (with my still limited overview of the |
- removed connections to `thread.returned`; redundant - changed `HDF5Storer` to respect expected unit test behavior - removed `_updateMemoryListings` method
So... I think that I managed to solve the issues with the failing unit tests. I have to make some more changes (especially in relation to the Zarr storage, which is just missing). My question though is: why the hell is it taking so much time to run the @kasasxav was there a particular reason to add the timeout to the unit tests? Or it's not mandatory? |
Hi Jacopo, I don't remember sorry :( I would say you can remove it. Amazing work btw <3 |
Ah sorry, I checked but I didn't answer. I agree with you, it seems that it's only saving in RAM because of the attribute and then it tries to read from the hdf5! Weird. It's strange becuase these tests were passing at some point so I don't understand how. |
- the new `RecordingManager` takes a lot of time to respect unit tests. - removing the timeout does the job - not really a solution
So the testing for Windows and macOS went in timeout. I'm thinking that this rework doesn't work well with the unit testing but I really don't know how to fix it. I'll keep the PR open, maybe somebody can give me some suggestions. |
- inheriting from `QRunnable`; - usable for one-shot concurrent tasks; - executed in the `RunnablePool` threadpool.
- now inherits from `Runnable`; - moved signals to separate class `StorerSignals`; - this is due to inheritance problems with the `QRunnable` class; - moved to separate folder `storers`; - implemented `HDF5StorerManager`; - implemented `TIFFStorerManager`; - implemented `ZarrStorerManager`; - `stream` still missing;
- storer classes moved to separate folder; - added a `runnablePool` object for a local threadpool; - now threads are automatically dispatched from it; - refactored the `snap` function
- for unit-testing
- reduced recording test time to 1 sec; - tests were failing due to high frame interval;
New attempt to make the tests pass, and learned a couple of things (at least at unit-test level):
|
|
An attempt to rework the
RecordingManager
, also mentioned in #171:Storer
base class fromabc.ABC
toSignalInterface
stream
method toHDF5Storer
andTiffStorer
BytesIOStorer
class to keep the possibility to store data in RAM for reconstructionRecordingManager
StreamingWorker
thread, which is a napari wrapper over theQRunnable
class, is spawned