mouseportal_config#

Pure (Qt-free) helpers for editing/validating the MousePortal config block.

Kept separate from the Qt widget so the assemble/validate logic can be unit tested headlessly. The widget (mouseportal_controller.py) is a thin binding over these functions; persistence goes through ExperimentConfig.update_mouseportal.

The block shape mirrors MousePortal’s own config (see mouseportal.config): {window, fog, experiment} where experiment is {num_blocks, trials_per_block, iti_duration, trial_end_condition, trial_duration, trial_distance, conditions[], block_conditions[]}.

mesofield.gui.mouseportal_config.summarize_experiment(block)[source]#

One/two-line human summary of the experiment for status panels.

Parameters:

block (Dict[str, Any])

Return type:

str

mesofield.gui.mouseportal_config.parse_block_sequences(text)[source]#

Parse one-block-per-line, comma-separated labels into block_conditions.

Parameters:

text (str)

Return type:

List[Dict[str, List[str]]]

mesofield.gui.mouseportal_config.format_block_sequences(block_conditions)[source]#

Render block_conditions back to the one-line-per-block text form.

Parameters:

block_conditions (List[Dict[str, Any]])

Return type:

str

mesofield.gui.mouseportal_config.validate_block(block)[source]#

Return a list of human-readable problems (empty == valid).

Mirrors MousePortal’s ExperimentConfig validation plus cross-checks that block sequences reference defined conditions.

Parameters:

block (Dict[str, Any])

Return type:

List[str]