mne-tools/mne-python — pull request #454 by Eric89GXL (2013-02-12 03:54:07+00:00)
Title: ENH: Add show_fiff function

I used this function to debug an issue with reading/writing. It's basically an "enhanced" version of `mne_show_fiff()`. I figured it might be useful for others. Not extensively tested on anything other than forward solutions, but it's mostly for debugging anyway. Maybe I should make it `_show_fiff()` so users don't try to use it? (Or maybe actually add tests and try it on FIF files other than forward solutions?) Let me know what you think...

This is the type of output it produces:
```
>>> mne.fiff.show_fiff(fwd_fname, read_limit=None)
350 = FIFFB_MNE
358 = FIFFB_MNE_ENV
103 = FIFF_UNIT_PA/FIFF_BLOCK_ID (20)
3550 = FIFF_MNE_ENV_WORKING_DIR (30) = /mnt/ssds2/larsoner/data
3551 = FIFF_MNE_ENV_COMMAND_LINE (339) = mne_average_forward_solutions
353 = FIFFB_MNE_PARENT_MRI_FILE
3508 = FIFF_MNE_FILE_NAME (62) = /mnt/ssds2/larsoner/data
222 = FIFF_COORD_TRANS (104)
354 = FIFFB_MNE_PARENT_MEAS_FILE
3508 = FIFF_MNE_FILE_NAME (65) = /mnt/ssds2/larsoner/data
222 = FIFF_COORD_TRANS (104)
200 = FIFF_NCHAN (4) = [376]
x375: 203 = FIFF_CH_INFO/FIFF_UNIT_AM_M2 (96)
359 = FIFFB_MNE_BAD_CHANNELS
3507 = FIFF_MNE_CH_NAME_LIST (169) = EEG 001:EEG 002:EEG 003:EEG 00
351 = FIFFB_MNE_SOURCE_SPACE
3518 = FIFF_MNE_SOURCE_SPACE_TYPE (4) = [1]
3517 = FIFF_MNE_SOURCE_SPACE_ID (4) = [101]
410 = FIFF_SUBJ_HIS_ID (4) = W001
3506 = FIFF_MNE_COORD_FRAME (4) = [5]
3512 = FIFF_MNE_SOURCE_SPACE_NPOINTS (4) = [137956]
3510 = FIFF_MNE_SOURCE_SPACE_POINTS (1655484) = [-0.00915335 -0.06804086 -0.01 ... size=413868
3511 = FIFF_MNE_SOURCE_SPACE_NORMALS (1655484) = [ 0.30601144 -0.93414593 0.18 ... size=413868
3513 = FIFF_MNE_SOURCE_SPACE_SELECTION (551824) = [1 0 0 ..., 0 0 0] ... size=137956
3514 = FIFF_MNE_SOURCE_SPACE_NUSE (4) = [3141]
3590 = FIFF_MNE_SOURCE_SPACE_NTRI (4) = [275908]
3591 = FIFF_MNE_SOURCE_SPACE_TRIANGLES (3310908) = [ 1 2 7 ..., 137 ... size=827724
351 = FIFFB_MNE_SOURCE_SPACE
3518 = FIFF_MNE_SOURCE_SPACE_TYPE (4) = [1]
3517 = FIFF_MNE_SOURCE_SPACE_ID (4) = [102]
410 = FIFF_SUBJ_HIS_ID (4) = W001
3506 = FIFF_MNE_COORD_FRAME (4) = [5]
3512 = FIFF_MNE_SOURCE_SPACE_NPOINTS (4) = [136598]
3510 = FIFF_MNE_SOURCE_SPACE_POINTS (1639188) = [ 0.01421047 -0.06941937 -0.01 ... size=409794
3511 = FIFF_MNE_SOURCE_SPACE_NORMALS (1639188) = [ 0.18768917 -0.7944144 0.57 ... size=409794
3513 = FIFF_MNE_SOURCE_SPACE_SELECTION (546392) = [0 0 0 ..., 0 0 0] ... size=136598
3514 = FIFF_MNE_SOURCE_SPACE_NUSE (4) = [3154]
3590 = FIFF_MNE_SOURCE_SPACE_NTRI (4) = [273192]
3591 = FIFF_MNE_SOURCE_SPACE_TRIANGLES (3278316) = [ 1 2 6 ..., 136 ... size=819576
352 = FIFFB_MNE_FORWARD_SOLUTION
3522 = FIFF_MNE_INCLUDED_METHODS (4) = [1]
3506 = FIFF_MNE_COORD_FRAME (4) = [4]
3521 = FIFF_MNE_SOURCE_ORIENTATION (4) = [2]
3512 = FIFF_MNE_SOURCE_SPACE_NPOINTS (4) = [6295]
200 = FIFF_NCHAN (4) = [306]
357 = FIFFB_MNE_NAMED_MATRIX
3504 = FIFF_MNE_NROW (4) = [18885]
3505 = FIFF_MNE_NCOL (4) = [306]
3503 = FIFF_MNE_COL_NAMES (2753) = MEG 0113:MEG 0112:MEG 0111:MEG
3520 = FIFF_MNE_FORWARD_SOLUTION (23115252) = [ -6.83882608e-05 -8.88390496 ... size=5778810
352 = FIFFB_MNE_FORWARD_SOLUTION
3522 = FIFF_MNE_INCLUDED_METHODS (4) = [2]
3506 = FIFF_MNE_COORD_FRAME (4) = [4]
3521 = FIFF_MNE_SOURCE_ORIENTATION (4) = [2]
3512 = FIFF_MNE_SOURCE_SPACE_NPOINTS (4) = [6295]
200 = FIFF_NCHAN (4) = [70]
357 = FIFFB_MNE_NAMED_MATRIX
3504 = FIFF_MNE_NROW (4) = [18885]
3505 = FIFF_MNE_NCOL (4) = [70]
3503 = FIFF_MNE_COL_NAMES (559) = EEG 001:EEG 002:EEG 003:EEG 00
3520 = FIFF_MNE_FORWARD_SOLUTION (5287812) = [ 41.65768814 55.14899063 57 ... size=1321950
```