# Calculating CSD

**URL:** <https://community.brain-map.org/t/calculating-csd/2724>\
**Category:** General\
**Created:** [November 24, 2023, 10:47pm UTC](https://community.brain-map.org/t/calculating-csd/2724 "2023-11-24T22:47:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paxpoggi](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@paxpoggi](https://community.brain-map.org/u/paxpoggi)\
**Post date:** [November 24, 2023, 10:47pm UTC](https://community.brain-map.org/t/calculating-csd/2724/1 "2023-11-24T22:47:56Z")

</div>

Hi, I am trying to calculate CSD data for all presentation types based on the LFP data. I am having trouble figuring out how to align the lfp channels based on their vertical and horizontal positions because there are 1/4th as many lfp channels as labeled electrodes in the channels.csv file. As a result, I am not sure which LFP channels correspond to the original channels. Any help to do this would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![paxpoggi](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@paxpoggi](https://community.brain-map.org/u/paxpoggi)\
**Post date:** [November 29, 2023, 7:01pm UTC](https://community.brain-map.org/t/calculating-csd/2724/2 "2023-11-29T19:01:13Z")

</div>

Issue resolved, mapped the vertical position from the channels.csv as a coordinate in the lfp xarray from the corresponding probe ids.
