jgliss / pyplis

Python toolbox for the analysis of UV SO2 camera data
GNU General Public License v3.0
7 stars 5 forks source link

MeasGeometry.cam GeoPoint.topo_data can have NaNs which can prevent light dilution correction #43

Open twVolc opened 2 years ago

twVolc commented 2 years ago

There is already a note in LineOnGrid.get_line_profile() that NaNs will cause the scipy map_coordinates() function to fail, but I'm just documenting here that I've hit an example of this. The GeoPoint for my camera installation on Lascar for some reason is creating a couple of NaNs in GeoPoint.topo_data. I need to explore some more to work out why this is and what exactly the topo_data attribute is representing here. Most of the array looks fine, but a few points are NaNs (at the bottom of the array), and that is enough to cause things to fail when trying to use DilutionCorr.det_topo_dists_line(). Maybe I have something set up wrong, but maybe to avoid this some interpolation of NaN values in the topo_data array need to be done.

I will look into this some more, I'm mainly making a note for myself so I don't forget. But if you have experienced anything similar before @jgliss perhaps you already know the solution? I should note I've had everything work fine before with Villarrica data, so this isn't a consistent issue.

jgliss commented 2 years ago

@twVolc this might be due to gappy SRTM dataset, which is accessed using srtm.py library via geonum.

jgliss commented 2 years ago

I seem to remember that this dataset had some gaps at least in Northern Chile (area around Guallatiri).

jgliss commented 2 years ago

One point on my wishlist for geonum was to provide tools for 2D interpolation for the topodata, if missing patches are not too large (and local topography not too complex).

jgliss commented 2 years ago

If you further investigate this it would be great if you could post here what you found out. I would probably start with plotting a 2D topo map of the region, to see if there are gaps in the topodata. You can do this, for instance with geonum map plotting tools.