Open raacampbell opened 6 years ago
If "Subtract Offset" is ticked then the file is saved with the offset subtracted. So this is most likely bad and we don't want this.
BakingTray now enables the offset auto read each time it is armed.
How about we don't add it as an option? If we see problems and we need it sometimes then we make the option. The fewer options the better.
@ablot is this done?
Currently, scanimage offset of the first tiff file is used by tileLoad
when open the data but preProcessTile
still generates the tileStats
with the GMM fit of dim tiles. This value is used only by calcAverageMatFiles
but that means that the offset of the average is different from that of the data.
I'm currently testing if using scanimage for everything solves my problem.
Update: The problem of bright average with RR brains is solved by using scanimage offset everywhere.
My current quick fix just writes in tileStats
two offset: offset GMM that is never used and an offset from scanimage which is the exact same value for every single frame. calcAverageMatFiles
uses this scanimage offset. Then tileLoad
always re-read scanimage offset from disk. That's obviously all cumbersome and stupid.
What do you want to do @raacampbell ? Should we keep on using the first scanimage offset? Should we not use SI but calculate one offset on the whole dataset somehow? Or do we really need something tracking offset during acquisition (so a non-constant offset)?
Plan: save offsets in section average files. ScanImage offset, GMM, or whatever. Don't apply to average. Then on collation store the median values (or even all the values for completeness). Apply on the fly on tileLoad
. I will do this at some point.
I suggest we continue to calculate the offset for the moment, in case the ScanImage value is for reason problematic. In the mean time I will do the following:
tileLoad
use either the single value inscanSettings.mat
or the value from each tile (the user will select). We will default to thescanSettings.mat
value to have a single value for all recordings.