What's In My Image

The exploration tool for the science in your image. Load a plate-solved astronomical image (or let SASpro solve it), define a search region, and WIMI queries SIMBAD, Vizier, MAST, your local Gaia DR3 library, and a local minor-body catalog to identify every object in the field — galaxies, stars, planetary nebulae, HII regions, asteroids, comets, HST footprints, SDSS spectroscopic redshifts, GLADE+ distances, and the rest. Then the real science starts: a 3D distance model that places every object in RA/Dec/distance space on the image plane, a Hertzsprung-Russell diagram built from Gaia XP synthetic photometry with Curtis 2020 Teff, a collage of 128×128 cutouts of every object labeled with its physical properties, and 14-column results tree with per-object SIMBAD lookup, Aladin, AstroBin and NED links on right-click.
Three pillars of exploration. First: identify what's in your frame via five independent databases, deduplicated and merged. Second: visualize the geometry in 3D — see how the foreground stars sit against the background galaxies in your image plane, in light-years. Third: plot the physics — a real H-R diagram of every star in your field, built from Gaia XP spectra when they're available (B/V synthesized from Johnson filter curves; Teff from blackbody fits to the XP continuum or the Gaia-native Curtis 2020 BP-RP relation). This isn't a cataloging tool. It's a bridge from your image to the published science.

1. The three-panel layout

2. Loading an image

Three paths in:

WIMI looks for a WCS solution in this order: (1) wcs_header in the document metadata if a solver has already written one; (2) original_header if it contains valid WCS keywords; (3) for XISF files, a reconstructed FITS header built from the FITSKeywords and LinearTransformationMatrix blocks; (4) finally — auto-solve via the shared plate solver (ASTAP first with any seed data, then Astrometry.net blind). The Force Blind Solve button in Settings always does step 4 regardless.

No usable WCS, no science. SIMBAD queries, markers, measurements, 3D model, H-R diagram, minor-body search — all of it depends on being able to map pixels to sky coordinates. If auto-solve fails, SASpro says so and asks you to solve manually. A header with WCS keywords that fails sanity checks (missing CTYPE, SIP coefficients without matching orders, non-numeric values from a bad card parse) gets sanitized where possible or stripped of SIP if the distortion polynomial is inconsistent.

3. Defining a search region

Shift+click and drag in the main preview to define the search circle. The status bar shows center RA/Dec and radius in arcminutes as you draw. Shift+click again to redraw. This circle is what SIMBAD, Vizier, MAST, Gaia, and the minor-body search all use when "defined region" is selected. "Search Entire Image" ignores the circle and runs the query against a radius that reaches from the image center to the corner (so the whole field is covered, including edge objects).

4. SIMBAD identification

The Query SIMBAD button runs a two-step lookup against the SIMBAD TAP service at Strasbourg:

  1. A TAP query on BASIC returning RA, Dec, main_id, redshift, OTYPE, and major/minor axis + position angle for every object within the search circle. OTYPE filtering happens client-side against the Advanced Search tree selection.
  2. A second sim-sam query fired only against the subset classified as stars or binaries, pulling Johnson B and V flux, parallax, and spectral type. This is why star identification feels richer than galaxy identification in the results — stars get full stellar parameters appended.

Network failures retry up to 5 times with 1-second backoff. If all five fail you get a clear dialog pointing at your network, VPN, or firewall rather than a silent empty tree.

Oriented ellipse markers. For every SIMBAD object with major axis + minor axis + position angle (galdim_majaxis, galdim_minaxis, galdim_angle), WIMI draws a proper oriented ellipse at the sky position angle, converted through the WCS so image rotation, flip and parity are all handled. A circular galaxy stays circular; an edge-on spiral at PA = 42° shows the correct 42° on your image regardless of what your rotator was doing. Objects without PA data fall back to a fixed screen-space circle (6 pixel radius, cosmetic — same visible size no matter how far you zoom in).

5. The Advanced Search panel

OTYPE filter tree, 13 hierarchical categories expand into individual SIMBAD type codes. Each category has a swatch color that becomes the marker color on the image:

