uafgeotools / rtm

A Python package for locating infrasound sources using reverse time migration
https://uaf-rtm.readthedocs.io/
MIT License
38 stars 13 forks source link

Clamp stations to DEM surface #34

Closed davidfee5 closed 4 years ago

davidfee5 commented 4 years ago

Address #33. Finds nearest grid point on DEM surface and uses that elevation. If no grid point found (i.e. station not on DEM) then the original station elevation is kept.

davidfee5 commented 4 years ago

The first commit had a mistake and I had trouble removing it.

davidfee5 commented 4 years ago

Also, I think we should make a copy of the input st at the beginning of this function and do further processing on the copy, not the original. It wasn't necessary before, but now that we're overwriting some of the metadata we need to ensure that the input st isn't modified by this function (i.e. we don't want this function to have "side effects"). I always forget about that!

Wouldn't we want the new station elevations to be clamped to the DEM? I could see this being useful for additional processing. In general I agree about not overwriting metadata and potential side-effects, but in this case I think it might make sense. Thoughts?

liamtoney commented 4 years ago

What sort of additional processing were you envisioning? I can imagine plotting profiles with stations like this one from Kim et al. (2015) being one such application:

Screen Shot 2020-03-26 at 12 48 17 PM
davidfee5 commented 4 years ago

Sure, that's one example. I was trying to think of a situation where we wouldn't want it clamped and am not really sure (other than an aerostat sensor). Also, in general I would trust the DEM surface more than the station elevations, as they may come from poor estimates from a handheld GPS/etc.

davidfee5 commented 4 years ago

All looks good to me. Tested a couple different scenarios.