[ENH]: dmap cursor control
Opened this issue · 0 comments
This is a low priority feature request.
It might be nice to include some cursor control methods in the DmapRead class so that one can jump to different records in a file without reading out all of the other records in the file.
For example:
import pydarn
filename='20171231.0001.00.sas.fitacf' #any dmap file will do
dmap_handler = pydarn.DmapRead(filename)
print(dmap_handler) # prints a 0
record = dmap_handler.read_record()
print(dmap_handler) # prints something larger than 0.
begin new methods
dmap_handler.rewind() # sets cursor to beginning of the file
dmap_handler.next() # jumps to next record in the file
dmap_handler.jump(record_number) # sets the cursor to an offset where record "record_number" resides.
I've used this functionality in davitpy before, but it isn't critical to typical use cases.
Originally raised here: SuperDARN/pydarn#6