Click Legend to edit any category color — the swatch and all its markers update immediately. Use Toggle All / Save List… / Load List… to persist your preferred filter sets as JSON files — share them between workstations or with collaborators.

The Augment with local Gaia DR3 checkbox adds Gaia sources from your installed astrometric library (see Gaia DR3 Library docs) that SIMBAD doesn't return. Essential for faint fields where most of what you imaged isn't in SIMBAD. A 10″ cKDTree dedup in tangent-plane arcsec filters collisions with SIMBAD results. Local Gaia carries no color photometry (only G + parallax from the astrometric band), so these sources are flagged GaiaLocal and skipped by the H-R diagram when color is required.

6. Minor Planets & Comets

WIMI ships with a local SQLite catalog of 1.4M+ asteroids and ~4,000 comets. First-run flow:

  1. Click Download Catalog — automatic download from the SetiAstro mirror (~350 MB). The ▾ menu offers Force Re-download, Install from Local File (for macOS Python builds that hit SSL cert errors), and Open Download Page in Browser.
  2. Set H limits — absolute magnitude cuts for asteroids and comets. Default: H ≤ 20 for asteroids, H ≤ 15 for comets. Lower limit = more objects, slower search.
  3. Set Max counts — ceiling on how many of each kind to compute. Even with H limits, you can cap it.
  4. (Optional) Target — type a designation like "584" or a name like "Semiramis" or "C/2023 A3" to search for that one object specifically. Bypasses the H and count limits.
  5. (Optional) Time offset (hours) — applied to observation time before computing ephemerides. Useful for sub-exposure midpoints or for scanning positions ±1 hour either side of the frame to see if an asteroid is drifting through.
  6. Click Count Objects Brighter Than Limits to see how many are in the global catalog at your current H settings before you run a search.
  7. Click Search Minor Bodies.
Where does the observation time come from? WIMI reads DATE-OBS (+ optional TIME-OBS), then MJD-OBS, then JD, from the FITS header. If none are present, it prompts you with a date/time picker and a timezone selector pre-filled from your system locale. The entered time is converted to UTC and used as the Skyfield reference epoch. Minor-body positions are propagated to that instant from the catalog's orbital elements, so what shows up on your image is where the object actually was when the shutter was open.

Minor-body markers are drawn in the same categorical scheme as everything else. Double-clicking or right-click → Open Website on a minor body opens the gorgeous 3d-asteroids.space page for that object (asteroids and comets go to different URL subpaths; WIMI picks the right one from the catalog kind).

7. Deep Vizier Search

The Caution — Deep Vizier Search button queries 12 catalogs in a strict priority order, keeping the first useful entry per RA/Dec and letting SDSS DR12 override Pan-STARRS when both have the same source:

  1. Spectroscopic redshift surveys first (true redshifts, highest confidence): 2MRS, 6dF Galaxy Survey, SDSS DR12, 2dFGRS, GAMA DR3.
  2. Meta-catalogs and composites: GLADE+ (gravitational-wave electromagnetic followup catalog), HyperLEDA, IRAS PSCz.
  3. Photometric & astrometric: 2MASS PSC, Gaia EDR3, UCAC4, Pan-STARRS 1.

Redshift columns are auto-detected per catalog — cz in km/s gets divided by c to recover z, zhelio / zcmb / zph are used as-is. If no z is available but a Plx parallax is, that gets converted to a parsec distance instead. The results tree shows redshift and parallax in separate columns so you can tell at a glance which came from where.

8. MAST footprints

The Search M.A.S.T Database button performs an astroquery cone search against the Mikulski Archive for Space Telescopes — HST, JWST, Spitzer, TESS, GALEX, and the rest of the MAST holdings. Returns up to 100 observations, each with target name, instrument, and dataURL. Double-click a MAST row to open the archive portal centered on that observation. Useful for finding every published Hubble image that overlaps your frame before you spend a session on something that was already done at 10× your resolution.

9. The results tree

