Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve data handling #12

Open
fwalter opened this issue Dec 30, 2020 · 6 comments
Open

Improve data handling #12

fwalter opened this issue Dec 30, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@fwalter
Copy link

fwalter commented Dec 30, 2020

Hi there,

It would help to have a function, which converts data from the queue to an obspy stream object, which can then be manipulated by the user. This would immediately allow the user to access the entire obspy functionality, which is arguably the most widely used and powerful open source package for seismic data handling. Such a function should also bypass the module manipulation required to write custom consumers as currently outlined in the documentation.

https://github.com/openjournals/joss-reviews/issues/2565

@iannesbitt
Copy link
Collaborator

Hi @fwalter, thanks for your suggestion. When I was writing this software, I originally did set out to include that kind of functionality. Unfortunately, obspy streams were not designed for continuously ingesting live data and thus I've found them hard to work with in that capacity. If I remember correctly, they tend to suffer from a memory leak issue when data is added without creating a completely new stream as a separate memory object. Thus (at least when I was working on this full time) it was hard to maintain a single stream object that updates live and doesn't become a memory burden over the timespan of weeks to months. Currently, rsudp works around this with some slight of hand by creating a new stream object by adding the old and the new together every cycle.

@iannesbitt iannesbitt added the upstream This bug is due to an upstream piece of software label Dec 30, 2020
@iannesbitt iannesbitt assigned iannesbitt and unassigned iannesbitt Dec 30, 2020
@fwalter
Copy link
Author

fwalter commented Dec 31, 2020

Hello @iannesbitt, I was thinking about something like this:

https://docs.obspy.org/tutorial/code_snippets/easyseedlink.html

Otherwise, would it be possible to return some other type of python variable or object, which updates itself every time new data are available?

@iannesbitt
Copy link
Collaborator

@fwalter I think it would be possible to add a SeedLink client, although I feel that a significant disclaimer is that this deviates from the original scope of this software, which is lightweight upstream UDP packet processing for downstream data use. I will look into converting the existing data into a stable Stream object as this would be both much more efficient and within the scope.

@fwalter
Copy link
Author

fwalter commented Jan 6, 2021

@iannesbitt I am not asking to include a seedlink client, simply a straightforward interface for a client or module, which accepts the current data packages and then manipulates them. I think this kind of flexibility is something any user of your software would be interested in. He/she would have to program something equivalent anyway following your instructions in the documentation. The easiest solution would probably be the best one, simply some sort of python object, which contains the current data and which is updated regularly.

@iannesbitt iannesbitt added enhancement New feature or request and removed upstream This bug is due to an upstream piece of software labels Jan 20, 2021
@calum-chamberlain
Copy link

If it helps, I had to cope with handling streaming data (that may also be gappy) and converting to ObsPy objects in RT-EQcorrscan - the solution I have is here, and doesn't seem to be leaky. There is then a painful array of Queues to handle getting the current state of the Stream from the streamer.

@iannesbitt
Copy link
Collaborator

Thank you @calum-chamberlain! I will look into this further in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants