🤖 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:
PreClusterMethod — insert a row with precluster_method = 'dredge' (+ description).
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.)
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
🤖 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:The key is
precluster_methodand the value isparams.precluster_methodis a free-textvarchar(16)(+pipeline_ephys_element/PreClusterMethod.m), so'dredge'is valid and matchesconfig.preproc_tools['dredge']on the compute side.Required DataJoint inserts (data, not schema)
To make DREDge selectable for a recording:
PreClusterMethod— insert a row withprecluster_method = 'dredge'(+ description).PreClusterParamSet— insert a paramset withprecluster_method = 'dredge'and aparamsJSON, e.g.:{"preset": "dredge_ap", "motion_kwargs": {}, "n_jobs": 1}presetandmotion_kwargsare optional; the compute side defaultspresettodredge_ap.)PreClusterParamSteps/.Step— a step referencing the new paramset, for the relevantpreprocess_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
'dredge'PreClusterMethodrow existsPreClusterParamSetfor DREDge exists and is referenced by aPreClusterParamStepsentryLinks