Levin-Lab-BCH / erp_analysis

0 stars 1 forks source link

refactoring batch_erp_plot_traces_by_cond #2

Open ybraverman opened 1 year ago

ybraverman commented 1 year ago

There are currently 3 versions of "batch_erp_plot_traces_by_cond" in the GP folder.

It looks like the differences between these 3 versions (apart from changes in figure titles) is that they compute the tactile suppression in different ways.

Original version seems to do both/(index + middle) and takes log2 of that. _2 version - uses a movemean approach:
sm_grp_im = movmean(grp_im,n_pts,2); sm_grp_im_b = movmean(grp_im-grp_both,n_pts,2); grp_rtio = sm_grp_im_b ./ sm_grp_im; _2 version also has an unused function "derive" _3 version - uses a percent change approach - and also has a support function "norm_b_by_im" which isn't being used except in a commented line in the code

If each of these are valid ways we would interpret the TSS findings moving forward (or that we'd stick with the original version but provide support to compute it the other ways) could you:

  1. Define a function in the helper folder that's something like "compute_TSS_by_method(method)" that takes in an input of 1-3 which refer to the above options
  2. Archive versions 2 and 3
ybraverman commented 1 year ago

From Gerardo: Either copy version used to calculate suppression from two additional scripts in a comment or different function so we can get rid of other ones - don't know which version

For valid methods: INSAR used percent change approach, but recently started experimenting with log2 version which is used in other paper and might be what we use moving forward