Task 1 details list single experiment IDs when multiple are selectable

The vizpike.services.units.UnitService.get_moving_bar_multi_unit_ids_at(site_id: int, spot_channel: int) method selects multi-units from a given site/channel, which may include multiple experiments. However, the task database model defined by the vizpike.orm.schemas.app.json.SortingSelectionTaskDetails class allows a single experiment per stimulus. As a result, the vizpike.cli.tasks.task_export() CLI also ends up exporting a single experiment ID in the tasks table, although the multi-units table does contain a column with the corresponding experiment's title (that works as a surrogate for the unique database ID, given the current dataset state).

Solutions

  • Modify the SortingSelectionTaskDetails model, the task creation CLI, and the task export CLI to allow multiple experiment IDs per task, or
  • Remove the experiment ID fields from SortingSelectionTaskDetails and only include those in the multi-unit table exported by the task export CLI (which is already done).