Can't run mt_prep_snap

Hello there,

I was trying to call the mt_prep_snap script in the Amplitude dispersion step. However, I can’t make it. But it seems like the script is working, as you can see when I call it without parameters. Looks like nothing wrong with it—many thanks.

Just try to run this below commands in INSAR_20180309 folder,

mt_prep_snap 20180309 /home/oscar/PSI_processing/INSAR_20180309/ 0.4

or try this below one in prep folder,

mt_prep_snap 20180309 /home/oscar/PSI_processing/INSAR_20180309/prep/ 0.4

I have tried both, but they didn’t work. It’s not the quotation mark problem.

Why are your prepared files stored inside a “prep” folder? If you want to have the processed data in a separate directory, simply create one and navigate in there and call the mt_prep_snap command pointing to the data where your prepared files are located (without /prep)
Also, there is no need to put the path in quotation marks.

Thanks for your help. I have tried the command without the /prep which you can see from my first image. I think it’s some software setup problem. I have reinstalled my Ubuntu system and see how it goes.

can you please add the number of rows, colums and tiles in the command for a test?
mt_prep_snap date directory 2 2 200 50

1 Like

Will do. I accidentally deleted StaMPS and some other associated software when I was uninstalling SNAP. I will give it a try when I set up all the software and post the result.

Thank you, ABraun. My problem has been solved. I am happy I can consult here. It’s such an active and friendly forum.

1 Like

Hello, I am experiencing this exact same problem. I tried the suggest fix but the issue has not been solved. Is there anything else that I can try?

Just add the path into the .bashrc file, like below

export PATH=/home/username/stamps/bin:$PATH
source .bashrc

then try to run mt_prep_snap command once again.

Still, If you get any errors please share the screenshot.

Hello @suribabu, thank you for your response.

Here are a few screenshots which may make it easier to identify the issue.

This is the error that I am getting. As you can see, I’ve attempted the solution mentioned on this topic, but it still doesn’t work. It also shows that mt_prep_snap is working (when I run the code on its own).

This shows that my snaphu and triangle are installed.

This is my Stamps config file.

here is the .bashrc file. As you can see, at the bottom, I’ve sourced stamps and TRAIN.

Finally, I’ve tried what you’ve told me to do -

My apologies, this is the first time I’ve ever dealt with Linux.

Hi, have you tried to eliminate spaces from path?


spaces from the path as in the “Isara HD”?

sometimes this causes troubles.

Yes I have tried doing that but there is no difference. I think that’s because that’s the name of my hard disk. Should I change the name of the hard disk to one without a space?

I’m not totally sure this is the problem. Maybe you can move your data to another folder with no spaces in path, and running mt_prep_snap there.

Hello @geofisue you were right. I renamed the hard disk to one without a space and the code is running. We are making progress!

However, I have come across yet another problem. Here is the screenshot to shed some light onto this -

Great. This new error is solved here: Segmentation Fault (core dumped) error during mt_prep_snap - #17 by ABraun


@geofisue I think it is running smoothly now! Thank you so much for both the quick responses and effectively identifying my issues. I truly am grateful for what you’ve done for me. Also, thanks @ABraun for the solution that you posted in a previous post. It worked like magic.


Glad it is working. The SNAP forum is building a large collection of problem solutions, but it is important to think about the next person with the same problem. In the future, please be more explicit about the fix so the next person doesn’t have to search for it. The details of fixes often change over time, so it is is good to have a recent post that fully explains the fix so we can know the latest time when the fix was successful.