Configuration

This page describes the format of the configuration file that can be used to initialize a MultiAnalyzer object.

You can download the complete validation schema here.

Schema

MultiAnalysisConfig

MultiAnalysisConfig Model.

type

object

properties

  • version

Version

Version number of the configuration, it should be set to 2.

type

integer

  • simulation_campaign

Simulation Campaign

Path to the simulation campaign configuration file.

type

string

format

path

  • output

Output

Deprecated, use cache.path instead.

type

string

format

path

  • clear_cache

Clear Cache

Deprecated, use cache.clear instead.

type

boolean

default

false

  • cache

CacheConfig

  • simulations_filter

Simulations Filter

Optional dictionary used to filter the simulations loaded from the simulation campaign. The simulations can be filtered by any attribute used in the campaign, or by simulation_id. The syntax of the filter is the same supported by the etl.q() method, with the simulations filtered as a Pandas dataframe.


See the Jupyter notebook 01 Core transformations for more information and examples.

Example:
simulations_filter:
  ca: 1.0
  depol_stdev_mean_ratio: 0.45
  fr_scale: 0.4
  vpm_pct: 2.0

type

object

default

{}

  • simulations_filter_in_memory

Simulations Filter In Memory

Optional dictionary similar to simulations_filter, but used only with the method apply_filter() of MultiAnalyzer or SingleAnalyzer.

type

object

default

{}

  • analysis

Analysis

Dictionary of analyses configurations, where the keys are the names of the analyses.

type

object

additionalProperties

SingleAnalysisConfig

  • custom

Global Custom Parameters

Optional dict of parameters that can be used in user code.

type

object

default

{}

additionalProperties

False

CacheConfig

CacheConfig Model.

type

object

properties

  • path

Cache Path

Path to the cache folder, used to store the generated files. If the directory is not empty, its content is loaded in the cache if valid, or it’s automatically deleted.

type

string

format

path

  • clear

Cache Clear

If True, remove any existing cache. If False, reuse the existing cache if possible.

type

boolean

default

false

  • readonly

Cache Read-Only

If True, use the existing cache if possible, or raise an error. If False, use the existing cache if possible, or update it. It can be used to prevent accidental updates, or to read the same cache from multiple processes, since the lock is shared and not exclusive in this case.

type

boolean

default

false

  • skip_features

Skip features

Do not write the features files in the cache folder. It can be useful to shorten the execution time when experimenting with different parameters, since writing big DataFrames can take some time.

type

boolean

default

false

  • store_type

Store Type

Name of the format used to store the files in the cache folder (experimental).

enum

parquet, feather

default

parquet

additionalProperties

False

SingleAnalysisConfig

SingleAnalysisConfig Model.

type

object

properties

  • simulations_filter

Simulations Filter

Reserved field, it should be set only at the top level.

type

object

default

{}

  • simulations_filter_in_memory

Simulations Filter In Memory

Reserved field, it should be set only at the top level.

type

object

default

{}

  • extraction

ExtractionConfig

  • features

Features

List of features configuration dictionaries.

type

array

default

[]

items

FeaturesConfig

  • custom

Single Analysis Custom Parameters

Optional dict of parameters that can be used in user code.

type

object

default

{}

additionalProperties

False

ExtractionConfig

ExtractionConfig Model.

type

object

properties

  • report

ReportConfig

  • neuron_classes

Neuron Classes

Used to filter the neurons, it must be a dictionary with neuron class labels as keys.

type

object

default

{}

additionalProperties

NeuronClassConfig

  • limit

Limit

Optional limit to the number of extracted neurons for each neuron class. If specified and not null, the neuron are chosen randomly up to the given limit. For reproducible results, remember to init the Random Number Generator seed in numpy.

type

integer / null

  • population

Population

Node population used to filter the neurons, overridable in each neuron class.

type

string / null

  • node_set

NodeSet

Optional node_set used to filter the neurons.

type

string / null

  • node_sets_file

NodeSetsFile

Optional node_sets file used to filter the neurons.

type

string / null

  • windows

Windows

Dictionary of windows, used to decide which bounded data of the report to consider.

Alternatively, some values of the windows dict can be strings referencing other windows, using the format <report_name>.extraction.windows.<window_name>.

type

object

default

{}

additionalProperties

anyOf

type

string

WindowConfig

  • trial_steps

Trial Steps

Dictionary of trial steps referenced by the windows.

