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

Reduce memory during stacking #50

Closed davidfee5 closed 3 years ago

davidfee5 commented 3 years ago

This pull request forces the stack function to be rewritten during each loop iteration. This saves substantial memory and was needed when running over long time windows. The stack at any point in time can always be recreated for certain grid points and travel times after the fact.

liamtoney commented 3 years ago

I tested this and it seems to give the same result as master. Looking at the old code it seems unnecessary to have stk be a 3-D array since we already have S for this purpose, so this change makes sense.

Is there any reason not to do this?

davidfee5 commented 3 years ago

Agreed. I think it was detritus from old code and don't see why it would be needed.