your CONFIG which changed the PATH variable looks good. But you have to call your terminal from the folder which contains your StaMPS export from SNAP. You can open a terminal there or you have to go there and than, call mt_prep_gamma_snap. It seems to me you try to call mt_prep_gamma_snap from your /home/user/…
Please open a terminal (if you follow the steps below, it does not matter where you open it), execute the following steps precisely, line by line and post a screenshot of your results:
whereis matlab snaphu triangle csh
mt_prep_gamma_snap 20170405 /home/fyp/Documents/INSAR_201170405/ 0.4
If your installations of StaMPS, Matlab and csh are ok and the mt_prep_gamma_snap script was pasted to …/bin and flag (chmod) was set correctly, this has to work on your machine.
What I have noticed: You do not need to chmod (set flag for mt_prep_gamma_snap) each time you want to use it. After you have copy-pasted it to …/bin you have to set the flag once and that is it.
Concerning matlab, you need it…in line 131 of mt_prep_gamma_snap Matlab will be called.
Ok, I think that will help you to figure out how to run the script.
Oh now there is something that comes to my mind. Please try all steps without changing the matlab script ps_load_initial_gamma.m use the “old” one! Good Luck