Sample1d and binary -T file

Here’s another sample1d question.

Given a binary data set consisting of several columns (time, param1, param2; with -bi3d), and another binary file of times that I want to sample the first file to (-bi1d), how can this be done?

This doesn’t seem to work (classic mode):

gmt sample1d -bi3d file1.bin -Tfile2.bin -bo3d > resampled_file.bin

Is there a way to specify the binary input spec for file2.bin? The -Tfile|list is not very well described on the sample1d module page. In this case, does file have to be a text file?

Not sure. But I think so. Maybe you could try to use gmt convert to create a text file.

Thanks. That was what I wound-up doing as a work-around.

But I may have the situation, down the road, where I have millions of them, in which case converting file2.bin to text will slow things down.

So far, across all of GMT, the primary table inputs can be binary, netcdf, or ascii (or shapefiles), but secondary tables set via command-line options (e.g., -Tsomefile) are enforced to be ascii. It would require some special mechanism to break that up.

Like the wrappers: Julia or Matlab