type

object

default

{}

additionalProperties

TrialStepsConfig

additionalProperties

False

ReportConfig

ReportConfig Model.

type

object

properties

  • type

Type

Type of report.

enum

spikes, soma, compartment

  • name

Name

Name of the report, needed only for soma or compartment reports.

type

string

default

‘’

additionalProperties

False

NeuronClassConfig

NeuronClassConfig Model.

type

object

properties

  • query

Query

Query dict, or list of query dicts, to be used to filter the neurons using etl.q. If this property is not specified, any additional properties will be considered as keys of the query dict.

anyOf

type

object

type

array

items

type

object

  • population

Population

Optional node population used to filter the neurons, specific to the current neuron class.

type

string / null

  • node_set

NodeSet

Optional node_set, specific to the current neuron class.

type

string / null

  • node_sets_file

NodeSetsFile

Optional node_sets file, specific to the current neuron class.

type

string / null

  • limit

Limit

Optional limit to the number of neurons, specific to the current neuron class.

type

integer / null

  • node_id

NodeId

Optional list of numeric node ids that will be used to filter the neurons. It should be avoided if possible, since the ids aren’t granted to remain the same in different versions of the libraries.

type

array

items

type

integer

additionalProperties

False

WindowConfig

WindowConfig Model.

type

object

properties

  • initial_offset

Initial Offset

Initial offset of the window.

type

number

default

0.0

  • bounds

Bounds

Lower and upper limits of the window, relative to the initial offset.

type

array

items

type

number

type

number

maxItems

2

minItems

2

  • t_step

T Step

Time step to consider, used only for soma and compartment reports.

type

number

default

0.0

  • n_trials

N Trials

Number of trials. If more than 1, multiple windows with the same length are generated, each one spaced:

  • by a constant amount, if trial_steps_value is specified, or

  • by a calculated amount, if trial_steps_label is specified together with a section with the same name in TrialStepsConfig.

Only one of trial_steps_value and trial_steps_label should be specified.

type

integer

default

1

  • trial_steps_value

Trial Steps Value

Constant amount of time used to space windows, considered when n_trials is greater than 1.

type

number

default

0.0

  • trial_steps_list

Trial Steps List

