# how to get phase in given bovl
```
from lics_unwrap import *
import framecare as fc
from scipy import ndimage
from geocube.api.core import make_geocube
import geopandas as gpd
tif='GEOC/20230129_20230210/20230129_20230210.bovldiff.geo.tif'
frame='021D_05266_252525'
bovlpha=load_tif2xr(tif)
bovlpha = bovlpha.where(bovlpha!=0) # to get rid of zero --now will be nan
aa = bovlpha.copy()
npa = aa.values
npa[npa==0] = np.nan
mask = ~np.isnan(npa)
conncomps, ncomp = ndimage.label(mask)
aa.values = conncomps
conncomps = aa #just for clarity
conncomps = conncomps.where(~np.isnan(bovlpha))
# the function below is too slow, will update it soon:
gpd_bursts = fc.frame2geopandas(frame, use_s1burst =True)
# TODO using your cell 1:
gpd_overlaps = get_burst_overlaps(gpd_bursts)
# make them rasters
g = gpd.GeoDataFrame(
{ 'bovl' : gpd_overlaps.index.values},
geometry=gpd_overlaps.geometry,
crs={"init": "epsg:4326"}
)
bovls = make_geocube(vector_data=g, like=aa.rio.set_spatial_dims(x_dim='lon',y_dim='lat'))
bovls=bovls.rename({'x':'lon', 'y':'lat'})
bovls.bovl.plot()
fc.plt.show()
# then just identify the corresponding pixels, e.g. for burst overlap id 0:
bovl_id=0 # see gpd_overlaps.index.values
bovl_conncomps = np.unique(conncomps.where(bovls.bovl==bovl_id).values)
bovl_conncomps = bovl_conncomps[~np.isnan(bovl_conncomps)] #remove nan
# and finally get the phase for this conncomp:
bovl_this = bovlpha.where(conncomps.isin(bovl_conncomps))
# you can check it:
bovl_this.plot()
```