VNL-MAKE-MATRIX(1)

πŸ“¦
version 1.42 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– VNL-MAKE-MATRIX(1) πŸ’–

okay bestie, so this is a page from the vnlog manual, and today we're talking about vnl-make-matrix β€” the little tool that turns your one-point-per-line vnlog into actual honest-to-god matrix files. it's giving ✨glow up✨ for your data. let's get into it 🫢


✨ NAME ✨

vnl-make-matrix β€” create a matrix from a one-point-per-record vnlog

like, that's the whole vibe. one point per record goes in, a matrix comes out πŸ’…


🌸 SYNOPSIS 🌸

okay so picture this. you got your data looking like this:

$ cat /tmp/dat.vnl
# i j x
0 0 1
0 1 2
0 2 3
1 0 4
1 1 5
1 2 6
2 0 7
2 1 8
2 2 9
3 0 10
3 1 11
3 2 12

and you're like "bestie this is so many lines 😭". so you run this:

$ </tmp/dat.vnl vnl-filter -p i,x | vnl-make-matrix --outdir /tmp --prefix test_
Writing to '/tmp/test_x.matrix'

and it literally writes a file for you, no cap:

$ cat /tmp/test_x.matrix
1 2 3
4 5 6
7 8 9
10 11 12

ate. periodt. πŸ”₯


πŸ¦‹ DESCRIPTION πŸ¦‹

So. Vnlog represents each "data item" as a line of text. And honestly? That's very often exactly what one wants. But at times it isn't, and that's just the truth πŸ™ˆ. One example of this is matrix data: we want each line to contain a whole row of a matrix. So this script exists for convenience, to bridge this gap. it's the little matchmaker between your vnlog and your matrix 🧚

The input is an vnlog, coming in on STDIN and/or in files given on the commandline. This vnlog must have at least two fields:

  • the least-significant (slowest-changing) index of each point β€” and it must be the first field, no negotiation πŸ’€
  • as many value fields as desired πŸ’–

These points must be written out in order, and it is assumed that all entries in the matrix are specified. Like, don't come in here with holes in your matrix, bestie, it will not go well 😭

The output is a set of (non-vnlog) matrix files in the directory given in the "--outdir" argument. These files are named "PREFIX_XXX.matrix" where "PREFIX" comes from --prefix (or empty) and "XXX" is the field name. πŸ’«

These matrices can be loaded into any analysis tool (numpy for instance), or plotted directly with gnuplot:

set size ratio -1
plot "/tmp/test_x.matrix" matrix with image
pause -1

so yeah, data visualization icon behavior πŸ‘‘


🌈 REPOSITORY 🌈

https://github.com/dkogan/vnlog/

go give it a star, it's the least you can do 🫢⭐


πŸ‘‘ AUTHOR πŸ‘‘

Dima Kogan "<dima@secretsauce.net>"


Copyright 2016 California Institute of Technology.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

legally binding, bestie β€” read it, respect it, love it πŸ’…

and that's the whole page! this one dropped on 2026-01-26, straight from the vnlog crew. mwah πŸ’‹ bye babes! πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from