XCORR(1)

πŸ’– XCORR(1) πŸ’–

okay bestie, welcome to the User Commands section of the manual, section 1 β€” and this one is called xcorr. it's giving "I compute cross-correlations and I'm not sorry about it" πŸ’…


🌸 NAME 🌸

xcorr β€” literally xcorr. that's it. that's the name. short, iconic, no notes ✨


✨ SYNOPSIS ✨

xcorr master.PRM aligned.PRM [-time] [-real] [-freq] [-nx n] [-ny n] [-xsearch xs] [-ysearch ys]

like… you give it two PRM files and then sprinkle whatever flags your heart desires 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so this program is part of GMTSAR, okay? and here's the whole vibe in one line, exactly as the manpage says it:

xcorr [GMTSAR] - Compute 2-D cross-correlation of two images

two images, 2-D cross-correlation, that's the whole plot. no cap πŸ”₯

the two files you're handing over πŸŽ€

  • master.PRM β€” the PRM file for the reference image.
  • aligned.PRM β€” the PRM file of the secondary image.

the flags, bestie (yes, all of them) πŸ’…

  • -time β€” use time cross-correlation.
  • -freq β€” use frequency cross-correlation. this is the default, so if you say nothing, this is what you get.
  • -real β€” read float numbers instead of complex numbers.
  • -noshift β€” ignore ashift and rshift in the prm file (it sets them to 0).
  • -nx nx β€” number of locations in the x (range) direction, as an int.
  • -ny ny β€” number of locations in the y (azimuth) direction, as an int.
  • -nointerp β€” do not interpolate the correlation function.
  • -range_interp ri β€” interpolate range by ri (a power of two). [default: 2]
  • -norange β€” do not range interpolate.
  • -xsearch xs β€” search window size in the x (range) direction. int power of 2: [32 64 128 256]
  • -ysearch ys β€” search window size in the y (azimuth) direction. int power of 2: [32 64 128 256]
  • -interp factor β€” interpolate the correlation function by factor (an int). [default, 16]
  • -v β€” verbose output, and it writes:
    • freq_xcorr.dat (the default)
    • time_xcorr.dat (if you used the -time option)

output tea β˜•

use fitoffset.csh to convert the output to PRM format. iykyk ✨

examples (copy these fr fr) πŸ“

xcorr IMG-HH-ALPSRP075880660-H1.0__A.PRM IMG-HH-ALPSRP129560660-H1.0__A.PRM -nx 20 -ny 50
xcorr file1.grd file2.grd -nx 20 -ny 50
the second one takes grids with real numbers, just so you know πŸ‘‘

and then the manpage just… says it all again πŸ™ˆ

for real, here's the Usage line, once more with feeling:

xcorr master.PRM aligned.PRM [-time] [-real] [-freq] [-nx n] [-ny n] [-xsearch xs] [-ysearch ys]
  • master.PRM β€” PRM file for reference image
  • aligned.PRM β€” PRM file of secondary image
  • -time β€” use time cross-correlation
  • -freq β€” use frequency cross-correlation (default)
  • -real β€” read float numbers instead of complex numbers
  • -noshift β€” ignore ashift and rshift in prm file (set to 0)
  • -nx nx β€” number of locations in x (range) direction (int)
  • -ny ny β€” number of locations in y (azimuth) direction (int)
  • -nointerp β€” do not interpolate correlation function
  • -range_interp ri β€” interpolate range by ri (power of two) [default: 2]
  • -norange β€” do not range interpolate
  • -xsearch xs β€” search window size in x (range) direction (int power of 2 [32 64 128 256])
  • -ysearch ys β€” search window size in y (azimuth) direction (int power of 2 [32 64 128 256])
  • -interp factor β€” interpolate correlation function by factor (int) [default, 16]
  • -v β€” verbose output: freq_xcorr.dat (default), time_xcorr.dat (if -time option)
  • use fitoffset.csh to convert output to PRM format
  • Example: xcorr IMG-HH-ALPSRP075880660-H1.0__A.PRM IMG-HH-ALPSRP129560660-H1.0__A.PRM -nx 20 -ny 50
  • Example: xcorr file1.grd file2.grd -nx 20 -ny 50 (takes grids with real numbers)

like okay repetitive queen, we hear you 🌈


this page is xcorr, describing xcorr [GMTSAR] - Compute ..., dated May 2024, living in section XCORR(1). that's the sign-off bestie, mwah πŸ’–βœ¨πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from