specsrbench.build.lines

Assemble a drop-in cache on the log constant-R grid: arrays, line fits, S/N.

Produces the cache directory specsrbench.data loads: the reconstructions as plain arrays, a Gaussian fit of every diagnostic line in every method, the S/N those imply, and the summary table the paper and the tests are checked against.

Two departures from the original linear-grid build, both forced by the finer grid:

  • sigma_bounds had a fixed 0.001 um floor, set when one pixel was 0.001601 um everywhere. On this grid a pixel is 0.00025 um at 1 um, and a real R=2700 grating line has sigma ~0.00016 um – below the old floor, so the HR reference’s own lines would fit at the boundary and come out systematically too wide. The floor is now half the local pixel.

  • flux_high / flux_high_err come from eval_set.npz rather than the 135 MB raw dataset, which removed figure 4’s only raw-data dependency.

The method label R-L (30 it) becomes R-L: 30 iterations is not what the retuned pipeline runs, and a label that states a wrong iteration count is worse than one that states none.

Functions

fit_gauss(x, y, mu0[, fit_halfwin, sb_gap, ...])

(amp, sigma, S/N) or (nan, nan, nan).

main([argv])

Fit every line in every reconstruction and write the summary.

specsrbench.build.lines.fit_gauss(x, y, mu0, fit_halfwin=0.25, sb_gap=0.03, sb_width=0.12, core_halfwin=0.05, sigma_hi=0.12, mu_bounds_half=0.01)[source]

(amp, sigma, S/N) or (nan, nan, nan). Lower sigma bound tracks the grid.

specsrbench.build.lines.main(argv=None)[source]

Fit every line in every reconstruction and write the summary.

Return type:

int