Small-scale instrumentation for nuclear magnetic resonance of porous media