Issue running stripmapStack
I successfully was able to install ISCE (via conda) and run stripmapApp on a pair of ALOS-1 acquisitions. However, now I am trying to run the stripmapStack and have been unable to do so. When I try and run the commands produced in run_unPackALOS, I get the following message and then error:
Trying multiple subdirs...
['.../download/20070211/ALPSRP055890360/LED-ALPSRP055890360-H1.0__A', '.../download/20070211/ALPSRP055890370/LED-ALPSRP055890370-H1.0__A']
['.../download/20070211/ALPSRP055890380/IMG-HH-ALPSRP055890380-H1.0__A', '.../download/20070211/ALPSRP055890360/IMG-HH-ALPSRP055890360-H1.0__A', '.../download/20070211/ALPSRP055890370/IMG-HH-ALPSRP055890370-H1.0__A']
.../SLC/20070211/20070211.raw
fbs2fbd flag activated
2023-12-05 22:07:58,276 - isce.sensor.ALOS - INFO - Extracting Level 1.0 data
reading image: 0
.... swapping bytes
Illegal instruction: 4
What could be causing this error, and what can I do?
I am working on macOS Monterey, and I added the following lines to my ~/.bash_profile :
export PATH=${PATH}:${ISCE_HOME}/bin:${ISCE_HOME}/applications:${ISCE_STACK}/stripmapStack
export PYTHONPATH=${PYTHONPATH}:${ISCE_STACK}
mamba activate iscenv2
I attach the conda environment as it was created by running mamba install isce2.
I am not sure whether it is a cut-and-paste error or not, but your listing shows LED files for two frames and IMG-HH files for three frames. You need an LED file for each frame.
EJ - thanks for your comment. I think it is a copy-paste issue (apologies!); I just ran it again and all 3 LED files show up. Here is from this last run (on a different stack of images), including the command copy-pasted from run_unpackALOS ; I cut off the absolute filepaths for readability.
(iscesent) wifi-10-44-135-173:alosstack lhackett$ source ~/.bash_profile;unpackFrame_ALOS_raw.py -i download/20110107 -o SLC/20110107 -f fbs2fbd -m
Trying multiple subdirs...
['download/20110107/ALPSRP263900380/LED-ALPSRP263900380-H1.0__A', 'download/20110107/ALPSRP263900360/LED-ALPSRP263900360-H1.0__A', 'download/20110107/ALPSRP263900370/LED-ALPSRP263900370-H1.0__A']
['download/20110107/ALPSRP263900380/IMG-HH-ALPSRP263900380-H1.0__A', 'download/20110107/ALPSRP263900360/IMG-HH-ALPSRP263900360-H1.0__A', 'download/20110107/ALPSRP263900370/IMG-HH-ALPSRP263900370-H1.0__A']
SLC/20110107/20110107.raw
fbs2fbd flag activated
2024-01-04 16:08:22,383 - isce.sensor.ALOS - INFO - Extracting Level 1.0 data
reading image: 0
.... swapping bytes
Illegal instruction: 4
That is strange. It is possible that one of your LED or IMG files was damaged at some step. Can you check that the LED files are the same size and the IMG files also?
Yes they are; each LED file is 12.5MB and each IMG-HH is 747.4MB. I am also confident that the original compressed files are uncorrupted since the pairwise-processing works fine.
I have used stripmapStack with a "data" directory having a single-level subdirectory for each date below the "data" directory. It looks like you may be using multiple levels of subdirectories below your "data" directory. The unpack script might not handle that directory structure correctly.
That was it, thank you! I'm surprised that running prepRawALOS.py -i download/ -o SLC as directed in the README on the downloaded data did not create the correct file structure for the subsequent step- maybe it's worth documenting in the README that you need to manually move the unzipped files after running prepRawALOS.py
The processing can handle having multiple frames for the same date and track in the same directory. I usually go to the "data" "date1" directory and unzip all the frames for that date there. I wrote a Python script to do this in a more automated way. If you can write a suggested change for the stripmapStack file, we can add that. Sending a GitHub Pull Request would be excellent, if you know how to do that, or you can post it here.