|
|
TODO |
|
|
\ No newline at end of file |
|
|
Logger reader
|
|
|
=============
|
|
|
|
|
|
Here we will describe quickly the API that we wish to provide for the logger.
|
|
|
|
|
|
```python
|
|
|
# Read some fields for some particles.
|
|
|
|
|
|
# We go to the last index file, find the correct ids -> offset
|
|
|
# then we read the logfile.
|
|
|
positions, velocities = logger.loadFieldsFromParticles(basename, ["Coordinates", "Velocities"], time, particle_ids)
|
|
|
|
|
|
# Reading a given set of fields.
|
|
|
|
|
|
# Same as before, but we use all the ids from the index file.
|
|
|
positions, velocities = logger.loadFields(basename, ["Coordinates", "Velocities"], time)
|
|
|
|
|
|
# Reading all the fields of all the particles in the logfile.
|
|
|
|
|
|
# Same as before, but we read all the fields.
|
|
|
parts = logger.loadSnapshotAtTime(basename, t[0])
|
|
|
|
|
|
# Moving a set of particles forward in time.
|
|
|
|
|
|
# We use previous offsets in order to move forwards the fields.
|
|
|
interp = logger.moveForwardInTime(basename, parts, time)
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |