Repository navigation
fix: fits_fit creates its output directory - #120
Merged
Merged
Conversation
With PYAUTO_FAST_PLOTS=1, subplot_save returns before creating the fit's image subfolder, so fits_fit wrote fit.fits into a directory that did not exist and every model fit with visualization crashed with FileNotFoundError. Both FITS writers (dataset_1d and charge_injection) now create the folder first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With
PYAUTO_FAST_PLOTS=1,subplot_savereturns before creating the fit's image subfolder.fits_fitthen wrotefit.fitsinto a folder that didn't exist, so every model fit with visualization on crashed withFileNotFoundError. Both FITS writers now create the folder first:autocti/dataset_1d/plot/fit_plots.pyautocti/charge_injection/plot/fit_ci_plots.pyThese are the only two
writetocalls in autocti outsideinstruments/, and both model-plotter call sites go through them.Closes #119 (cti-upkeep phase 3).
API Changes
None. Output folders are now created when missing.
Tests
fits_fitwith a nested folder that doesn't exist yet. Both fail on unchanged main withFileNotFoundErrorand pass with the fix.test_autocti(serial): 277 passed.profile_release.yamlwithPYAUTO_FAST_PLOTS: "1"passes 3/3 smoke scripts throughrun_python.pyagainst this branch (about 10 s, 9 s and 26 s). The companion autocti_workspace PR follows once this merges.Tier: glance — auto-merge on green with the Witness passed (plan approved by the human 2026-11-05).
🤖 Generated with Claude Code