solarspatialtools.spatial.compute_vectors

solarspatialtools.spatial.compute_vectors(x, y, refpt)

Compute a list of vectors pointing from a reference origin to each site. Units will match those given by x, y, which means that ideally this function would be called with inputs in a rectilinear system such as UTM.

Parameters

xnumeric

An indexable array of x coordinates

ynumeric

An indexable array of y coordinates

refptnumeric

The reference position as a tuple (x, y) or other indexable pair

Returns

vectorsnumeric

An ordered list of vectors (x,y) from ref to each point in meters. If the input is a Pandas type, the output will be in a DataFrame with an index that matches the input and has columns ‘dx’ and ‘dy’.