List of trial steps values, to be used as an alternative to trial_steps_value and n_trials`.

type

array

default

[]

items

type

number

  • trial_steps_label

Trial Steps Label

Label that should match a section in TrialStepsConfig, considered when n_trials is greater than 1.

type

string

default

‘’

  • window_type

Window Type

Optional window description that will be added to the windows DataFrame.

type

string

default

‘’

additionalProperties

False

TrialStepsConfig

TrialStepsConfig Model.

type

object

properties

  • function

Function

Name of the function that should be imported and executed to calculate the trial steps.

The function should accept the positional parameters:

  • spikes: numpy array of spikes, automatically filtered by initial_offset, bounds, and the attributes population, node_set, and limit.

  • params: dictionary of parameters defined in this section.

and it should return a float representing the dynamic offset to be added to the initial offest of the window.

type

string

  • bounds

Bounds

Lower and upper limits relative to the initial offset of window, used to filter the spikes passed to the function.

type

array

items

type

number

type

number

maxItems

2

minItems

2

  • population

Population

Optional node population used to filter the spikes, overriding the global value.

type

string / null

  • node_set

NodeSet

Optional node_set used to filter the spikes, overriding the global value.

type

string / null

  • node_sets_file

NodeSetsFile

Optional node_sets file used to filter the spikes, overriding the global value.

type

string / null

  • limit

Limit

Optional limit to the number of neurons, overriding the global value.

type

integer / null

FeaturesConfig

FeaturesConfig Model.

type

object

properties

  • type

Type

Type of computation. Valid values are:

  • multi: if the configured function produces multiple dataframes of features; features are calculated in parallel in subprocesses.

  • single: if the configured function produces a single dataframe of features; features are calculated in a single process (to be deprecated).

Using type=multi is preferred and it may speed up the performance of the calculation.

enum

single, multi

  • name

Name

Name of the features DataFrame to be created, used only in case of type=single.

type

string

  • groupby

Groupby

List of columns of the report dataframe to group by. Valid item values are:

  • simulation_id

  • circuit_id

  • window

  • trial

  • neuron_class

  • gid

type

array

items

type

string

  • function

Function

Name of the function to calculate the features, imported and executed for each group of data.

The function should accept the parameters repo, key, df, params, and it should return:

  • if type=multi, a dictionary of dataframe_name -> dataframe, that will be used to produce multiple final DataFrames.

  • if type=single, a dictionary of feature_name -> number, where each key will be a column in the final features DataFrame.

type

string

  • neuron_classes

Neuron Classes

List of neuron classes to consider, or empty to consider them all.

type

array

default

[]

items

type

string

  • windows

Windows

List of windows to consider, or empty to consider them all.

type

array

default

[]

items

type

string

  • params

Params

Optional configuration parameters that will be passed to the specified function.

type

object

default

{}

  • params_product

Params Product

Optional dict of parameters that will be used to expand the parameters passed to the function, as itertools.product from the python standard library.

type

object

default

{}

  • params_zip

Params Zip

Optional dict of parameters that will be used to expand the parameters passed to the function, as zip from the python standard library.

type

object

default

{}

  • suffix

Suffix

Suffix to be added to the features DataFrames, used only if type=multi.

A numeric suffix is automatically added when any of params_product or params_zip is specified.

type

string

default

‘’

  • multi_index

MultiIndex

  • If True, do not reset the index of the resulting DataFrames of features, and add the values specified in groupby to the MultiIndex.

  • If False, reset the index, returning columnar DataFrames.

The DataFrames with MultiIndex should use less memory then the columnar DataFrames, but they take more time to load and dump to disk.

type

boolean

default

true

additionalProperties

False

Examples

Example 01

---
# simple configuration with extraction and analysis
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [10, 70], initial_offset: 10, n_trials: 3, trial_steps_value: 10}
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bnac.calculate_features.calculate_features_multi
      params: {export_all_neurons: true}

Example 02

---
# configuration with simulations_filter and a window with trial_steps
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
simulations_filter:
  seed: 201209
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [10, 70], initial_offset: 10, n_trials: 3, trial_steps_value: 10}
        w3: {bounds: [0, 25], initial_offset: 50, trial_steps_label: ts1}
      trial_steps:
        ts1:
          function: blueetl.external.bnac.calculate_trial_step.onset_from_spikes
          bounds: [-50, 25]
          smoothing_width: 0.1
          histo_bins_per_ms: 5
          threshold_std_multiple: 4
          ms_post_offset: 1
          figures_path: "figures"
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bnac.calculate_features.calculate_features_multi
      params: {export_all_neurons: true}

Example 03

---
# configuration where neuron classes are specified using specific population and node_set
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt]}, "population": thalamus_neurons, "node_set": Excitatory}
        VPL_EXC: {query: {layer: [VPL]}, "population": thalamus_neurons, "node_set": Excitatory}
        Rt_INH: {query: {layer: [Rt]}, "population": thalamus_neurons, "node_set": Inhibitory}
        VPL_INH: {query: {layer: [VPL]}, "population": thalamus_neurons, "node_set": Inhibitory}
      limit: 1000
      population: null
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [10, 70], initial_offset: 10, n_trials: 3, trial_steps_value: 10}
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bnac.calculate_features.calculate_features_multi
      params: {export_all_neurons: true}

Example 04

---
# configuration with simulations_filter_in_memory
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
simulations_filter_in_memory:
  seed: 201209
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [10, 70], initial_offset: 10, n_trials: 3, trial_steps_value: 10}
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bnac.calculate_features.calculate_features_multi
      params: {export_all_neurons: true}

Example 05

---
# simple configuration with extraction of soma report, without features
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  soma:
    extraction:
      report:
        type: soma
        name: soma_report
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [10, 70], initial_offset: 10, t_step: 0.5}
    features:
    - type: multi
      groupby: [simulation_id, circuit_id]
      function: blueetl.external.soma.calculate_features.calculate_features_by_simulation_circuit

Example 06

---
# simple configuration with extraction of compartment report, without features
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  compartment:
    extraction:
      report:
        type: compartment
        name: section_report
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [10.0, 30.0], window_type: spontaneous}
        w2: {bounds: [10.0, 30.0], initial_offset: 1, t_step: 0.4}

Example 07

---
# simple configuration with extraction and analysis, using bluecv functions
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [10, 70], initial_offset: 10, n_trials: 3, trial_steps_value: 10}
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bluecv.neuron_class.calculate_features_by_neuron_class
      params:
        PSD: {}
        CPDF:
          params:
            bin_size: 1

Example 08

---
#  configuration with extraction of spikes and soma reports, and referenced windows
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [10, 70], initial_offset: 10, n_trials: 3, trial_steps_value: 10}
        w3: {bounds: [0, 25], initial_offset: 50, trial_steps_label: ts1}
      trial_steps:
        ts1:
          function: blueetl.external.bnac.calculate_trial_step.onset_from_spikes
          bounds: [-50, 25]
          smoothing_width: 0.1
          histo_bins_per_ms: 5
          threshold_std_multiple: 4
          ms_post_offset: 1
          figures_path: "figures"
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bnac.calculate_features.calculate_features_multi
      params: {export_all_neurons: true}
  soma:
    extraction:
      report:
        type: soma
        name: soma_report
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [20, 60], initial_offset: 10, n_trials: 3, trial_steps_value: 10}
        w9: spikes.extraction.windows.w3
    features:
    - type: multi
      groupby: [simulation_id, circuit_id]
      function: blueetl.external.soma.calculate_features.calculate_features_by_simulation_circuit

Example 09

# simple configuration with extraction and analysis, and combination of parameters
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [10, 70], initial_offset: 10, n_trials: 3, trial_steps_value: 10}
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bnac.calculate_features.calculate_features_multi
      params:
        export_all_neurons: true
      params_product:
        ratio: [0.25, 0.50, 0.75]
        nested_example:
        - params: {bin_size: 1}
        - params: {bin_size: 2}
      params_zip:
        param1: [10, 20]
        param2: [11, 21]

Example 10

---
# simple configuration with extraction and analysis, and features filtered by windows and neuron classes
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_EXC: {query: {layer: [VPL], synapse_class: [EXC]}}
        Rt_INH: {query: {layer: [Rt], synapse_class: [INH]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w2: {bounds: [10, 70], initial_offset: 10, n_trials: 3, trial_steps_value: 10}
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bnac.calculate_features.calculate_features_multi
      params: {export_all_neurons: true}
      windows: [w1]
      neuron_classes: [Rt_EXC, VPL_EXC]

Example 11

---
# simple configuration with neuron_classes defined as complex queries
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_EXC: {query: {layer: [Rt], synapse_class: [EXC]}}
        VPL_INH: {query: {layer: [VPL], synapse_class: [INH]}}
        Rt_EXC_VPL_INH: # union of Rt_EXC and VPL_INH
          query:
          - {layer: [Rt], synapse_class: [EXC]}
          - {layer: [VPL], synapse_class: [INH]}
        Rt_EXC_VPL_INH_: # same as Rt_EXC_VPL_INH, with additional filter on node_set and limit
          query:
          - {layer: [Rt], synapse_class: [EXC]}
          - {layer: [VPL], synapse_class: [INH]}
          node_set: All
          limit: 100
      limit: 1000
      population: thalamus_neurons
      node_set: null
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bnac.calculate_features.calculate_features_multi
      params: {export_all_neurons: true}

Example 12

---
# configuration using custom node_sets_file in extraction.
# node_sets_file can be defined also in one or more neuron_classes or trial_steps if needed.
version: 4
simulation_campaign: /gpfs/bbp.cscs.ch/project/proj12/NSE/blueetl/data/sim-campaign-sonata/a04addca-bda3-47d7-ad2d-c41187252a2b/config.json
cache:
  path: analysis_output
analysis:
  spikes:
    extraction:
      report:
        type: spikes
      neuron_classes:
        Rt_INH: {query: {layer: [Rt]}, "node_set": Inhibitory}
        Rt_INH_2: {"node_set": InhibitoryRt}
      limit: 1000
      population: thalamus_neurons
      node_set: null
      node_sets_file: node_sets/node_sets_01.json
      windows:
        w1: {bounds: [20, 90], window_type: spontaneous}
        w3: {bounds: [0, 25], initial_offset: 50, trial_steps_label: ts1}
      trial_steps:
        ts1:
          function: blueetl.external.bnac.calculate_trial_step.onset_from_spikes
          bounds: [-50, 25]
          smoothing_width: 0.1
          histo_bins_per_ms: 5
          threshold_std_multiple: 4
          ms_post_offset: 1
          figures_path: "figures"
    features:
    - type: multi
      groupby: [simulation_id, circuit_id, neuron_class, window]
      function: blueetl.external.bnac.calculate_features.calculate_features_multi
      params: {export_all_neurons: true}