|
16 | 16 |
|
17 | 17 | Files created inside that folder: |
18 | 18 | - <prefix>_Ipixel.csv (pixel, ADC, Ipixel) |
19 | | - - <prefix>_interpolated_sample.csv (high-res sampled interpolation) |
20 | | - - <prefix>_plot.png (ADC + Ipixel plot with interpolation overlay) |
| 19 | + - <prefix>_interpolated_sample.csv (high-res sampled regression) |
| 20 | + - <prefix>_plot.png (ADC + Ipixel plot with regression overlay) |
21 | 21 | - <prefix>_interpolator.pkl (pickled interpolator object, optional) |
22 | 22 |
|
23 | 23 | Usage: |
@@ -162,14 +162,14 @@ def format_ctime_for_name(path: Path) -> str: |
162 | 162 | return dt.strftime("%Y%m%d_%H%M%S") |
163 | 163 |
|
164 | 164 | def main(): |
165 | | - parser = argparse.ArgumentParser(description="Open a .dat file via dialog and produce intensity + interpolation outputs in a new timestamped folder.") |
| 165 | + parser = argparse.ArgumentParser(description="Open a .dat file via dialog and produce intensity + regression outputs in a new timestamped folder.") |
166 | 166 | parser.add_argument("infile", nargs="?", default=None, help="optional path to .dat file (if omitted, a file dialog will open)") |
167 | | - parser.add_argument("--interp", choices=["spline","cubic","linear"], default="spline", help="interpolation method for overlay and sampled CSV") |
| 167 | + parser.add_argument("--interp", choices=["spline","cubic","linear"], default="spline", help="regression method for overlay and sampled CSV") |
168 | 168 | parser.add_argument("--dark-method", choices=["median","mean"], default="median", help="how to estimate ADC_dark") |
169 | 169 | parser.add_argument("--samples", type=int, default=10000, help="number of points to sample the interpolated function") |
170 | 170 | parser.add_argument("--smooth", type=float, default=0.2, help="smoothing multiplier for spline (larger -> smoother). Default 0.2") |
171 | 171 | # Default smooths: keep only the weaker values (remove 0.1 and 0.2 as requested) |
172 | | - parser.add_argument("--smooths", type=str, default="0.01,0.02,0.05", help="comma-separated list of smoothing multipliers to plot multiple interpolations (e.g. '0.01,0.02,0.05')") |
| 172 | + parser.add_argument("--smooths", type=str, default="0.01,0.02,0.05", help="comma-separated list of smoothing multipliers to plot multiple regressions (e.g. '0.01,0.02,0.05')") |
173 | 173 | parser.add_argument("--linewidth", type=float, default=0.6, help="default line width for PNG output (thin lines)") |
174 | 174 | args = parser.parse_args() |
175 | 175 |
|
@@ -225,7 +225,7 @@ def main(): |
225 | 225 | # Prepare sampling grid |
226 | 226 | xs = np.linspace(pixels.min(), pixels.max(), max(1000, args.samples)) |
227 | 227 |
|
228 | | - # Parse multi-smoothing values for plotting several interpolation strengths |
| 228 | + # Parse multi-smoothing values for plotting several regression strengths |
229 | 229 | try: |
230 | 230 | smooth_values = [float(s.strip()) for s in str(args.smooths).split(",") if s.strip()] |
231 | 231 | except Exception: |
@@ -263,7 +263,7 @@ def main(): |
263 | 263 | ax1.grid(True, alpha=0.3) |
264 | 264 |
|
265 | 265 | # Bottom: interpolated / smoothed (separate plot). Plot multiple curves with different smoothing strengths. |
266 | | - # Plot a very faint original Ipixel trace in the interpolation panel for reference |
| 266 | + # Plot a very faint original Ipixel trace in the regression panel for reference |
267 | 267 | orig_on_xs = np.interp(xs, pixels, intensities) |
268 | 268 | # Slightly more visible raw trace for reference |
269 | 269 | ax2.plot(xs, orig_on_xs, color="gray", lw=0.8, alpha=0.28, label="raw Ipixel (faint)") |
|
0 commit comments