10-column sortable tree:

  1. RA / Dec — object position in decimal degrees
  2. Name — primary catalog identifier (SIMBAD main_id, Vizier designation, Gaia DR3 source_id, minor-body designation)
  3. Diameter — angular size in arcminutes (galaxies, nebulae) or N/A for stars
  4. Type — short OTYPE code
  5. Long Type — human description from the SIMBAD lookup table
  6. Redshift (z) — spectroscopic z where known, blank otherwise
  7. Parallax (mas) — Gaia or SIMBAD parallax where known
  8. Distance — adaptive unit (ly / kly / Mly / Gly / AU for minor bodies)
  9. Mag — V magnitude for stars, B as fallback

Click any column header to sort. Click a row to highlight that object's marker in green on the image. Arrow keys walk through the tree with the main preview staying in sync.

10. The right-click context menu (results tree)

Right-click any object (in the tree or on the image) for the full action set:

11. Navigation & the mini-preview

The mini-preview at the bottom-left renders the whole scene (image + markers + annotations) and overlays a green rectangle showing the current main-view viewport. Drag inside the mini-preview to scroll the main view; the green box follows. Zoom controls on the main preview toolbar: zoom in, zoom out, 1:1, fit to preview. Scrolling the wheel on the main preview also zooms.

The crosshair toggle button cycles four modes: off → thin (white single-pixel full cross) → outlined (yellow with gap in center + center dot) → gap (concentric circles at 30/60/100 px + thin crosshairs). Useful for aligning annotations, placing a text label on a specific object, or centering an object before pushing to a dedicated finder-chart tool.

12. AutoStretch

Toggle button at top-left. Applies stretch_mono_image (for grayscale) or stretch_color_image (for RGB) with target median 0.25 and no black clipping — the same stretch used by SASpro's AutoStretch tool across other dialogs. The original image data is cached on the first toggle, so turning AutoStretch off restores exactly what you loaded. View state (zoom, pan) is preserved across the toggle — the markers and viewport stay put while the image brightness swaps underneath.

13. 3D Distance Model

The headline exploration feature. Opens a Plotly interactive 3D scatter in your browser where every object with a known distance is placed in RA/Dec/distance space, with your image rendered flat as an underlying plane at the near end of the Z axis. The settings dialog offers:

What this actually shows. The foreground stars (parallax-measured, usually a few pc to a few kpc) cluster near the image plane. The background galaxies (redshift-measured, Mpc to Gpc) float far above or below depending on the scale choice. With log Z and the default aspect ratio, you can rotate the model and see the empty volume between your Milky Way foreground and the Hubble flow — the thing that's really there, that a flat image completely hides. Clicking any object in the 3D view opens its SIMBAD page. The right sidebar lists every object as a clickable link.

