Query collocate changing metadata

I’m using ‘Collocate’ in snappy to create a stack of interferograms, however I want to check that the changes to the *.dim metadata is correct.

For example collocating pair 20150610_20150622 to master 20150505_20150529:

Prior to collocate:

> grep "Master" 20150610_20150622.dim
<MDElem name="Master: 22Jun2015">
<MDElem name="Master: 10Jun2015">
<MDATTR name="Master_bands" type="ascii" mode="rw">i_IW1_VV_mst_22Jun2015 q_IW1_VV_mst_22Jun2015</MDATTR>

> grep -n "Slave" 20150610_20150622.dim
<MDElem name="Slave: 22Jun2015">
<MDElem name="Slave: 10Jun2015">
<MDElem name="Slave: 22Jun2015">
<MDElem name="Slave: 10Jun2015">
<MDATTR name="Slave_bands" type="ascii" mode="rw">i_ifg_VV_22Jun2015_10Jun2015 q_ifg_VV_22Jun2015_10Jun2015 coh_VV_22Jun2015_10Jun2015</MDATTR>

After collocation, the above metadata changes to the master interferogram metadata:

> grep "Master" 20150610_20150622.dim
<MDElem name="Master: 29May2015">
<MDElem name="Master: 05May2015">
<MDATTR name="Master_bands" type="ascii" mode="rw">i_IW1_VV_mst_29May2015 q_IW1_VV_mst_29May2015</MDATTR>

> grep -n "Slave" 20150610_20150622.dim
<MDElem name="Slave: 29May2015">
<MDElem name="Slave: 05May2015">
<MDElem name="Slave: 29May2015">
<MDElem name="Slave: 05May2015">
<MDATTR name="Slave_bands" type="ascii" mode="rw">i_ifg_VV_29May2015_05May2015 q_ifg_VV_29May2015_05May2015 coh_VV_29May2015_05May2015</MDATTR>

The same result occurs whether the parameters ‘renameMasterComponents’ or ‘renameSlaveComponents’ are set to True or False.

Should this be occurring? If so, this creates a problem when using MintPy, as this metadata is used to create pair names.

not a solution, but maybe a work-around - have you tried using the Create Stack operator?

Thanks, no I haven’t tried Create Stack. I’ve implemented a work-around to manually replace those lines with what was present prior to to using collocate. It appears to work so once my processing is complete, I’ll test it in MintyPy again.

good to hear.

Did you check if it is just the names of the bands which are wrong or is the actual date of each band?

It’s just the metadata that’s wrong, the band names are okay in the *.data files. MintPy looks at the metadata to determine the pair name, not the band names. It took some digging to find out why MintyPy wasn’t working, at it’s specifically using the Master names to work out the pair name:

<MDElem name="Master: 22Jun2015">
<MDElem name="Master: 10Jun2015">

I’m replacing these with the correct names as per the metadata before Collocate, so that should solve the problem.

1 Like