Additional on Microlensing observables + PDF vetting report + Harris+2026 citation - #34
Merged
Merged
Conversation
Also adds TIC + sector direct-fetch mode (parallels the transit tab's MAST input) and refactors coord- and TIC-keyed autoload to share the sector-walk + parse + pack pipeline. Observable parameters (from PSPL fit alone, no external priors): - t0 in BTJD and BJD - Einstein timescale tE with 1σ error - Impact parameter u0 with 1σ error - Intrinsic + blended peak magnification - Peak brightening in magnitudes - Einstein-crossing duration (2·tE·sqrt(1-u0²), 0 if u0>1) - Magnification FWHM (numerical inversion of A(u) = (A_peak+1)/2) - Source and blend flux fractions - μ_rel under fiducial θ_E = 0.5 mas (bulge typical) Predicted planet parameters (fiducial-lens bulge priors — M_L = 0.3 M☉, D_L = 6 kpc, D_S = 8 kpc): - θ_E from sqrt(κ·M_L·π_rel) with κ = 8.144 mas/M_sun - Physical Einstein radius r_E (AU) - Transverse relative velocity v_rel (km/s) - Closest-approach distance u0·r_E (AU) - Planet-detection floor q_min ≈ (cadence/2·tE)² and corresponding planet mass in Earth/Jupiter units for the fiducial lens Both blocks are surfaced in the classifier's results panel and included in the PDF vetting report. PDF vetting report: - New endpoint POST /api/microlensing/report (JSON in, PDF blob out) — accepts a fit result + metadata + optional base64 plot PNG, renders a reportlab-styled report matching the transit-pipeline PDF conventions (running header/footer, unified tables, verdict banner, Helvetica). - Frontend: Download PDF report button in the export toolbar. Auto- rasterises the SVG plot and attaches it if not already cached. - New file: backend/app/microlensing_report.py. TIC + sector fetch (parallels transit MAST mode): - New endpoint POST /api/microlensing/lightcurve_by_tic - Shared _fetch_and_pack_lightcurve helper de-duplicates the sector-walk + parse + quality-mask + response-pack code used by both autoload paths. - DataLoader UI adds TIC/sector inputs with List sectors + Fetch buttons, matching the transit tab's ergonomics. Bugfix: microlensing_report style-name collision. reportlab's getSampleStyleSheet already registers h1-h5 as aliases; renaming to ml_h2 / ml_small / ml_verdict. Credit for Harris, Dragomir, Bachelet, Fausnaugh & Johnson (2026), "TESS's First Bound Microlensing Planet — A Binary Microlensing Event Revealing a Planetary Companion toward the Galactic Plane", ApJL 1005 L33 (DOI 10.3847/2041-8213/ae7a50): - New SCIENCE.md §17 (observable parameters math + planet-detection floor derivation) and §18 (TESS-specific caveats informed by the paper: short single-sector baseline, 21″ pixel blending, single-band achromaticity limitation, and the standard best-practice of joint TESS + Gaia fitting via pyLIMA plus difference-image photometry). - Footer credit line in MicrolensingPanel with DOI link. - Sensitivity-floor note in compute_planet_predictions references the Harris result and TESS-only detection limits. Tests: 26 pass (13 microlensing + 13 coverage), including 3 new observables tests (Paczyński A_max match, wide-u0 edge case, response integration). Co-Authored-By: Claude Opus 4.7 <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.
Finally adds the frequently used TIC + sector direct-fetch mode (parallels the transit tab's MAST input) and refactors coord- and TIC-keyed autoload to share the sector-walk
Observable parameters (from PSPL fit alone, no external priors):
Predicted planet parameters (fiducial-lens bulge priors — M_L = 0.3 M☉, D_L = 6 kpc, D_S = 8 kpc):
Both blocks are surfaced in the classifier's results panel and included in the PDF vetting report.
PDF vetting report:
TIC + sector fetch (parallels transit MAST mode):
Bugfix: microlensing_report style-name collision. reportlab's getSampleStyleSheet already registers h1-h5 as aliases; renaming to ml_h2 / ml_small / ml_verdict.
Credit for Harris, Dragomir, Bachelet, Fausnaugh & Johnson (2026), "TESS's First Bound Microlensing Planet — A Binary Microlensing Event Revealing a Planetary Companion toward the Galactic Plane", ApJL 1005 L33 (DOI 10.3847/2041-8213/ae7a50):
Tests: 26 pass (13 microlensing + 13 coverage), including 3 new observables tests (Paczyński A_max match, wide-u0 edge case, response integration).
Done with the aid of Claude Code. Ideas are purely human but implementation is machine-assisted.