AllenNeuralDynamics / thalamus-merfish-analysis

Code Ocean capsule for sharing analysis of thalamus MERFISH data
MIT License
2 stars 1 forks source link

refactor ccf_plots #1

Open tmchartrand opened 7 months ago

tmchartrand commented 7 months ago
meghanaturner commented 7 months ago

I'm working off of the ccf_plots_refactor_mt branch

meghanaturner commented 7 months ago

reminder to self: as I adjust function names, need to Find+Replace all instances in notebooks. Same for argument changes, but that will take more legwork to update across all notebooks

meghanaturner commented 7 months ago

Progress as of today, commit 12cf04e97e8bc3fa7d14788c1c5528f359715a7d on branch ccf_plots_refactor_mt

meghanaturner commented 7 months ago

Next steps for modularizing to increase shared code amongst plot_xxxx functions:

meghanaturner commented 6 months ago

as I'm cleaning up the "view_XXX" notebooks, I've noted that the custom_xy_lims parameter in most ccf_plots functions will likely not be useful for generating new custom plots once we split thalamus_merfish_analysis modules off into their own package because it requires a user to know the exact xy positions of the feature you'd like to highlight BUT we've shut off the axes via _format_image_axes() so you can't see that info

I was getting around this by manually commenting out the lines that turned off the axes, but that won't be an option when it's an installed

I see a few options, I'd lean towards (1) but as a "nice-to-have" before release:

  1. Add another user parameter, show_axes={default=False, True}, to all top-level plotting functions that is passed through to _format_image_axes() to allow users to turn the axes back on. Once they have their bounding box, they can turn it back off to make their figures look pretty again
  2. Have a set of pre-calculated bounding boxes for each nucleus (set of nuclei? this could get big quickly ...) and have a parameter that allows a user to specify zooming in on a particular nucleus for their plot
  3. Ignore this issue, rendering custom_xy_lims usable only if you know what you want to plot or via guesswork on the lims, which will likely limit use cases to internal power users
meghanaturner commented 6 months ago

Before release, we should switch the default values of the following parameters to reflect the ABC Atlas standard column names:

Right now, each view_xxx demo notebook has to include 1-2 extra cells at the top of the notebook to set those variables and then we have to explicitly specify them in each and every plotting function call.

Would be helpful to be able to clean that all up.