1

I am simulating range-doppler maps for target detection in a radar. What I'm currently trying to accomplish is have multiple targets on one range doppler map. I tried messing with imshow's alpha argument, but it seems to blur/dim the entire image. Also, as I add more targets, the dots become harder to see, as shown below. Is there a way to modify the premade matplotlib colormaps (such as hot or cool) so that brighter points are kept while the darker background is faded, allowing you to see all bright points clearly? Target 1, Target 2, Both targets overlayed, Adding a third target

Here is where I am plotting the images (when I add the third target, I use an alpha of 0.2):

plt.imshow(dopplerMaps[0], cmap='hot', interpolation='nearest', extent=[rangeAxis[0], rangeAxis[len(yt[0])-1], dopplerAxis[len(YT)-1], dopplerAxis[0]], alpha=1.0)
plt.imshow(dopplerMaps[1], cmap='hot', interpolation='nearest', extent=[rangeAxis[0], rangeAxis[len(yt[0])-1], dopplerAxis[len(YT)-1], dopplerAxis[0]], alpha=0.5)
plt.show()

Is there a better way to do this? Thank you so much for anything! Edit: the array dopperMaps contains several magnitudes of fourier transforms calculated earlier, if that helps to understand the photos. Also, the axis arrays are just for setting the bound of the plot.

  • 4
    As I figured out you have three numpy arrays with target data. Did you try to mix arrays before plotting? If dark regions are zeros in your arrays, you can just calculate the sum of all three arrays and plot it in one plt.imshow – True do day Jun 03 '22 at 17:03
  • You could also try using a colormap that has alpha built-in. See this question for how to implement: https://stackoverflow.com/questions/37327308/add-alpha-to-an-existing-matplotlib-colormap – hume Jun 03 '22 at 20:39

0 Answers0