paudetseis / RfPy

Teleseismic receiver function calculation and post-processing
https://paudetseis.github.io/RfPy/
MIT License
39 stars 28 forks source link

demo_streams.pkl does not include necessary rfdata stats #12

Closed jaredbryan881 closed 4 years ago

jaredbryan881 commented 4 years ago

When the HkStack and Harmonics classes are initialized with 'demo', they load receiver functions from demo_streams.pkl. The receiver functions in demo_streams.pkl were created (dc0eb66c53af6aa30c053d76187e7885527cbd95) before the _add_rfstats nested function of rfdata's to_stream method included taxis (and other stats like phase, cc, etc.) (0fe006e069cf3edd27e559cbc79568161db6c800). The following lines throw an AttributeError because taxis does not exist.

https://github.com/paudetseis/RfPy/blob/49131045b4a355ab62b8149f9304c14c1c2eb723/rfpy/hk.py#L107

https://github.com/paudetseis/RfPy/blob/bdc8f391d6ed83cecf57c36298043df4795ec568/rfpy/harmonics.py#L97

I think demo_streams.pkl just needs to be recreated to include these stats.

paudetseis commented 4 years ago

Thanks @jaredbryan881 for catching this - indeed the code has changed since the demo data were created and they have not been updated since then. This should be an easy fix.

jaredbryan881 commented 4 years ago

This is fixed as of b0aa1d0c438d0f60b4c640c463a640aa9e2b4243! Closing issue.