Skip to content

Dev#72

Open
ablot wants to merge 53 commits intomainfrom
dev
Open

Dev#72
ablot wants to merge 53 commits intomainfrom
dev

Conversation

@ablot
Copy link
Copy Markdown
Member

@ablot ablot commented Jan 26, 2026

v2.0.4

Main changes

  • Overwrite neurons_df if it has the wrong number of ROI

Bugfix

  • Fix synchronization issue if FrameLog start after frame 0

Minor

  • Clearer error message in sync when failing to find datasets
  • Option to load_session without returning the neurons_df (useful before it's created)

Before bugfix:
image

After:
image

Antonin Blot added 7 commits January 26, 2026 17:25
For now just to test other way to organise the pipeline. The aim is future versions to raise deprecationerror when calling like that and instead save all separate ressults in sesparte files
find_monitor_frames returns row index of the frame_log, when we merge on the FrameIndex it fails if FrameIndex.iloc[0] != 0
Switch to use index so that we can start recording frame after initial bonsai setup
@ablot ablot requested a review from yiran25 January 26, 2026 18:18
Antonin Blot and others added 20 commits January 26, 2026 19:32
The useful function should be integrated in a lab repo
All filters of ROI should work on traces, since traces must come from an but not the other way round as we can have multiple way to extract from one ROI.

Separate in pipeline and use ASt only on traces (which is used in most downstream functions)
If we still have these warnings, we need to solve them. Not ignore
Add option to manually specify the rs/of bins, to provide extent and to provide the tick_dict. All these are supposed to be automatically
calculated from log_range but it makes it hard to handle treadmill data where the bins should not be square.
Force array copy and conversion to float to please pandas 3
- specify bins for treadmill/closed loop plot
- use_full_range for RS_OF_matrix
Code and notebook that were used to generate the deth across days presentation
Also save intermediate dataframe with different names to avoid overwriting neurons_df
Trying to clear warnings to make everything compatible with pandas3. The conversion from bool to float to bool with the shift + fillna was messy. Shift already has a fill_value argument, use that instead
The index of neurons df should be range(nrois). If not we crash at multiple place. It seemed to have been the value of the mask id for some neurons_df (so 1 based).
Check and force redo if it is.
To allow masking some of the coefs (the one where there is no stimulus)
Also swithc default std to 6 to match paper
It was used to save a copy of neurons_df just after depth fit for safety (in case of erasure when running treadmill)
It should never happens, if it does there was a failed merge at some point and we should crash to debug and fix
If ROI 0 is all NaN, use_idx was full of False.
Antonin Blot and others added 23 commits April 14, 2026 19:03
The function needed to be explicitely given the correct coef, leading to mixture of multi and single depth if badly called.
Streamline and force using proper suffix

Also add docstrings to undocumented functions
At some places we have a reference in or out of the dataframe, copy to isolate
…atasets and plot_treadmill_vs_closedloop_matrix
When plotting OF trace outside of the stim period we need to create an array of NaN as OF is not defined.
The fit are in log, negative OF is bad. It shouldn't really happen as we filter
for positive RS, but with treadmill recording some big negative RS spikes
can induces negative OF at the next frame, when RS is back to positive
Option to specify axes instead of making a new figure
On sphere, same as treadmill
Antonin Blot added 3 commits April 17, 2026 15:52
- add export_onix_to_si
- change step order for ephys pipeline
- increase resources for ephys pipeline
- Replaced positional `.iloc[roi]` with safer label-based `.loc[neurons_df.roi == roi]` matching in `plot_RS_OF_fit` to prevent out-of-bounds or shifted index errors when passing filtered dataframes.
- Removed redundant `extent` argument from `plot_RS_OF_matrix` and `plot_RS_OF_fit`. The functions now consistently autocalculate mathematical extents natively from the bins (`rs_bins`/`of_bins`).
- Added  helper plotting methods (`set_rsof_ticks`, `add_rsof_colorbar`, `get_RS_OF_heatmap_axis_ticks`) to reduce code duplication
- Added missing documentation parameters for `plot_RS_OF_matrix` and expanded schema configurations for `tick_dict` and `log_range`.
plot_RS_OF_matrix can return the plotted matrix
plot_RS_OF_fit can add a mask to illustrate part with data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants