Skip to content

Additional on Microlensing observables + PDF vetting report + Harris+2026 citation - #34

Merged
eagnespuerto merged 1 commit into
mainfrom
major-update-microlensing
Aug 10, 2026
Merged

Additional on Microlensing observables + PDF vetting report + Harris+2026 citation#34
eagnespuerto merged 1 commit into
mainfrom
major-update-microlensing

Conversation

@eagnespuerto

Copy link
Copy Markdown
Owner

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

  • 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).

Done with the aid of Claude Code. Ideas are purely human but implementation is machine-assisted.

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>
@eagnespuerto
eagnespuerto merged commit d402324 into main Aug 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant