DAS-RCN / RCN_DASformat

4 stars 1 forks source link

Data array dimensions #13

Open dbpodrasky opened 2 years ago

dbpodrasky commented 2 years ago

Not strictly required when using a typical HDF5 reader, but including the dimensions of the data array---number of time samples and number of receiver channels---in the das dictionary object defined DAS_Format_reference.py would be potentially useful.

dcbowden commented 1 year ago

+1 vote for this from me. I've found it useful (in other codes) to have wrapper functions that can calculate vectors of times and distances, in the case that only a small subset of file needs to be loaded. This is a beautiful thing about HDF5, that one can specify exact indices and load only as needed. If it's not a header in meta, alternatively maybe the size of the array can be gleaned from the HDF5 dataset properties, and then a little class function can help users get nchannels and nsamples?

Edit: though I realize that what I'm suggesting (pulling only a subset of the data array) would require even further manipulation/modification of the class functions (e.g. _getdata() with additional arguments), in which case a user is presumably smart enough to get these dimensions themselves?