# Weighting between radars

**URL:** <https://openradar.discourse.group/t/weighting-between-radars/661>\
**Category:** Python\
**Created:** [November 28, 2025, 4:24am UTC](https://openradar.discourse.group/t/weighting-between-radars/661 "2025-11-28T04:24:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SunnysChan](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/sunnyschan/32/421_2.png) [@SunnysChan](https://openradar.discourse.group/u/SunnysChan)\
**Post date:** [November 28, 2025, 4:24am UTC](https://openradar.discourse.group/t/weighting-between-radars/661/1 "2025-11-28T04:24:37Z")

</div>

I faced the same issues when retrieving winds from multiple lidars:

> [@PyDDA with more than 2 radars](https://openradar.discourse.group/t/pydda-with-more-than-2-radars/376):
>
> Hi, When PyDDA retrieves winds with more than 2 radars does it only conduct the retrieval over regions where all of the radars overlap? I have a case with data from 6 radars. I am finding that the region where winds are retrieved is smaller when all 6 radars are included compared to when only 2 or 3 radars are included. Is there a way to run PyDDA so that winds are retrieved wherever at least 2 radars overlap at the correct angles? Thanks

> [@Radar Grid Weighting - PyDDA](https://openradar.discourse.group/t/radar-grid-weighting-pydda/274/2):
>
> Hello! An issue was raised on the GitHub page regarding your very problem just last month. I’ve cut a new release of PyDDA to 1.3.0 that fixes this issue, among others. For more information, see here: Much regards, Bobby

so I write my own weightings, and while looking up the source code in order to write my own ones as close as the original one as possible. I noticed a line in \_get\_dd\_wind\_field\_scipy:

```auto
cur_array = parameters.weights[i, k]

```

maybe the culprit. It seems cur\_array in fact references parameters.weights instead of copying a new array. Therefore, the changes to cur\_array in the following lines will go into parameters.weights. Thus, the last line

```auto
parameters.weights[i, k] += cur_array

```

may not accumulate the weightings when j loops through other radars, as parameters.weights is over-written whenever j changes, until the last radar on the list.

I have played around with the order of the radar list, and the results suggested the last radar took a special place in determining the coverage of final results. I have replicated the weighting calculation part as far as I need to write my own weightings, and the final result seems reasonable.

However, I am not good at Python after all, could anyone confirm my thoughts? Thx.

---

<div class="post-metadata">

**Author:** ![rcjackson](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/rcjackson/32/14_2.png) [@rcjackson](https://openradar.discourse.group/u/rcjackson)\
**Post date:** [November 28, 2025, 1:52pm UTC](https://openradar.discourse.group/t/weighting-between-radars/661/2 "2025-11-28T13:52:03Z")

</div>

@SunnysChan you are probably right. This would be an easy fix to replace the cur\_array = parameters.weights[i, k] line with cur\_array = parameters.weights[i, k].copy().

If you don’t mind, could you please raise an issue on the GitHub page and submit your fix as a PR?

---

<div class="post-metadata">

**Author:** ![SunnysChan](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/sunnyschan/32/421_2.png) [@SunnysChan](https://openradar.discourse.group/u/SunnysChan)\
**Post date:** [December 1, 2025, 1:52am UTC](https://openradar.discourse.group/t/weighting-between-radars/661/3 "2025-12-01T01:52:37Z")

</div>

No problem. I will try to figure out how to do that. This is the first time I submit a PR.
