Repository navigation
Replace the RV engine with ravex - #35
Merged
Merged
Conversation
Unit, integration and end-to-end coverage of the RV contract, using independent oracles. These fail on the current engine and pipeline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add ravex as a submodule pinned to v0.1.0 and build RvFitter on it. The adapter keeps the transit epoch with omega = 0 and the SNR and SDE scale with the root of the GLS power. The sine fit gains a free offset. Fix the defects that stopped RV runs outside the engine: the undefined inject_dir, the missing MIN_MASS, the injected file pattern, star_info, the semi-major axis call, RV-only runs, the light curve load when reusing a directory and the MIN_PERIOD_SEARCH default. Refs #34 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Validate RV files fully before any other work, and run recovery in a pool. Failed scenarios are now logged and counted, and if all of them fail the cause is raised while the injected files are kept. Fit the phase properly when a mask fixes the amplitude, and explain how to get a missing ravex submodule. Refs #34 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the pool with an executor that raises if a worker dies, and save the report during the run so interruptions keep finished scenarios and progress stays visible. Load whole-number RV errors as floats, which mass masks need, and test that fit errors are formal. Refs #34 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save the rows already received and log the stop in matrix.log before re-raising, so a dead worker or Ctrl-C does not lose them. Refs #34 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add RV.MIN_PERIOD_SEARCH and RV.PERIOD_MATCH_TOLERANCE, falling back to the global search floor and a 1% match. The search floor now reaches the period grid, the lightkurve search and the recovery, replacing the fixed floor in rv.py. Save the RV report every 60 seconds instead of every 50 rows, since the row-based rewrite grew quadratically with the report size. Draw the result maps with pcolormesh on real cell edges, so log grids place cells and contours where the values are, and the last grid values are no longer merged. Apply yticks to the y axis and keep planet markers from widening the plot limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow the ravex period+fap criterion: a signal counts as found when the peak matches the injected period and its Baluev false alarm probability is below RV.FAP_THRESHOLD, 0.01 by default. ravex already computes the probability, so the search costs the same. Report it in a new last fap column, and as a new last element of the recover_signal and recover_strongest_signal tuples. A matching peak above the threshold ends the scenario, because going on would subtract the injected signal itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #34.
Replaces the RV injection and recovery engine with ravex v0.1.0, added as a git submodule at
tkmatrix/ravex. TheRV:block, theMATRIXRV methods and the output files keep working as before, except for the changes listed below.Changes for users
foundnow follows the ravexperiod+faprule: the peak must match the injected period and have a false alarm probability belowRV.FAP_THRESHOLD(0.01 by default, a value above 1 disables it).RV.MIN_PERIOD_SEARCHandRV.PERIOD_MATCH_TOLERANCE, which default to the global values.a_rv_report.csvhas a new last column,fap.recover_signalandrecover_strongest_signalreturn it as a new last tuple element.rv_err, so recovery rates can differ from earlier versions.Plot fixes
plot_resultsandplot_diffmisplaced cells and contours on log grids and merged the last two grid values. They now draw one cell per grid value.ytickswere also applied to the x axis, and planet markers could leave an empty strip at the plot edge.Known differences from ravex
inject_rv, which accounts for most of the remaining gap on the worstnb08cells. This was not tested onnb09.Setup
Git checkouts need
git submodule update --init --recursive. Do not add an unqualified PyPIravexdependency: that name belongs to an unrelated package.🤖 Generated with Claude Code