solarspatialtools.spatial.project_vectors
- solarspatialtools.spatial.project_vectors(vectors, dir_vector)
Convert a set of vectors into a list of distances in a given direction. See also: compute_vectors for computing the vector array. Units will match those provided for the input vectors. Should probably be done in a rectilinear system like UTM.
Parameters
- vectorsnumeric
iterable set of vectors pointing from a reference to sites of interest.
- dir_vectornumeric
tuple of (x, y) showing the cartesian direction that the vectors should be projected onto. Length of vector greater than 1 will be ignored (i.e. will be converted to unit vector as the projection is done).
Returns
- dot_positionsnumeric
The dot product of each vector with the projection vector. Essentially represents the length of each vector in the given directions, with negative numbers implying opposite pointing. If the input is a Pandas type, the output will be in a DataFrame with an index that matches the input and has columns ‘dist’.