Hello, there are a few things I noticed:
The mt_prep… scripts you are talking about, are they located in the bin folder of your StaMPS installation? I can see them in the main folder of the installation on your screenshot? Are these copies?
I would not recommend changing the WORKDIR in mt_prep_gamma_snap but to be very precise in editing the StaMPS_CONFIG.bash. WORKDIR is set by $cwd and should not be overwritten, to pass the …/StaMPS_v3.3b1/bin path to it does not make sense to me, because the script is looking for a file system containing data, which is INSAR_20170405 in your case and not a folder containing itself which is …/bin.
But it is true that setting WORKDIR with $cwd (which looks like a change) instead of $pwd (which would just print the path) is somehow confusing…but in this case both do the same. WORKDIR is set to the path where your 4 exported folders should be. To do so you open the terminal in INSAR_20170405 and call mt_prep_gamma_snap with its parameters and it will work, because of the configuration before, the bin folder, containing the script is on your PATH variable and therefore mt_prep_gamma_snap will be found even if you are not in the bin folder…that is the trick ;). You should not call the script in a terminal, which was opened in the …/bin folder, because it does not know what to do next… I think that is what you are trying to do.
Maybe you will find some useful information here, I uploaded a summary which includes a detailed description of the step you are doing right now.
- check your StaMPS_CONFIG.bash
- delete your edited mt_prep_gamma_snap
- download the unchanged version again, copy paste it to the bin folder by following the steps in the mentioned description.
I think this will work