watex.utils.funcutils.fit_ll#
- watex.utils.funcutils.fit_ll(ediObjs, by='index', method='strict', distance='cartesian')[source]#
Fit EDI by location and reorganize EDI according to the site longitude and latitude coordinates.
EDIs data are mostly reading in an alphabetically order, so the reoganization
according to the location(longitude and latitude) is usefull for distance betwen site computing with a right position at each site.
- Parameters:
ediObjs (watex.edi.Edi_Collection) – list of EDI object, composed of a collection of watex.edi.Edi or pycsamt.core.edi.Edi or mtpy.core.edi objects
by (str) – [‘name’|’ll’|’distance’|’index’|’name’|’dataid’] The kind to sorting EDI files. Default uses the position number included in the EDI-files name.
method (str) – [‘strict|’naive’]. Kind of method to sort the EDI file from longitude, latitude. Default is
strict.distance (str) – [‘cartesian’|’harvesine’]. Use the distance between coordinates points to sort EDI files. Default is
cartesiandistance.
- Returns:
array splitted into ediObjs and Edifiles basenames
- Rtyple:
tuple
- Example:
>>> import numpy as np >>> from watex.methods.em import EM >>> from watex.utils.funcutils import fit_ll >>> edipath ='data/edi_ss' >>> cediObjs = EM().fit (edipath) >>> ediObjs = np.random.permutation(cediObjs.ediObjs) # shuffle the ... # the collection of ediObjs >>> ediObjs, ediObjbname = fit_by_ll(ediObjs) ...