Show all posts by user
Dear AFNI users-
We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:
https://discuss.afni.nimh.nih.gov
Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.
The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.
Sincerely,
AFNI HQ
History of AFNI updates
Thanks, that reference cleared a lot up. But this seems like a case of making the intercept implicit by using homogeneous coordinates, rather than eliminating the intercept altogether. This is the approach that SPM always takes, and it doesn't seem to cause trouble when a model is just the interaction of several variables (quantitative or factorial), corresponding to an R model formula of
by
Isaac Schwabacher
-
AFNI Message Board
OK, I'm realizing that `y ~ someFactor+0` where someFactor has more than two levels can't mean what I thought it did; what does it mean? Also, is there a way to account for the fact that the error estimates for different subjects were made based on different numbers of errors?
by
Isaac Schwabacher
-
AFNI Message Board
Is that because the zero-intercept version would need `-corStr 't : AR1'` to function, or for some other reason?
by
Isaac Schwabacher
-
AFNI Message Board
I'm trying it. Why is this correct when the model in example 1 is 0+Time?
EDIT: It's running, so thank you! But I still don't understand R model formulae. :(
by
Isaac Schwabacher
-
AFNI Message Board
Hi Gang,
I'm having trouble using 3dLME to examine errors in a cognitive task. The program is hanging at the single voxel model test step, which I assume means I did something dumb. Here's my command:
3dLME -prefix data/group_processed/LME/LME.PASAT_errors \
-model '(Group*Scan):Time' -qVars t -qVarCenters 0 \
-ranEff '~1' -SS_type 3 -num_glf 1 \
by
Isaac Schwabacher
-
AFNI Message Board
I didn't know you could use labels in ranges! That's cool!
by
Isaac Schwabacher
-
AFNI Message Board
The problem here is that you're using single quotes instead of double quotes. Single quotes are interpreted by the shell (i.e., before 3dbucket is even running) to mean "I want exactly this text; don't interpret it further", while double quotes mean "I want to do variable and command substitution on this, but nothing else". So both kinds of quotes prevent the brack
by
Isaac Schwabacher
-
AFNI Message Board
Whoops! I tested this before posting, and I figured out that comments don't work in interactive tcsh sessions, but then I forgot to quote the here-doc delimiter when feeding the commands from bash-- so the backslash-newline pairs were getting eaten by bash before they made it to tcsh. >.<
by
Isaac Schwabacher
-
AFNI Message Board
Olivia,
I've spent enough time frustratedly combing through data from our scanner that I can give you a partial answer to this. The information you want is in the header attribute TAXIS_OFFSETS, which you can read about in README.attributes. Unfortunately, our GE Discovery scanner at the University of Wisconsin doesn't record the slice timing in a way that to3d can access it, and t
by
Isaac Schwabacher
-
AFNI Message Board
You could use -stim_times_AM1 and add a bunch of indicators to your married files, like this bash session:
$ cat times.1D
10
20
30
40
$ cat durations.1D
3.5
2.7
6.5
5.3
$ n=$(wc -l <times.1D)
$ for i in $(seq 1 $n); do
> yes 0 | sed "${i}s/0/1/;${n}q" >temp.dummy$i.1D
> done
$ paste -d, $(seq --format=temp.dummy%.0f.1D 1 $n) |
> paste -d\*: times.1
by
Isaac Schwabacher
-
AFNI Message Board
rick reynolds Wrote:
-------------------------------------------------------
> Also, the # command lines are okay, but they need
> backslash continuation characters (if
> appropriate),
> too. That applies to the "Puts the brain into
> MNI"
> line, for example, and others.
I don't think this will work. In bash, comments are interpreted before line conti
by
Isaac Schwabacher
-
AFNI Message Board
Excellent, thanks! I'm going to have to play with this.
by
Isaac Schwabacher
-
AFNI Message Board
It looks like there's a commit on github with makefile and header changes, but 3dPval itself isn't included. Is that a mistake, or just part of the process?
by
Isaac Schwabacher
-
AFNI Message Board
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,
by
Isaac Schwabacher
-
AFNI Message Board
Hi all,
Is there a quick and easy way to build a p-value histogram from an arbitrary statistical dataset? Otherwise I can always parse the output of `3dAttribute BRICK_STATAUX $dset`.
Thanks,
ijs
by
Isaac Schwabacher
-
AFNI Message Board
You're welcome. It was embarrassingly hard-won knowledge. :)
ijs
by
Isaac Schwabacher
-
AFNI Message Board
No, but that's not the problem. The issue is when you use that result to index into the array:
$ 3dmaskdump -index -xyz -ibox 123 118 58 \
> -ibox 123 119 59 \
> -ibox 124 119 59 ~/abin/MNI152_T1_2009c+tlrc
++ 3dmaskdump: AFNI version=AFNI_2011_12_21_1014 (May 13 2015) [64-bit]
++ 8530021 voxels in the entire dataset (no mask)
++ 3 v
by
Isaac Schwabacher
-
AFNI Message Board
No, I mean that if you go to the voxel that MATLAB says is (68, 33, 52), then MATLAB will say that that voxel's global index in the dataset is 372560. If you navigate to the same voxel (i.e., the same location in the dataset) in AFNI, the global index will be 372559 and the ijk-coordinates will be (67, 32, 51). The voxel at AFNI global index 372560 is actually the neighbor of the original
by
Isaac Schwabacher
-
AFNI Message Board
I was confused by that at first, too, but the first indices match because the global index is also off by one.
by
Isaac Schwabacher
-
AFNI Message Board
The issue is that MATLAB indices start at 1, while AFNI indices start at 0. So when addressing the entire brick with a single index, MATLAB index 372560 is the same voxel as AFNI index 372559, and the MATLAB voxel is at (68, 33, 52) while the AFNI voxel is at (67, 32, 51).
Although it's not the source of your current confusion, another thing to be aware of if you're using software o
by
Isaac Schwabacher
-
AFNI Message Board
Here's a bash snippet that might enlighten (comments included for tcsh-ers):
labels=(even odd) # define array
N=${#labels[@]} # length of array
# $(...) is command substitution; $((...)) is arithmetic
for i in $(seq 0 $((N-1))); do
# ${array} is array access
3dTcat -prefix fred.${labels} "fred+orig[$i..\$(N)]"
done
3dTcat -prefix fred.recon \
$(for i in $
by
Isaac Schwabacher
-
AFNI Message Board
It's a C-ism. "!" means "not", and "!=" means "does not equal". It's complaining that you gave it in input file with 1469 time points, but the sum of the run lengths is 1499. I'd guess you stripped 5 TRs from the beginning of each run, but 1d_tool.py hasn't been informed of that.
by
Isaac Schwabacher
-
AFNI Message Board
You can do it by extracting the cubic column(s) from an xmat.1D file created with 3dDeconvolve -polort 3 -x1D_stop and adding that as a -ortvec to a 3dDeconvolve -polort 1, though there's probably an easier way. I'm not convinced it's a good idea, though, since it effectively amounts to assuming that the inflection point of your scanner's drift occurred halfway through each r
by
Isaac Schwabacher
-
AFNI Message Board
If you want to blur by a certain amount, à la 3dBlurInMask, you can just use 3dmerge -1filter_expr RMM EXPR -1fmask MASK and enter the filter manually (though this will behave slightly differently from 3dBlurInMask with respect to concavities in the mask; you can mitigate this by dividing the FWHM by \sqrt N and repeating N times).
If you want to blur to a given smoothness, say FWHM_x < FWH
by
Isaac Schwabacher
-
AFNI Message Board
Huh. It seems to be taking me two tries to flush it, which I can't explain. But try this:
afni -yesplugouts | grep --line-buffered 'RAI xyz' | tee coords.txt&
{
echo GETENV bogus
while :; do
read -n1 -r -p $'\nPress "q" to quit or any other key to dump coordinates\n' 1>&2
if [ "$REPLY" == q ]; then
by
Isaac Schwabacher
-
AFNI Message Board
There are two things going wrong here. One of them is that I screwed up and gave you a program that works with GNU sed but fails with BSD sed (Are you by any chance using OS X?). I think you can fix that by adding a $ immediately before each opening single quote, so that the escapes are interpreted by the shell instead of by sed:
$ cat testdrive_afni.bash
#!/bin/bash
afni -yesplugouts &quo
by
Isaac Schwabacher
-
AFNI Message Board
I tried to get this to work at one point, and IIRC the problem is that instead of sending the output back over the connection from afni to plugout_drive, afni just sends the output to its own stdout... which is cluttered with other information. So you have to a) pipe the output of afni, not of plugout_drive, and b) do some work to filter out the part of the afni output that you don't want.
by
Isaac Schwabacher
-
AFNI Message Board
Hi Matilde,
I'm not an expert, but I can tell you that this isn't going to work the way you want it to. The problem with trying to use 3dGroupInCorr with each subject in his/her own space is not just that the seeds will be in different places for different subjects, but that each subject's correlation map will be in that subject's space as well. 3dGroupInCorr needs to be
by
Isaac Schwabacher
-
AFNI Message Board
You can switch to a different dataset, then go to Define Datamode -> Misc -> Purge Memory, then switch back and it will reload. Datasets that are in use don't get purged, so if you have lots of controllers open you have to make sure to switch away from it in all of them (even IIRC if, for instance, See Overlay is turned off).
ijs
by
Isaac Schwabacher
-
AFNI Message Board