FEM headmodel batch scripting

  1. I just wanted to confirm with you that passing the channel file path to the loop is correct, right?

No, you can't pass the channel file, you can only provide a "data" file. You need to have some recordings imported in your subject in order to use the pipeline editor to compute a head model.
You probably already noticed that calling process_headmodel with sFiles = []; doesn't work... You can only execute from a script what you can execute from the GUI. And selecting the process "Sources > Compute head model" with the Process1 empty shows an error in the pipeline editor.

WARNING: You are using AMG without SuperLU! Please consider installing SuperLU, or set the usesuperlu flag to false to suppress this warning. How much faster would it be if I installed SuperLU? Is there a tutorial from Brainstorm that guides me to set SuperLu for DUNE in this case?

@tmedani @juangpc ?

In the anatomy files, each subject has tess_cortex_pial_high and tess_cortex_pial_low , shall I activate the higher one before computing headmodel for better result?

If the default 15000-vertex surface looks insufficiently sampled to you, you can try downsampling again the high-resolution surface to something higher. But 240000 sources looks like a crazy overkill.
This is EEG source estimation: don't expect to get a spatial precision much higher than a few centimeters.