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

problems with nans in travel time removal #20

Closed davidfee5 closed 4 years ago

davidfee5 commented 4 years ago

Nan's in the travel time removal causes an error:

" File "/Users/dfee/repos/rtm/rtm/grid.py", line 441, in grid_search tr.stats.starttime = tr.stats.starttime - time_shift.data

File "/Users/dfee/anaconda/envs/rtm/lib/python3.7/site-packages/obspy/core/utcdatetime.py", line 946, in sub return UTCDateTime(ns=self._ns - int(round(value * 1e9)))

ValueError: cannot convert float NaN to integer"

What do we want to do about bad data in the DEMs? I think setting them to zero might be ok, or we could just skip/zero out that trace during the stacking process. Negative values (underwater) also need to be taken accounted for, although they can probably just be set to zero.

liamtoney commented 4 years ago

Addressed in 5d2741c