# Scatter estimation using 2 energy windows

**URL:** <https://pytomography.discourse.group/t/scatter-estimation-using-2-energy-windows/24>\
**Category:** Usage Questions\
**Created:** [March 18, 2024, 5:23am UTC](https://pytomography.discourse.group/t/scatter-estimation-using-2-energy-windows/24 "2024-03-18T05:23:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pearsonm](https://avatars.discourse-cdn.com/v4/letter/p/eb8c5e/32.png) [@pearsonm](https://pytomography.discourse.group/u/pearsonm)\
**Post date:** [March 18, 2024, 5:23am UTC](https://pytomography.discourse.group/t/scatter-estimation-using-2-energy-windows/24/1 "2024-03-18T05:23:02Z")

</div>

Hello,

I want to reconstruct files using Tc99m from a GE850 SPECT/CT with 2 energy windows:  
emission 126 - 155Kev  
scatter 114 - 126 Kev  
If I run the following line will the scatter tensor be correct?

> scatter = dicom.get\_scatter\_from\_TEW(file\_NM, index\_peak=0, index\_lower=1, index\_upper=1)

Mark

---

<div class="post-metadata">

**Author:** ![ludovic](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@ludovic](https://pytomography.discourse.group/u/ludovic)\
**Post date:** [March 20, 2024, 9:51am UTC](https://pytomography.discourse.group/t/scatter-estimation-using-2-energy-windows/24/2 "2024-03-20T09:51:37Z")

</div>

Hello,  
I am not 100% sure, but you won’t get the correct result. I would suggest creating a new file\_NM in which you stack an array filled with zeros (so you would get 3 different arrays) to feed the `get_scatter_from_TEW`method.  
Best regards  
Ludovic

---

<div class="post-metadata">

**Author:** ![jakopbsf](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jakopbsf](https://pytomography.discourse.group/u/jakopbsf)\
**Post date:** [April 18, 2024, 12:04am UTC](https://pytomography.discourse.group/t/scatter-estimation-using-2-energy-windows/24/3 "2024-04-18T00:04:54Z")

</div>

I also stumbled into this issue when I wanted to try and reconstruct a phantom with Tc99m.

Is this pseudo code something that can be used?

import pydicom

ds = pydicom.dcmread(‘SPECT projection we want to reconstruct’)

new\_upper\_scatter\_energy=0  
new\_lower\_scatter\_energy=0

ds.EnergyWindowInformationSequence[2].EnergyWindowUpperLimit = new\_upper\_scatter\_energy

ds.EnergyWindowInformationSequence[2].EnergyWindowUpperLimit = new\_lower\_scatter\_energy

I do get error message that “list index is out of range” . Any ideas on how to improve the code so that it’s possible to create a new energy window?  
Should I aim to use a DICOM tag in terms of numbers instead? For example 0054,0015.

Comments,ideas or suggestions are all welcomed.
