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

Implement stacking utils .py file #12

Closed liamtoney closed 4 years ago

liamtoney commented 5 years ago

Original report by me.


This would include:

liamtoney commented 5 years ago

The max coords function would be a good opportunity to figure out a better way to convert numpy.datetime64 to datetime because UTCDateTime(str(time)).datetime is super clunky and sketchy…

liamtoney commented 5 years ago

Utility function for max coords of S is implemented

davidfee5 commented 4 years ago

Perhaps this would be a good place to implement a detector in the stack as well? Rather than just get the peak of the stack I think it would be useful to be able to get multiple peaks/detections. For example, in a 5 min long stack we might have a number of different explosions. The user could specify the peak threshold and minimum time between detections.

liamtoney commented 4 years ago

Yes, I think it's a good place.

davidfee5 commented 4 years ago

I added get_peak_coordinates, but it overlaps with get_max_coordinates now. I think they could be combined to allow the user to just get the absolute max or a number of peaks based on thresholds. Agreed?

liamtoney commented 4 years ago

Yes.

davidfee5 commented 4 years ago

I implemented a simple solution to return just the global max, but it doesn't return an error or warning if there multiple peaks of the same value. I think this is probably quite unlikely, but I guess we could try to add this in.

liamtoney commented 4 years ago

This can occur if the grid is coarse and/or waveforms are highly decimated. I'd like to have that functionality if possible. If that can be added in, we could remove get_max_coordinates() entirely in favor of get_peak_coordinates() since the latter is the former if global_max=True is set.

davidfee5 commented 4 years ago

I've implemented the checks and warnings now and removed get_max_coordinates. Suggest closing this issue and breaking up other wanted functionality into separate issues.

liamtoney commented 4 years ago

We can close this once we have the new peak finding function working with the two examples. Agreed on breaking this out into separate issues.

liamtoney commented 4 years ago

I'm going to abandon the GeoTIFF export functionality as unneeded. We can make a new Issue for semblance stacking etc. if the need arises.