Closed chichilalescu closed 4 years ago
I agree--the ipython notebooks would be a great starter for someone new to it.
added basic example http://nbviewer.ipython.org/github/chichilalescu/pyJHTDB/blob/develop/pyJHTDB/pyJHTDB_example.ipynb we should probably decide where these examples should be placed (if they're not under pyJHTDB, then they don't get installed by pip, right?)
In my opinion, examples shouldn't be installed (via pip or anything else). They should go in the top level directory of the repo (/examples/notebook1.ipynb
etc.). Users can download the notebooks from nbviewer or clone from GitHub.
I agree--that makes sense. Lets put it in the top level directory.
it makes sense to me too, so I moved it. New link is http://nbviewer.ipython.org/github/chichilalescu/pyJHTDB/blob/develop/examples/basic_usage.ipynb
Thanks for the great package - we need to use GetPosition - do you have an example for it in Python? Notebook? Thanks in advance
I can't go through the package now, but I'll see what examples we have and let you know. as far as I can remember, I did put in the functionality.
I've added an example with commit caf32a60e46138a550c5923a973897f1f29de759. Basically there's a method of the libJHTDB objects that returns trajectories, at a desired density of samples in time. Please let us know if you'd like more explanations with the code.
One more comment: the relevant method is defined in pyJHTDB/libJHTDB.py
at line 253. It's an almost direct call of the C function itself, with some minor tweaking for the sampling. The important bit is that if a finely spaced trajectory is desired, this will be more expensive.
Thanks a lot.
I found out that ipython notebooks exist. we should definitely have an example of pyJHTDB usage in that form...