PSI using SNAP-STaMPS workflow in Windows Subsystem for Linux (WSL)

Thanks a lot. I will sort this out.

Same error


and here’s my config file

a screenshot for the .bashrc would be nice. I have typed what you have said into a new line inside the file but still getting the mt_prep_snap: command not found message. This is my .bashrc file

Just add it like this,

export PATH=/home/shadi/StamPS/bin:$PATH
source .bashrc

then check the mt_prep_snap command.

I know we have little knowledge about linux environment and I apologize for asking seemingly basic questions.

Alright, unfortunately I am still getting the same message upon mt_prep_snap command, also, this happened in Terminal after editing the .bashcr file looks like the file was damaged somehow because it was properly sourced and terminal was working fine upon every login.
i have recreated a new .bashrc file but terminal still opens completely blank and when I open it from a certain directory, this message appears


Edit, I have deleted the last 2 newly added lines in .bashrc and terminal is restored and working fine. So, there seems to be something missing in .bashrc that should be added with
export PATH=/home/shadi/StamPS/bin:$PATH
source .bashrc
in order to run mt_prep_snap command without corrupting Terminal’s source. here’s what’s in .bashrc file before the addition of the 2 previously mentioned lines at the very bottom

~/.bashrc: executed by bash(1) for non-login shells.

see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)

for examples

If not running interactively, don’t do anything

case $- in
i) ;;
*) return;;
esac

don’t put duplicate lines or lines starting with space in the history.

See bash(1) for more options

HISTCONTROL=ignoreboth

append to the history file, don’t overwrite it

shopt -s histappend

for setting history length see HISTSIZE and HISTFILESIZE in bash(1)

HISTSIZE=1000
HISTFILESIZE=2000

check the window size after each command and, if necessary,

update the values of LINES and COLUMNS.

shopt -s checkwinsize

If set, the pattern “**” used in a pathname expansion context will

match all files and zero or more directories and subdirectories.

#shopt -s globstar

make less more friendly for non-text input files, see lesspipe(1)

[ -x /usr/bin/lesspipe ] && eval “$(SHELL=/bin/sh lesspipe)”

set variable identifying the chroot you work in (used in the prompt below)

if [ -z "{debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=(cat /etc/debian_chroot)
fi

set a fancy prompt (non-color, unless we know we “want” color)

case “$TERM” in
xterm-color|*-256color) color_prompt=yes;;
esac

uncomment for a colored prompt, if the terminal has the capability; turned

off by default to not distract the user: the focus in a terminal window

should be on the output of commands, not on the prompt

#force_color_prompt=yes

if [ -n “$force_color_prompt” ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it’s compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "color_prompt" = yes ]; then PS1='{debian_chroot:+(debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else PS1='{debian_chroot:+($debian_chroot)}\u@\h:\w$ ’
fi
unset color_prompt force_color_prompt

If this is an xterm set the title to user@host:dir

case “TERM" in xterm*|rxvt*) PS1="\[\e]0;{debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1”
;;
*)
;;
esac

enable color support of ls and also add handy aliases

if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval “(dircolors -b ~/.dircolors)" || eval "(dircolors -b)”
alias ls=‘ls --color=auto’
#alias dir=‘dir --color=auto’
#alias vdir=‘vdir --color=auto’

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'

fi

colored GCC warnings and errors

#export GCC_COLORS=‘error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01’

some more ls aliases

alias ll=‘ls -alF’
alias la=‘ls -A’
alias l=‘ls -CF’

Add an “alert” alias for long running commands. Use like so:

sleep 10; alert

alias alert=‘notify-send --urgency=low -i “([ ? = 0 ] && echo terminal || echo error)” "(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert//’’’)"’

Alias definitions.

You may want to put all your additions into a separate file like

~/.bash_aliases, instead of adding them here directly.

See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

enable programmable completion features (you don’t need to enable

this, if it’s already enabled in /etc/bash.bashrc and /etc/profile

sources /etc/bash.bashrc).

if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi

When starting something new, it is good practice to proceed in small steps. The PATH variable is basic to command-line linux. You can experiment with setting it in a terminal. You need to know how to display the current value of the PATH variable, and how to verify that the program you want to run is found in the directory you are adding to the PATH. Once you are confident that you understand how the PATH variable is used, you can move on to making the setting persist across reboots. There are also tools that help you manage more complex environments with on-the-fly changes.

1 Like

I think you disturbed the .bashrc file while creating the path we should be careful. remove the lines that you added in .bashrc file. and run the source .bashrc command. If it is ok then send me the stamps folder full path (in command line).

Done, Terminal is functioning properly now.

/home/shadi/StaMPS/

I located the path from terminal to be written in command line if I understood you correctly

and this is what happens when I try to source the StaMPS_CONFIG.bash file


I thought i didn’t need to edit that directory according to the installation guides. Here’s my StaMPS_CONFIG.bash file content

Please be careful while giving the path, you mentioned above wrong path /home/shadi/StamPS/bin Ubuntu is character sensitive.

/home/shadi/StaMPS/bin , is the correct path, just add this line to .bashrc file as i mentioned above. all the best.

I understand. I made sure all characters are correct either capital or small and they match the folders names without any additional spaces or such but the .bashrc file has been disrupted again and the mt_prep-snap didn’t work


Don’t add the source .bashrc

After adding the path just run source .bashrc command in terminal. It will tell you, any error in .bashrc file.

I understand. my mistake. that was what corrupting the bashrc file. Ignorant me I know.
However, the error hasn’t been resolved yet unfortunately. I have installed all of those commands already

But still



and yes I opened the terminal in the project folder like how the tutorial provided by RUS says and I still get the same error

Does it make any difference if I operate on StaMPS (version 3.3b1) or StaMPS (version 4.1b1)

Please use latest version of stamps
Have you completed the,

make
make install

Commnads in stamps/src folder.

If you won’t complete just go to stamps/src folder and run those two commands.

Yes i have.
I also had this error while using the newest stamps version that’s why I reverted back to the older version.
I think the missing step was sourcing the bashrc file using terminal. So this how the problem was solved for me:
After making sure all dependencies were installed and all commands that @suribabu has mentioned were installed

  1. making sure that the following commands inside the src folder without causing any further disruptions to StaAMPS directory

make
make install

and never create any further changes such as renaming anything inside this folder nor moving it to another directory

  1. opening .bashrc file and typing the following line at the very end
    export PATH=/home/shadi/StaMPS/bin:$PATH
    then saving the changes
    (replacing shadi and StaMPS with whichever directory is used for storing StaMPS source code that was downloaded earlier)

  2. re-opening terminal with its default directory then type typing the following
    source .bashrc
    Thank you very much for your precious time and effort.
    Unfortunately The process hasn’t initiated due some directory error that I couldn’t find anything similar to it in the forum.



    and this is pre-processed data with the StaMPS export

Oh, nice. It’s working.
while entering the command, please take care of the spacing.

INSAR20161209 $ mt_prep_snap 20161209 /home/…/INSAR_20161209/ 0.4

Can ı determine the vertical displacement map from this LOS direction velocities map in matlab

Hi.
Thank you for your kind tutorial.
I am a student who is studying about ps-insar.
I have encountered the following issues in progress.
image

During data export for stamp view, an error appears that lon2 is not found. I would appreciate it if you could tell me what I did wrong.

and StaMPS_CONFIG.bash I don’t know where to find the bin file when I specify the path for triangle-bin in the bash. I’m using Ubuntu 18.04.

-pcy-

Hi, I run mt_prep_snap in wsl ubuntu and i have this error.

mt_prep_snap Andy Hooper, August 2017

Amplitude Dispersion Threshold: 0.4
Processing 1 patch(es) in range and 1 in azimuth

processor.txt: Permission denied.

Do you know how to solve it?

Just runt the mt_prep_snap command with sudo

1 Like