Skip to content

Enable DREDge preprocessing via DataJoint param inserts (no code change) #94

Description

@tabedzki

🤖 AI text below 🤖

Summary

Companion to BrainCOGS/BrainCogsEphysSorters#5 (and issue BrainCOGS/BrainCogsEphysSorters#4), which adds DREDge motion correction as an opt-in preprocessing tool alongside CatGT.

No code change is needed in this repo. The preprocess parameter JSON is built directly from the DataJoint param tables in recording_process_handler.py:

preparams_df['preparams'] = preparams_df.apply(
    lambda x : {x['precluster_method']: x['params']}, axis=1)

The key is precluster_method and the value is params. precluster_method is a free-text varchar(16) (+pipeline_ephys_element/PreClusterMethod.m), so 'dredge' is valid and matches config.preproc_tools['dredge'] on the compute side.

Required DataJoint inserts (data, not schema)

To make DREDge selectable for a recording:

  1. PreClusterMethod — insert a row with precluster_method = 'dredge' (+ description).
  2. PreClusterParamSet — insert a paramset with precluster_method = 'dredge' and a params JSON, e.g.:
    {"preset": "dredge_ap", "motion_kwargs": {}, "n_jobs": 1}
    (preset and motion_kwargs are optional; the compute side defaults preset to dredge_ap.)
  3. PreClusterParamSteps / .Step — a step referencing the new paramset, for the relevant preprocess_param_steps_id.

Use DREDge instead of CatGT in a given step list (it's the CatGT alternative). When DREDge is present, the compute side automatically disables the sorter's internal drift correction.

Acceptance

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions