Why export unwraped phase as .tif file without incident -angle tie-point grids

hello, everyone!
I exported the unwrapped phase (as shown in below figure) as a .tif file: subset_1_of_S1A_IW_SLC__1SDV_20201030T050502_20201030T050529_035021_0415DC_084C_UNW_Orb_Stack_ifg_deb_flt.tif

But when I import the .tif file to SNAP, there are not incident _angle in tie-point grids.

This will cause a problem when i do the following steps:

So, how do I when I export unwraped phase to a .tif file including the all tie-point grids( especically incident_angle)? Thanks you very much!

why did you export as a tif file?

I‘d like to ’export the unwrapped phase for processing( i can read .tif file in MatLab) and then import it (the revised .tif) into snap for subsequent processing.

exporting to tif makes you lose all metadata required for SAR processing.
Why don’t you directly use the img file in Matlab? It’s inside the .data folder.

how does it look in SNAP? Please first try the regular snaphu import and visually check if the result is alright.
Any conversion between formats will potentially bring more error sources.

shouldn’t the precision in the reader by “float” instead of “single”?

it looks like only full numbers are displayed by the colors -2 -1 0 1 2 3

Thank you very much! The ‘machinefmt’ should be ‘b’, not ‘n’. Thank your help and prompt reply again.

very good!
Can you please post the full command to load img phase raster data into Matlab in case users have a similar problem in the future?

%%  load .img file in Matlab
fid = fopen('Unw_Phase_ifg_30Oct2020_11Nov2020.img','r+');
test_data = fread(fid,[10066,7938],'float','b'); %%  [10066,7938]is the 2D pixel size of the image.
unwrap_phase = test_data.'; %% Matrix transpose, in order to make the image consistent with the display in SNAP.
1 Like