The source code for the Velocity Decomposition Algorithm (Yuen et.al ApJ 910, 161 2021).
We aim to separate the non-density similar fluctuations in spectroscopic channel maps. Therefore we developed a very simple similarity algorithm, supported by our paper with turbulence theory and MHD simulations, that the
The code allows you to compute the p_d
and p_v
based on the cross-correlation of two images p
and I
. By the definition of Eq.(20) of Yuen et.al (2021),
where <...> is the averaging operator. Notice that <p_d p_v> is mathematiclly guaranteed to be zero, regardless of what p and I it is.
For example, suppose we allow
I
to be a dog's figure from UC Berkerly (https://greatergood.berkeley.edu/article/item/the_science_backed_benefits_of_being_a_dog_owner).p
to be 0.5 * cat's figure that New York Times took (https://www.nytimes.com/2021/09/07/science/cat-stripes-genetics.html), and 0.5 of dog's figure
Below we trimmed these two figures so that they are in greyscale and have same dimensions. Here we show the p
and I
before our algorithm:
and the results of our algorithm
We have to remind our readers that, under our construction <p_d p_v> must be zero, no matter what p
and I
you are considering. Below shows no matter what fractions cats and dogs in your image
This is guaranteed by the mathematics, regardless of what p
and I
one is considering (see our latest response in https://github.com/kyuen2/kalberla_2022)