Skip to content

refactor(imaging): remove the dead MATLAB code left on the imaging path - #209

Draft
vrrigs wants to merge 1 commit into
masterfrom
tabedzki/refactor/imaging-matlab-leftovers
Draft

vrrigs wants to merge 1 commit into
masterfrom
tabedzki/refactor/imaging-matlab-leftovers

Conversation

@vrrigs

@vrrigs vrrigs commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Closes #207

TiffSplit ingestion runs in Python (AcquiredTiff.make, since 6f1c52b) and suite2p runs from Python, so this removes the MATLAB code that was left on the imaging path and no longer runs.

Removed

  • AcquiredTiff.old_make in u19_pipeline/imaging_pipeline.py, and the imports only it used: subprocess, u19_pipeline.utils.dj_shortcuts and u19_pipeline.automatic_job.params_config. With that last one gone, importing imaging_pipeline no longer imports params_config.
  • u19_pipeline/automatic_job/ingest_scaninfo_shell.sh (only old_make ran it).
  • u19_matlab_dir, startup_pipeline_matlab_dir and ingest_scaninfo_script from params_config.py.
  • default_preprocessing_tool and default_matlab_ver from slurm_creator.py. Nothing in the repo used them.

Kept

  • datajoint_proj_dir and the get_root_directory() call in params_config.py, because catgt_dir / catgt_script are built from them. this_dir is kept too: the ParameterFiles, xyzPicksFiles and ChanMapFiles paths use it.
  • module load matlab/R2024a in the ephys slurm scripts, and the MATLAB references in u19_pipeline/utility.py (see the issue).

Comments

  • recording_handler.py: the two comments that said a MATLAB script handles and ingests the TiffSplits now say AcquiredTiff.make does it.
  • TiffSplit definition: the second, ordinary comment line now says the table is populated by AcquiredTiff.make. The table comment (the first # line) and all attribute lines are unchanged. DataJoint skips # lines after the first, and I checked that every definition in the file parses the same before and after (same table comment, same attribute lines).

Left for a human decision

  • Untracking SlurmFiles/slurm_real.slurm and slurm_real_spock.slurm (the optional item in the issue) is not in this PR. It also affects the deployed checkout on u19proc, so someone should check that first.

Noticed, not changed

  • catgt_dir / catgt_script in params_config.py aren't used anywhere in this repo either (ephys, not MATLAB). If they go, datajoint_proj_dir and get_root_directory() can go with them.

Checks

  • grep for old_make, ingest_scaninfo, startup_pipeline_matlab_dir, u19_matlab_dir, default_preprocessing_tool and default_matlab_ver across the repo (code, docs, notebooks, tests, .github, crontab_example) finds nothing.
  • Test suite on spock: 806 passed, 1 skipped, both on master and on this branch.
  • ruff check --select F401,F821,F811 on the four changed modules shows the same pre-existing findings before and after, with no new undefined or unused names. py_compile passes.
  • uvx prek run --all-files: only the 4 known EXE001 findings, which come from the bucket mount dropping exec bits.
  • No new test. This change only removes code that never runs, and the schema modules need a database to import.

TiffSplit ingestion moved to Python (AcquiredTiff.make) and suite2p runs
from Python, so the MATLAB leftovers no longer run:

- drop AcquiredTiff.old_make and the imports only it used (subprocess,
  dj_shortcuts, params_config)
- delete automatic_job/ingest_scaninfo_shell.sh, which only old_make ran
- drop u19_matlab_dir, startup_pipeline_matlab_dir and
  ingest_scaninfo_script from params_config (datajoint_proj_dir and
  this_dir stay: catgt_dir and the ParameterFiles/ChanMapFiles paths use
  them)
- drop the unused default_preprocessing_tool and default_matlab_ver from
  slurm_creator
- reword the comments that still said MATLAB does the TiffSplit work
  (recording_handler, and an ordinary comment line in the TiffSplit
  definition; the table comment and attributes are unchanged)

Closes #207

Assisted-by: ClaudeCode:claude-opus-5-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the dead MATLAB code left on the imaging path

2 participants