Hi Gang,
Thanks for the tip! But I realize my question was terribly unclear-- what I'm looking for is a way to have AFNI look at the statistical information in the header and convert an arbitrary statistic to a p-value, as the AFNI viewer does. Once I have that, I can feed the dataset to 3dhistog | 1dplot -hist -stdin and make things happen. I've managed to get a solution working, but it's so unwieldy I'm looking for a better way. Doing things in R is probably a better idea than trying to do them in python, with which I'm more comfortable, because there's no python IO library.
ijs