Skip to content

Commit

Permalink
added tags, see #810
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoostenveld committed Sep 24, 2024
1 parent bf16f25 commit a139ebd
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 30 deletions.
2 changes: 1 addition & 1 deletion faq/can_i_organize_my_own_workshop.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Can I organize my own FieldTrip workshop?
tags: [workshop]
tags: [faq, workshop]
---

# Can I organize my own FieldTrip workshop?
Expand Down
1 change: 1 addition & 0 deletions faq/how_can_i_distribute_a_batch_of_jobs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: How can I distribute a batch of jobs?
tags: [faq, distcomp]
---

# How can I distribute a batch of jobs?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: How can I map source locations onto an anatomical label in an atlas?
tags: [source, interpolate, atlas, label]
tags: [faq, source, interpolate, atlas, label]
---

# How can I map source locations onto an anatomical label in an atlas?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ You can also pass it as a general option to all functions like this:
global ft_default
ft_default.showcallinfo = 'no';

The configuration options in the `ft_default` global variable are (in general) on startup of each FieldTrip function merged with the cfg options that you pass to that function.
The configuration options in the `ft_default` global variable are (in general) on startup of each FieldTrip function merged with the configuration options that you pass to that function.

Of course you can add this general setting to your startup.m file so that you don't have to type it each time that you start MATLAB.
Of course you can add this general setting to your `startup.m` file so that you don't have to type it each time that you start MATLAB.

\*) Note that the memory estimate is currently not yet available on windows.
\*) Note that the memory estimate is currently not yet available on Windows.
2 changes: 1 addition & 1 deletion faq/how_does_ft_prepare_neighbours_work.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: How does ft_prepare_neighbours work?
tags: [statistics, cluster]
tags: [faq, statistics, cluster]
---

# How does ft_prepare_neighbours work?
Expand Down
31 changes: 17 additions & 14 deletions faq/how_many_lines_of_code_does_fieldtrip_consist_of.md
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 |
1 change: 1 addition & 0 deletions faq/timefreqtradeoff.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: What is meant by time-frequency trade off?
tags: [faq, freq]
---

# What is meant by time-frequency trade-off?
Expand Down
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)
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.

0 comments on commit a139ebd

Please sign in to comment.