The Calling sequence is Make a mask phase_slope -> Calculate the phase gradient in range and azimuth and threshold on gradient value phase_mask -> Calculate a mask using the phase standard deviation, this calculation requires the phase slope Compute residues residue -> Compute the residues and create a flag file trees -> Connect the residues and modify a flag file corr_flag -> Modify the residues in the flag file using a correlation threshold, although this programs name implies that the interferometric correlation is used, currently ROI_PAC uses the mask generated by phase_mask. grass -> Unwrap the interferogram The flag file has a zero value for regions with no residues, and a non-zero value for regions with residues.