You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/ecf.rst
+84-1Lines changed: 84 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -257,6 +257,89 @@ In short this weights each pixel, :math:`i`, within a slope following :math:`w_i
257
257
``custom``: As with default, except a custom SNR to :math:`P` lookup table can be defined through the ``default_ramp_fit_custom_snr_bounds`` and ``default_ramp_fit_custom_exponents`` (see example .ecf file).
258
258
259
259
260
+
261
+
Stages 1/3/4 Optimizer
262
+
----------------------
263
+
This tool allows users to optimize the parameter values of Stages 1, 3, and 4 by performing a parametric sweep over a specified set of parameter values and evaluating the resulting spectra with a user-defined weighting of the fitness function. The optimizer starts with an intial run of a stage using the default parameter values, performs a sweep over the specified parameter values, and then completes a final run with the best parameter values from the sweep.
264
+
265
+
The fitness function is a weighted combination of the 2D MAD and the white light curve MAD. The optimizer will generate a plot showing how the fitness function improves with each parameter sweep. In the rare event that the final fitness value is worse than the initial value, users should consider trying smaller step sizes or a different set of parameter values that include the default parameter values.
266
+
267
+
**Important Warning:** The optimizer is designed as a tool for parameter exploration and fine-tuning, not as a black-box solution. Users must critically investigate all outputs before and after optimization to ensure the final tunings are appropriate and scientifically valid. The fitness metric is inherently imperfect and may lead to undesirable outcomes in complex scenarios, such as observations affected by nearby binary stars or other astrophysical contaminants. Always review the spectra from different parameter values in the sweep to understand their impact, and remember that optimal parameter values can vary significantly between datasets. Thus, re-running the optimizer for each new dataset is recommended.
268
+
269
+
scaling_MAD_spec
270
+
''''''''''''''''
271
+
Scaling factor applied to the pixel-level 2D Median Absolute Difference (MAD) value in the fitness function. Higher values prioritize spectral quality.
272
+
273
+
scaling_MAD_white
274
+
'''''''''''''''''
275
+
Scaling factor applied to the white light curve MAD value in the fitness function. Higher values prioritize band-integrated quality.
276
+
277
+
params_to_optimize_s1
278
+
''''''''''''''''''''''
279
+
List of parameters to optimize in Stage 1. Commenting out this line will use all single parameters. Single parameter options: jump_rejection_threshold, expand_mask, bg_deg, bg_method, p3thresh, window_len. Double parameter options: any combination of the above, joined by two underscores (e.g., expand_mask__p3thresh). Example:
List of parameters to optimize in Stage 3. Commenting out this line will use all single parameters. Single parameter options: dqmask, bg_deg, bg_thresh, bg_hw, bg_method, p3thresh, spec_hw, median_thresh, window_len, p7thresh. Double parameter options: any combination of the above, joined by two underscores (e.g., bg_hw__p3thresh). Special cases: spec_hw__bg_hw (requires spec_hw < bg_hw). Recommended parameters:
List of parameters to optimize in Stage 4. Single parameter options: mad_sigma, mad_box_width, sigma, box_width. Double parameter options: mad_sigma__mad_box_width, sigma__box_width. Recommended parameters:
Set of parameter values to optimize. Only specify if overriding the default values in the meta Python files. For single parameters, use any of the following formats:
Set of parameter values to optimize. Only specify if overriding the default values in the meta Python files. For double parameters, use the following format:
Sets how many plots should be saved during optimization. Can generate none (0), few (1), some (3), or many (5) figures (Options: 1 - 5).
323
+
324
+
delete_final
325
+
''''''''''''
326
+
If True, intermediate directories will be deleted after the optimizer finishes. Outputs from the optimizer's final run remain in the usual output location. Set to ``False`` if you want to retain all trial outputs for
327
+
inspection or debugging.
328
+
329
+
delete_intermediate
330
+
'''''''''''''''''''
331
+
If True, intermediate directories will be deleted after each optimization step. Outputs from the optimizer's final run remain in the usual output location. This may be useful for Stage 1 optimization since the outputs can be quite large. For Stage 3 optimization, this can usually be set to ``False``.
332
+
333
+
verbose
334
+
'''''''
335
+
If True, more details will be printed about steps in the optimization process.
336
+
337
+
hide_plots
338
+
''''''''''
339
+
If True, plots will automatically be closed rather than popping up on the screen.
340
+
341
+
342
+
260
343
Stage 2
261
344
-------
262
345
@@ -727,7 +810,7 @@ Optional. The path to a file that contains the time array you want to use instea
0 commit comments