In visual_behavior.ophys.response_analysis.cell_metrics one metric that is computed is the fano factor. I believe this metric is being incorrectly computed.
Technically, fano factor is used for positive valued responses, so the fact that the mean response is sometimes negative is a bit hard to deal with, but I think the use of np.abs() is probably ok.
In
visual_behavior.ophys.response_analysis.cell_metrics
one metric that is computed is the fano factor. I believe this metric is being incorrectly computed.The code is defined here: https://github.com/AllenInstitute/visual_behavior_analysis/blob/master/visual_behavior/ophys/response_analysis/cell_metrics.py#L211
However the fano factor is defined as the ratio of the variance to the mean (https://en.wikipedia.org/wiki/Fano_factor), so this code should be:
Technically, fano factor is used for positive valued responses, so the fact that the mean response is sometimes negative is a bit hard to deal with, but I think the use of np.abs() is probably ok.