Closed landoskape closed 5 months ago
Should I update the load_and_stitch_tiffs
method within the suite2p folder too? I don't know when this one is used...
Should I update the
load_and_stitch_tiffs
method within the suite2p folder too? I don't know when this one is used...* suite2p / io / lbm.py
No, this is legacy code that will be removed soon.
Thanks for the update! I am not going to merge this right now since there are probably a few more changes required in other parts. Once you are able to run an example tiff file through all the steps I'll merge
Sounds good, I'll let you know when I've tested it on my data.
@alihaydaroglu, in init_pass
there is a code block that I think is exclusively related to stitching ROIs together in LBM.
This is it, found here in the code:
job.log("Estimating fusing shifts")
__, xs = lbmio.load_and_stitch_full_tif_mp(init_tifs[0], channels=n.arange(1), get_roi_start_pix=True)
fuse_shifts, fuse_ccs = utils.get_fusing_shifts(im3d_raw, xs)
fuse_shift = int(n.round(fuse_shifts.mean()))
if job.params.get('fuse_shift_override', None) is not None:
fuse_shift = int(job.params['fuse_shift_override'])
job.log("Overriding", 2)
job.log("Using best fuse shift of %d" % fuse_shift)
job.log("Building ops file")
# return
Then fuse_shifts
is used again here:
init_mov, xpad, ypad, new_xs, og_xs = utils.pad_and_fuse(init_mov, plane_shifts=tvecs, fuse_shift=fuse_shift, xs=xs)
I'm not sure how of these sections I need for non-LBM data. Can you advise how I should edit this section?
I think I tried to fix this in the latest commit in my dev branch: https://github.com/alihaydaroglu/s2p-lbm/commit/0edac702d3176f0c1830c65506059e70dcd907fe
If you set the paremeter fuse_strips to False it should skip that part
Yep, made it through that section now. Thanks!
I suppose the params['subtract_crosstalk']
section is also unnecessary for non-LBM data?
Yep, that should be false
@landoskape is this a branch you use? how do you load your data in?
I have been working from a branch on my fork called landoskape/standard-2p-pipeline. I'm still getting things working there (refactors had to be addressed after my previous work). I can move this to a branch on your main fork if you'd prefer, let me know
Ah ok, totally up to you where you keep the fork, I'd appreciate if eventually when things work you can create a PR to merge those back into main
* no rush
From: Andrew Landau @.> Sent: Tuesday, June 25, 2024 4:20 PM To: alihaydaroglu/suite3d @.> Cc: Haydaroglu, Ali @.>; State change @.> Subject: Re: [alihaydaroglu/suite3d] Support for non lbm data loading (PR #41)
⚠ Caution: External sender
I have been working from a branch on my fork called landoskape/standard-2p-pipeline. I'm still getting things working there (refactors had to be addressed after my previous work). I can move this to a branch on your main fork if you'd prefer, let me know
— Reply to this email directly, view it on GitHubhttps://github.com/alihaydaroglu/suite3d/pull/41#issuecomment-2189243774, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADSYD3X636B72XLVFSTCLZLZJGDCXAVCNFSM6AAAAABJYX25IOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBZGI2DGNZXGQ. You are receiving this because you modified the open/close state.Message ID: @.***>
Main changes
Added a new method in lbmio called
load_and_stitch_tifs_notLBM
that loads tiff files from standard scanimage outputs.The main
load_and_stitch_tiffs
method has a few extra input arguments, and if it seeslbm=False
, it'll return the output of the new method.The default_parameters now include this
lbm
,num_colors
, andfunctional_color_channel
.Smaller updates
I had to add these extra inputs a few places so that it uses the right loading method. Including:
But I ignored adding those parameters here because it seems like this is never used