Minor bodies are omitted from the 3D model (their AU-scale distances don't make sense on a ly axis). Objects where both parallax and redshift are unavailable are also skipped — the Z position would be undefined.

14. H-R Diagram

A real Hertzsprung-Russell diagram of the stars in your field. The settings dialog has the most options of any WIMI dialog because the diagram is sensitive to photometric and Teff choices:

What the H-R diagram tells you. Every dot is a star in your field with usable photometry and parallax. The main sequence runs diagonally from top-left (hot blue stars) to bottom-right (cool red dwarfs). Giants branch up and to the right. White dwarfs sit alone in the bottom-left. For a globular cluster field, you'll see the main-sequence turnoff that encodes the cluster's age. For a nearby open cluster, you'll see tight sequences at the cluster distance. For a random extragalactic field, mostly foreground main-sequence stars with scatter. The rejected sources panel below the diagram lists stars dropped because their synthesized color was bluer than any real star — usually blends, bad photometry, or reddening errors you'd want to investigate before trusting them.

The 3D CMD view adds the distance dimension. Faint reference planes at round distances help orient. Rotate it to see cluster membership — a true cluster shows as a tight 2D sheet in B-V/M_V at a single Z, while field stars scatter in distance.

15. Save Collage of Objects

Export a grid of 128×128 pixel cutouts, one per object, each labeled with your choice of: Name, RA, Dec, Short Type, Long Type, Redshift, Parallax, Distance. Checkboxes let you pick which fields to show, and the vertical spacing between patches is computed from the field count so text never overlaps. Rendered by PIL as a PNG/JPEG/TIFF ready for publication, a talk, or just a personal keepsake of "look what's in this frame".

16. Annotations

Click Show Annotation Tools to reveal the annotation toolbox: Ellipse, Rectangle, Arrow, Freehand (lasso), Compass, Text, plus Color picker, Font picker, Undo, Clear, and Delete Selected.

Modifier keys drive annotation input. Ctrl+Click starts an annotation at that point (type depends on which tool is active). Alt+Click starts a celestial distance measurement — the second click completes it with a green dashed line and a label showing the angular distance in degrees:arcminutes:arcseconds. Shift+Click still draws the search circle. Hold the left mouse button on empty space to pan.

The Celestial Compass tool places a red N arrow and blue E arrow at the clicked point, computed from the WCS CD matrix determinant for parity and CROTA2 or an inferred value for orientation. A WCS sanity check verifies the arrows actually point north and east by probing 3 pixels along each arrow and checking which direction Dec/RA actually increase — if the inferred direction is wrong (which happens with unusual CD matrix combinations), the arrow is flipped automatically. So the compass is correct even when the orientation value in the header is misleading.

Push Annotated to View sends the fully annotated image back into SASpro's document system as a new view, so you can save it in any supported format, apply further processing, or push to a project. Save Annotated Image writes a PNG/JPEG/TIFF file directly (full or cropped to current viewport). Both exclude the search circle from the output.

17. Save Plate Solved FITS

Writes a FITS file with the current WCS header merged into the original. Choose 8-bit, 16-bit, or 32-bit float. Color is preserved in the correct (plane, y, x) axis order. This is the fastest way to turn a loaded JPEG with a successful blind solve into a FITS that other astronomy software can consume.

18. Community Atlas banner

Right after a successful WCS load, WIMI fetches the Seti Astro Community Atlas footprint catalog in the background. If any published image overlaps your field, a green banner appears in the left panel: "🌌 N community images overlap this field". Click View in Sky Atlas → to open the atlas at your image's center RA/Dec. Context before you publish: see who else has imaged this region, at what depth, and whether your frame adds something new.

19. Workflow recipes

First light on a new target. Load the image. Wait for auto-solve to finish (status bar). Shift+click & drag a circle around your main subject. Pick a reasonable OTYPE filter set in Advanced Search (defaults are fine). Click Query SIMBAD. The tree populates with everything in your frame. Right-click the brightest unknown → Open Website → read the SIMBAD page.
Faint-star science field. Install the Gaia DR3 astrometric library band in Settings. In WIMI's Advanced Search, check "Augment with local Gaia DR3". Run Query SIMBAD. The tree now includes thousands of Gaia DR3 sources below the SIMBAD depth, with parallax and G magnitude. Perfect for making an H-R diagram of a sparse open cluster or for computing proper-motion-aware astrometry.
Asteroid hunt tonight. Download the minor-body catalog if you haven't. Set asteroid H ≤ 18 (bright enough to actually detect at amateur apertures). Set max asteroids 50,000. Load tonight's frame — DATE-OBS gets read automatically. Click Search Minor Bodies with scope "Entire Image". Every known asteroid at your epoch pops onto the image at its ephemeris position. Compare to the actual pixels — anything suspicious that doesn't have a marker is a candidate.
Make a real H-R diagram. Install at least the Gaia XP G ≤ 15 band in Settings. Load a cluster image. Shift+click a tight circle around the cluster. Query SIMBAD with Augment with local Gaia DR3 checked. Click H-R Diagram. Pick "Blackbody fit to XP spectrum" for Teff, "Realistic" for colors. Open the HTML — the main sequence of your cluster appears as a tight band, usually offset vertically from the reference HR image by the cluster distance modulus. The 3D CMD view shows the cluster as a sheet in distance space.
Scientific collage for a paper. SIMBAD + Deep Vizier the field. Enable Show Object Names. Save Annotated Image (Full). Save Collage of Objects with Name + Distance + Type + Redshift. Save CSV. You now have four publication-ready artifacts: the annotated image, the collage, the data table, and the WCS-stamped FITS. Add a 3D Distance Model HTML as supplementary material.
Extragalactic field redshift check. Load the image. Shift+click a wide region. Click Caution — Deep Vizier Search. Sort the tree by Redshift (z) column descending. Every object with a spectroscopic z shows up at the top. The 3D Distance Model will then span cosmological distances — ideal for a wide-field "deep look" write-up.
Minor-body time-series check. Load the frame. Set a small positive Time offset (hours), say +1. Search Minor Bodies. Note the asteroid positions. Change the offset to −1 and search again. The marker shifts show the direction of orbital motion for each — useful for confirming a candidate detection by predicting where it should be in your next frame.
Already published? Watch the Community Atlas banner after plate solve. If it says "3 community images overlap this field", open the atlas and look — maybe someone's covered this same region at your telescope's depth and you can learn from their approach. Also check MAST Search to see if HST or JWST has covered it (and at what wavelength) before planning a long integration.

20. Credits

Written by Franklin Marek as part of SetiAstro Suite.

Catalogs & databases. Simbad astronomical database and VizieR catalogs operated by the Centre de Données astronomiques de Strasbourg (CDS). TAP + sim-sam queries follow the Simbad4 and VizieR protocols. Catalog roster used by Deep Vizier Search: 2MRS (Huchra et al. 2012), 6dFGS (Jones et al. 2009), SDSS DR12 (Alam et al. 2015), 2dFGRS (Colless et al. 2001), GAMA DR3 (Baldry et al. 2018), GLADE+ (Dálya et al. 2022), HyperLEDA (Makarov et al. 2014), IRAS PSCz (Saunders et al. 2000), 2MASS PSC (Skrutskie et al. 2006), Gaia EDR3 (Gaia Collaboration 2021), UCAC4 (Zacharias et al. 2013), Pan-STARRS DR1 (Chambers et al. 2016). MAST cone search via the Mikulski Archive for Space Telescopes operated by STScI.

Minor bodies. Orbital elements from the Minor Planet Center. Ephemeris propagation via Skyfield (B. Rhodes). Local SQLite catalog format and update pipeline developed for SASpro.

Gaia synthetic photometry. Johnson B/V filter curves after Bessell (1990), tabulated on a 1-Å grid. Gaia BP/RP effective passbands from the Gaia DR3 revised calibration. Color→Teff via Curtis et al. (2020) for Gaia BP-RP and Ballesteros (2012) for Johnson B-V. Blackbody fit uses standard Planck optics constants and a bounded scalar minimizer. Blackbody-color conversion follows the Tanner Helland sRGB approximation.

Image & astronomy stack. astropy (Astropy Collaboration et al.), astroquery, reproject, SEP (Barbary 2016, Bertin & Arnouts 1996), photutils, scikit-image, numpy, scipy, OpenCV, pandas. 3D plots via Plotly. Collage rendering via Pillow. Qt rendering via PyQt6 with a custom MarkerLayer graphics item for scalable marker rendering.

Reference image. The default H-R diagram background is the public-domain ESO ESA/Richard Powell schematic. The Seti Astro Community Atlas is maintained at setiastro-atlas on Backblaze B2.

Technical details

21.1. Comoving distance (ΛCDM cosmology)

For every object with a redshift z, WIMI computes a comoving distance via numerical integration of the Friedmann equation. Standard cosmology constants: H₀ = 69.6 km/s/Mpc, Ω_M = 0.286, Ω_Λ = 0.714, Ω_R from the radiation density, Ω_K the curvature closure:

\Omega_R = 4.165 \times 10^{-5} / (H_0/100)^2
\Omega_K = 1 - \Omega_M - \Omega_\Lambda - \Omega_R
a_z = 1/(1+z)

The dimensionless Hubble parameter at scale factor a:

\dot{a} = \sqrt{\Omega_K + \Omega_M/a + \Omega_R/a^2 + \Omega_\Lambda a^2}

And the comoving radial distance by direct trapezoidal integration (n = 1000 intervals):

D_{\mathrm{CMR}} = \frac{c}{H_0} \int_{a_z}^{1} \frac{da}{a \cdot \dot{a}(a)}

Final conversion from Mpc to Gly via the factor 3.262 × 10⁻³. Negative z (blueshift from peculiar motion) returns None — comoving distance isn't meaningful there, so these objects omit the distance column rather than fold the sign away with abs().

21.2. Parallax to distance and absolute magnitude

Standard astrometric distance from parallax ϖ in milliarcseconds, converted to parsecs and then to light-years:

d_{\mathrm{pc}} = 1000 / \varpi_{\mathrm{mas}}
d_{\mathrm{ly}} = d_{\mathrm{pc}} \cdot 3.2616

Absolute magnitude from apparent magnitude m and distance:

M = m - 5(\log_{10} d_{\mathrm{pc}} - 1)

Used for the H-R diagram vertical axis. Vmag comes from the catalog where available (SIMBAD) or falls back to Gaia G as approximate V. WIMI never uses the Gaia G from an XP source as its V — only catalog V — because XP-synthesized B and V come from the spectrum consistently and mixing them with catalog G would introduce zero-point offsets.

21.3. WCS orientation and parity

Image rotation is extracted from the CD matrix:

\theta = \mathrm{atan2}(-\mathrm{CD}_{1,2},\, \mathrm{CD}_{1,1})

with fallback to the PC matrix + CDELT if CD is absent. Parity (whether the image is flipped) is determined by the sign of the CD determinant:

\mathrm{det}(\mathrm{CD}) = \mathrm{CD}_{1,1}\mathrm{CD}_{2,2} - \mathrm{CD}_{1,2}\mathrm{CD}_{2,1}

Positive determinant means parity-flipped (mirror image, common for amateur refractors + diagonals); negative is normal. The Compass tool uses both values to point its arrows correctly, with a WCS probe fallback that moves 3 pixels along each candidate arrow direction and checks whether Dec actually increases (for North) or RA actually increases (for East). If the inferred direction is wrong, the arrow is flipped — the compass is always right regardless of what the header says.

Pixel scale is the mean of the two WCS pixel-plane scale factors:

\mathrm{pixscale} = \overline{|\mathrm{CD}|} \cdot 3600\ \mathrm{arcsec/px}

computed from astropy.wcs.utils.proj_plane_pixel_scales, with a CD-matrix magnitude fallback.

21.4. WCS header sanitization

Headers written by other tools (and especially headers that survived a round-trip through text pickling) sometimes have numeric values stored as strings, SIP orders missing their partner, or stray = characters leaked from bad card parsing. WIMI's _sanitize_wcs_header normalizes the header by: coercing NAXIS, A_ORDER, B_ORDER, AP_ORDER, BP_ORDER to integers; coercing CD, PC, CDELT, CRVAL, CRPIX, CROTA, EQUINOX, EPOCH, LONPOLE, LATPOLE to floats; mirroring A_ORDER to B_ORDER if only one is present; dropping all SIP coefficients (and the -SIP suffix from CTYPE) if the SIP polynomial orders are still inconsistent after mirroring. The result is a header that astropy.wcs.WCS can always load, even when distortion is quietly turned off because it was malformed.

21.5. Two-step SIMBAD query

WIMI uses two SIMBAD interfaces per query to get what SIMBAD's unified APIs don't expose cleanly:

The two sets are merged by main_id. Non-stellar objects (galaxies, nebulae, SNRs) get Step 1 metadata only. Stellar objects get both — which is why a Vega-like SIMBAD star carries a parallax, spectral type and B/V in the tree while a Virgo cluster galaxy carries only redshift and angular size. If step 2 fails, step 1 still populates and only the stellar enhancements are missing.

21.6. Deep Vizier catalog priority

Order matters because the first useful entry wins per RA/Dec key: spectroscopic surveys first (so a real z beats a photometric z), then meta-catalogs, then photometric surveys. One targeted override: SDSS DR12 replaces Pan-STARRS 1 at the same position because PS1 has photometry but no z. Redshift column auto-detection prefers cz → z → zhelio → zcmb → zph, with cz divided by c = 299792.458 km/s to recover z. Parallax from Plx is converted to parsecs if no z is available.

21.7. Local Gaia augment — tangent-plane dedup

With "Augment with local Gaia DR3" checked, WIMI pulls every Gaia source in a bounding box around the search circle (dec-aware RA span) from the local astrometric library, then filters against SIMBAD results using a cKDTree in tangent-plane arcsec:

(\Delta x, \Delta y) = ((\alpha - \alpha_c) \cos\delta_c,\; \delta - \delta_c) \cdot 3600

Any Gaia source within 10″ of any SIMBAD source is dropped (SIMBAD wins — the 10″ absorbs high-proper-motion stars drifting between J2000 and J2016 epochs). The remaining Gaia sources are added as GaiaLocal rows with parallax, G mag, and derived absolute G where parallax > 0.1 mas. A naive all-pairs loop would be O(N·M) and prohibitive for wide fields; the KDTree is O(M log N).

21.8. Minor-body ephemerides via Skyfield

The minor-body SQLite catalog contains orbital elements for ~1.4M asteroids and ~4,000 comets. For each candidate, WIMI's MinorBodyCatalog.compute_positions_astropy propagates its elements to the observation JD and returns topocentric RA/Dec. Then a cone test against the search center + radius keeps only those in the frame. The time offset from the UI is applied as a timedelta before conversion to JD, so a user-tweaked midpoint propagates to all computed positions. A background-threaded worker (MinorBodySearchWorker) runs the whole computation off the UI thread with a progress dialog.

21.9. Gaia XP synthetic photometry

Johnson B and V from an XP flux spectrum uses the ratio of filter integrals — the multiplicative zero-point cancels, so only an empirical constant anchors the color to the Johnson system:

\langle f \rangle_T = \frac{\int f(\lambda) T(\lambda)\, d\lambda}{\int T(\lambda)\, d\lambda}
B-V = -2.5 \log_{10}\left( \frac{\int f(\lambda) T_B(\lambda)\, d\lambda}{\int f(\lambda) T_V(\lambda)\, d\lambda} \right) + 0.09

The filter curves are tabulated Bessell (1990) coarsely sampled, interpolated onto a 1-Å grid spanning 3000–11000 Å. The +0.09 mag Vega offset anchors B-V to the Johnson scale (a flat spectrum reads B-V ≈ 0.09 against Bessell's curves). Trapezoidal integration via np.trapz. XP flux below zero (edge noise) is clamped to zero before integration.

Gaia BP-RP follows the same procedure with Gaia-native BP/RP effective passbands and a different anchoring offset:

BP-RP = -2.5 \log_{10}(f_{BP}/f_{RP}) + 0.05

BP-RP is preferred when available because Curtis 2020 is calibrated against it. B-V is kept as a fallback for catalog stars without XP.

21.10. Color-to-Teff relations

Two independent relations, each clamped to its calibrated domain so values outside return None:

Curtis et al. (2020) — 7th-order polynomial in Gaia (BP-RP)₀, valid 0.55 < BP-RP < 3.20 (Teff from 3070 to 6470 K, ~50 K precision):

T_{\mathrm{eff}} = \sum_{i=0}^{7} c_i \cdot (BP-RP)^i

Coefficients (ascending): −416.585, 39780.0, −84190.5, 85203.9, −48225.9, 15598.5, −2694.76, 192.865. Calibrated on dereddened BP-RP — WIMI feeds observed BP-RP so Teff is biased cool for reddened fields; no extinction handling yet.

Ballesteros (2012) — Johnson B-V to Teff, used when no BP-RP is available:

T_{\mathrm{eff}} = 4600 \left( \frac{1}{0.92(B-V) + 1.7} + \frac{1}{0.92(B-V) + 0.62} \right)

Has a pole near B-V ≈ −0.674 that inflates Teff to garbage. Clamp: −0.50 ≤ B-V ≤ 2.00, and Teff ceiling 60,000 K (hotter than any real O/WR star). Outside those bounds the function returns None and the star is dropped rather than plotted with a nonsense temperature.

21.11. Blackbody Planck fit

The best Teff estimator is a direct Planck fit to the XP continuum (restricted to 4000–8000 Å to avoid XP edge noise):

B_\lambda(T) = \frac{2hc^2}{\lambda^5} \cdot \frac{1}{\exp(hc/\lambda k T) - 1}

Both the measured flux and the model Planck are normalized to their maximum before comparison (so the fit is scale-independent), then:

T_{\mathrm{BB}} = \arg\min_T \sum_\lambda \left( f(\lambda) - B_\lambda(T) \right)^2

First a coarse grid search over T ∈ [2500, 50000] K in 500 K steps finds the broad minimum, then scipy.optimize.minimize_scalar refines within ±2000 K of that. Handles cool M dwarfs much better than color relations because the Wien peak sits inside the fitted window.

Outlier flagging: if the blackbody Teff and the color Teff disagree by more than a factor of 2, the star is marked as an outlier. Carbon stars (with strong C₂ Swan bands pulling the Planck fit cooler than the color suggests), emission-line stars, and peculiar atmospheres all trigger this:

\mathrm{outlier\ if}\ T_{\mathrm{BB}} / T_{B-V} < 0.5\ \mathrm{or}\ > 2.0

21.12. HR radius iso-lines

The gray dashed curves on the H-R diagram at R = 0.01, 0.1, 1, 10, 100, 1000 R_⊙ come from Stefan-Boltzmann:

L = R^2 \cdot (T/T_\odot)^4
M_V = 4.83 - 2.5 \log_{10} L

with M_V,⊙ = 4.83 as the Sun's absolute magnitude and T_⊙ = 5772 K. These let you read a star's size directly from the diagram: a star on the R = 10 R_⊙ line is 10× the solar radius regardless of where it sits along the main sequence or giant branch.

21.13. Spectral class from Teff; Tanner Helland sRGB

Spectral class assignment is the classical O/B/A/F/G/K/M split by Teff: O ≥ 30,000 K, B ≥ 10,000 K, A ≥ 7,500 K, F ≥ 6,000 K, G ≥ 5,200 K, K ≥ 3,700 K, M below. Each class gets a distinctive color (blue-white for O/B through orange-red for M) used in "Spectral class" color mode. "Realistic" color mode uses the Tanner Helland piecewise-approximation blackbody-to-sRGB formulas: Red is 255 for T ≤ 6600 K and drops as a power of (T−60) above; Green ramps logarithmically through G/K temperatures; Blue is 0 for T ≤ 1900 K, logarithmic from 1900 to 6600 K, and 255 above. Clamped to [0, 255] and emitted as a CSS rgb() string.

21.14. The MarkerLayer

Rather than adding thousands of individual QGraphicsItems to the scene (which collapses pan performance), WIMI uses a single MarkerLayer item that bakes every marker into one paint call. Internals:

r_{\mathrm{scene}} = r_{\mathrm{screen}} / s_{\mathrm{view}}

So a star marker looks the same size whether you're at 1:1 or zoomed in 10×.

\Delta\alpha \cos\delta = a \sin(\mathrm{PA}),\quad \Delta\delta = a \cos(\mathrm{PA})

The resulting (Δα, Δδ) is converted to pixels through wcs.world_to_pixel, and the pixel-space angle of that offset is the ellipse's image rotation.

21.15. Haversine angular distance

The Alt+Click measurement tool computes angular distance between two sky points via the haversine formula, which is numerically stable for small separations where the law-of-cosines form loses precision:

a = \sin^2(\Delta\delta/2) + \cos\delta_1 \cos\delta_2 \sin^2(\Delta\alpha/2)
c = 2 \cdot \mathrm{atan2}(\sqrt{a},\, \sqrt{1-a})

Result in degrees, formatted as D° MM' SS.ss″ for the label on the measurement line.

21.16. Community Atlas footprint test

Same algorithm as WIMS (see that doc for details). The atlas catalog.json is fetched in a background thread (3 retries, 8 s timeout each). Each entry's footprint is tested for containment of the image center via four-corner bounding box with RA wraparound at 0°/360° handled by checking whether the corner span exceeds 180°. The banner shows the count of overlapping footprints and provides a one-click link to the atlas centered on the image coordinates.