proc_utils/gom.py
def change_units(cc, lon, lat):
    """skimage functions extracts the contour but the paths are image indices
    and not (lon, lat)"""
    flon = interp1d(np.arange(0,len(lon)), lon)
    flat = interp1d(np.arange(0,len(lat)), lat)
    newcc = []
    for cci in cc:
        try:
            t = np.zeros(cci.shape)
            t[:,0] = flat(cci[:,0])
            t[:,1] = flon(cci[:,1])
            newcc.append(t)
        except Exception as e:
            print(F"Failed for {cci} error: {e}")
    return newcc
skimage functions extracts the contour but the paths are image indices
    and not (lon, lat)
skimage functions extracts the contour but the paths are image indices
and not (lon, lat)
skimage functions extracts the contour but the paths are image indices and not ( lon lat )
def change_units(cc, lon, lat):
    flon = interp1d(np.arange(0,len(lon)), lon)
    flat = interp1d(np.arange(0,len(lat)), lat)
    newcc = []
    for cci in cc:
        try:
            t = np.zeros(cci.shape)
            t[:,0] = flat(cci[:,0])
            t[:,1] = flon(cci[:,1])
            newcc.append(t)
        except Exception as e:
            print(F"Failed for {cci} error: {e}")
    return newcc
def change_units ( cc , lon , lat ) : flon = interp1d ( np . arange ( 0 , len ( lon ) ) , lon ) flat = interp1d ( np . arange ( 0 , len ( lat ) ) , lat ) newcc = [ ] for cci in cc : try : t = np . zeros ( cci . shape ) t [ : , 0 ] = flat ( cci [ : , 0 ] ) t [ : , 1 ] = flon ( cci [ : , 1 ] ) newcc . append ( t ) except Exception as e : print ( F"Failed for {cci} error: {e}" ) return newcc
skimage functions extracts the contour but the paths are image indices
and not (lon, lat)
skimage functions extracts the contour but the paths are image indices and not ( lon lat )
"""skimage functions extracts the contour but the paths are image indices
    and not (lon, lat)"""
cc
lon
lat