-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf16f25
commit a139ebd
Showing
9 changed files
with
41 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
faq/how_can_i_map_source_locations_between_two_different_representations.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,43 @@ | ||
--- | ||
title: How many lines of code does FieldTrip consist of? | ||
tags: [faq] | ||
tags: [faq, matlab] | ||
--- | ||
|
||
# How many lines of code does FieldTrip consist of? | ||
|
||
You can count that using the following commands | ||
|
||
roboos@mac001> cat `find . -name \*.m` | grep -v ' *%' | grep -v '^ *$' | wc -l | ||
366391 | ||
roboos@mac001> cat `find fieldtrip-20221223 -name \*.m` | grep -v ' *%' | grep -v '^ *$' | wc -l | ||
493168 | ||
|
||
or excluding the external toolboxes with | ||
|
||
roboos@mac001> cat `find . -name \*.m | grep -v external` | grep -v ' *%' | grep -v '^ *$' | wc -l | ||
187938 | ||
roboos@mac001> cat `find fieldtrip-20221223 -name \*.m | grep -v external` | grep -v ' *%' | grep -v '^ *$' | wc -l | ||
237209 | ||
|
||
So the answer is approximately 187938 lines of code, excluding comments and empty lines. | ||
So the answer is approximately 237209 lines of code, excluding comments and empty lines. | ||
|
||
To provide some historical perspective here is the number of lines in older FieldTrip releases (also only counting lines of code). | ||
|
||
| when | lines of code | | ||
| -------- | ------------- | | ||
| 2003 nov | 3441 | | ||
| 2004 jun | 11735 | | ||
| 2005 jun | 16969 | | ||
| 2005 dec | 19235 | | ||
| 2006 jun | 24410 | | ||
| 2006 dec | 27507 | | ||
| 2007 jun | 30306 | | ||
| 2007 dec | 32057 | | ||
| 2008 jun | 37963 | | ||
| 2008 dec | 66581 | | ||
| 2009 jun | 87756 | | ||
| 2009 dec | 89983 | | ||
| 2010 jun | 95049 | | ||
| 2010 dec | 92192 | | ||
| 2011 jun | 103813 | | ||
| 2011 dec | 114642 | | ||
| 2016 oct | 187938 | | ||
| 2012 dec | 125116 | | ||
| 2013 dec | 128477 | | ||
| 2014 dec | ? | | ||
| 2015 dec | ? | | ||
| 2016 dec | 184322 | | ||
| 2017 dec | 198553 | | ||
| 2018 dec | 205290 | | ||
| 2019 dec | 215759 | | ||
| 2010 dec | 226194 | | ||
| 2021 dec | 234054 | | ||
| 2022 dec | 237209 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
faq/what_are_the_different_neuromag_and_yokogawa_layouts_good_for.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
--- | ||
title: What are the different Neuromag/Elekta/Megin and Yokogawa layouts good for? | ||
tags: [faq] | ||
tags: [faq, layout, plotting] | ||
--- | ||
|
||
# What are the different Neuromag/Elekta/Megin and Yokogawa layouts good for? | ||
|
||
The Neuromag/Elekta/Megin and Yokogawa MEG systems use two different kind of sensors, gradiometers and magnetometers. Gradiometer consists of two coils, and the data recorded of such a pair reflects the gradient of the magnetic field, measured in Tesla per distance unit. In contrast, magnetometers measure the magnetic field using one coil only, resulting in a measure in Tesla. Since the two type of sensors measure in different units, data obtained from these two types of sensor cannot be easily compared directly. Therefore FieldTrip features layouts for gradiometer and magnetometer sensor positions separately, so that the user can visualize either the magnetometer data or the gradiometer data. | ||
The Neuromag/Elekta/Megin and some Yokogawa MEG systems use a combination of two different kind of sensors within one system: (planar) gradiometers and magnetometers. Gradiometer consists of two coils, and the data recorded of such a pair reflects the gradient of the magnetic field, measured in Tesla per distance unit. In contrast, magnetometers measure the magnetic field using one coil only, resulting in a measure in Tesla. Since the two type of sensors measure in different units, data obtained from these two types of sensor cannot be easily compared directly. Therefore FieldTrip features layouts for gradiometer and magnetometer sensor positions separately, so that the user can visualize either the magnetometer data or the gradiometer data. | ||
|
||
For more information, please consult the manual of the MEG system of your choice or see [Hämäläinen, Hari, Ilmoniemi, Knuutila, Lounasmaa (1993) Magnetoencephalography—theory, instrumentation, and applications to noninvasive studies of the working human brain. Rev. Mod. Phys. 65 (2), 413-497](http://rmp.aps.org/abstract/RMP/v65/i2/p413_1) |
22 changes: 14 additions & 8 deletions
22
faq/what_is_a_good_way_to_save_images_for_later_processing_in_other_software.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
--- | ||
title: What is a good way to save images for later processing in other software? | ||
tags: [faq, plotting] | ||
--- | ||
|
||
# What is a good way to save images for later processing in other software? | ||
|
||
This is a question with many possible answers. Below is a list of tips from various users/developers: | ||
Here are some tips from various users/developers: | ||
|
||
- Save in .eps format, these can be easily edited in Adobe Illustrator etc. | ||
- Save in `.eps` format, these can be easily edited in Adobe Illustrator etc. | ||
|
||
- Use the function [saveSameSize](http://www.mathworks.com/matlabcentral/fileexchange/17868-savesamesize) from the MathWorks File Exchange. This function saves the the figure like it looks on-screen. | ||
|
||
- Use the function [export_fig](http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig) from the MathWorks File Exchange for advanced saving options. | ||
|
||
- When processing an exported .eps file in Adobe Illustrator, remember the following things/bugs about MATLAB's figure export | ||
- MATLAB usually creates invisible 'boxes/objects' around plot-elements like axes, text, etc. To make it easier to work with the objects that are actually important, delete all these superfluous and invisible objects by selecting everything (ctrl+a), or selecting 'empty space' and deleting the ones that contain none of the elements that you want, or look unimportant (there are ALWAYS many of these annoying objects). A 'clean' figure is always easier for a Journal copy-editor to work with. | ||
- MATLAB usually creates white squares as background of axes, deleting these makes handling the plots a lot easier. | ||
- In a regular `plot(x,y)` figure, many additional x,y-axes are often placed on top of each other and are 'invisible' which makes foreground/background transfers problematic, delete these x,y-axes. | ||
- When plotting several lines in as `plot(x,y,etc)`, the output is usually read as a 'grouped' object by Illustrator. Ungrouping these objects (i.e. right click --> ungroup) makes handling/editing these lines much easier. | ||
- Whenever you notice that elements of plots were not exported as objects, but as horizontal bars of a bitmap image, or anything else that is weird, it is usually a MATLAB openGL bug. Doing `set(gcf,'renderer','painters')` usually fixes this. | ||
When processing an exported `.eps` file in Adobe Illustrator, remember the following things/quirks about MATLAB's figure export: | ||
|
||
- MATLAB usually creates invisible 'boxes/objects' around plot-elements like axes, text, etcetera. To make it easier to work with the objects that are actually important, delete all these superfluous and invisible objects by selecting everything (ctrl+a), or selecting 'empty space' and deleting the ones that contain none of the elements that you want, or look unimportant (there are ALWAYS many of these annoying objects). A 'clean' figure is always easier for a Journal copy-editor to work with. | ||
|
||
- MATLAB usually creates white squares as background of axes, deleting these makes handling the plots a lot easier. | ||
|
||
- In a regular `plot(x,y)` figure, many additional x,y-axes are often placed on top of each other and are 'invisible' which makes foreground/background transfers problematic, delete these x,y-axes. | ||
|
||
- When plotting several lines in as `plot(x,y,etc)`, the output is usually read as a 'grouped' object by Illustrator. Ungrouping these objects (i.e. right click --> ungroup) makes handling/editing these lines much easier. | ||
|
||
- Whenever you notice that elements of plots were not exported as objects, but as horizontal bars of a bitmap image, or anything else that is weird, it is usually a MATLAB openGL bug. Doing `set(gcf,'renderer','painters')` usually fixes this. |