Asda#
- class sunkit_image.asda.Asda(vx, vy, r=3, factor=1)[source]#
Bases:
object
Version 2.0 of Automated Swirl Detection Algorithm (ASDA).
References
Methods Summary
center_edge
([rmin, gamma_min])Find all swirls from
gamma1
, andgamma2
.Calculate
gamma1
andgamma2
values of velocity field vx and vy.gen_vel
(i, j)Given a point
[i, j]
, generate a velocity field which contains a region with a size of(2r+1) x (2r+1)
centered at[i, j]
from the original velocity fieldself.vx
andself.vy
.vortex_property
([image])Calculate expanding, rotational speed, equivalent radius and average intensity of given swirls.
Methods Documentation
- center_edge(rmin=4, gamma_min=0.89)[source]#
Find all swirls from
gamma1
, andgamma2
.- Parameters:
- Returns:
dict
– The keys and their meanings of the dictionary are:center
: Center locations of vortices, in the form of[x, y]
.edge
: Edge locations of vortices, in the form of[x, y]
.points
: All points within vortices, in the form of[x, y]
.peak
: Maximum/minimum gamma1 values in vortices.radius
: Equivalent radius of vortices. All results are in pixel coordinates.
- gamma_values()[source]#
Calculate
gamma1
andgamma2
values of velocity field vx and vy.- Returns:
tuple
– A tuple in form of(gamma1, gamma2)
, wheregamma1
is useful in finding vortex centers andgamma2
is useful in finding vortex edges.
- gen_vel(i, j)[source]#
Given a point
[i, j]
, generate a velocity field which contains a region with a size of(2r+1) x (2r+1)
centered at[i, j]
from the original velocity fieldself.vx
andself.vy
.- Parameters:
- Returns:
numpy.ndarray
– The first dimension is a velocity field which contains a region with a size of(2r+1) x (2r+1)
centered at[i, j]
from the original velocity fieldself.vx
andself.vy
. the second dimension is similar as the first dimension, but with the mean velocity field subtracted from the original velocity field.
- vortex_property(image=None)[source]#
Calculate expanding, rotational speed, equivalent radius and average intensity of given swirls.
- Parameters:
image (
numpy.ndarray
) – Has to have the same shape asself.vx
observational image, which will be used to calculate the average observational values of all swirls.- Returns:
tuple
– The returned tuple has four components, which are:ve
: expanding speed, in the same unit asself.vx
orself.vy
.vr
: rotational speed, in the same unit asself.vx
orself.vy
.vc
: velocity of the center, in the form of[vx, vy]
.ia
: average of the observational values within the vortices if the parameter image is given.