Skip to content

pixel coordinate discrepancy between view.py and reference_point.py #941

@falkamelung

Description

@falkamelung

Description of the problem
Although having carefully selected the reference point, I occasionally get the error message ValueError: input reference point is in masked OUT area defined by maskConnComp.h5!. Digging into this, I noticed that view.py and reference_point.py have different y/x coordinates for the same geographic coordinates.

I am using mintpy.reference.lalo = 25.8794,-80.1241. According to view.py, the radar coordinates are y/x= 1713.7/747.7 (see screenshot below, mask value=1). However, reference_point.py, which shows the same lat/long coordinates, shows y/x: (1711, 745). So the coordinates are off by 2 pixels??

reference_point.py /scratch/05861/tg851601/MiamiTsxSMD14/miaplpy_Surfside_2017_202106/network_sequential_3/inputs/ifgramStack.h5 -t /scratch/05861/tg851601/MiamiTsxSMD14/miaplpy_Surfside_2017_202106/network_sequential_3/smallbaselineApp.cfg -c /scratch/05861/tg851601/MiamiTsxSMD14/miaplpy_Surfside_2017_202106/network_sequential_3/avgSpatialCoh.h5 --lookup /scratch/05861/tg851601/MiamiTsxSMD14/miaplpy_Surfside_2017_202106/network_sequential_3/inputs/geometryRadar.h5
--------------------------------------------------
reading reference info from template: /scratch/05861/tg851601/MiamiTsxSMD14/miaplpy_Surfside_2017_202106/network_sequential_3/smallbaselineApp.cfg
input reference point in lat/lon: (25.8794, -80.1241)
input reference point in y/x: (1711, 745)
mask: maskConnComp.h5
Traceback (most recent call last):
  File "/work2/05861/tg851601/stampede2/code/rsmas_insar/sources/MintPy/src/mintpy/cli/reference_point.py", line 149, in <module>
    main(sys.argv[1:])
  File "/work2/05861/tg851601/stampede2/code/rsmas_insar/sources/MintPy/src/mintpy/cli/reference_point.py", line 141, in main
    inps = read_reference_input(inps)
  File "/work2/05861/tg851601/stampede2/code/rsmas_insar/sources/MintPy/src/mintpy/reference_point.py", line 360, in read_reference_input
    raise ValueError(msg)
ValueError: input reference point is in masked OUT area defined by maskConnComp.h5!

view.py showing different Y/X coordinates:
image

Full script that generated the error

PASTE CODE HERE

Full error message

PASTE ERROR MESSAGE HERE

System information

  • Operating system: Linux

  • Python environment: conda:

  • python --version
    Python 3.9.15

  • MintPy version: development (latest)

  • Your custom / default template file (if the bug is related to a specific dataset):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions