Repository navigation
Firefly-2121: Fix Various Table Recognizer and Related UCD Issues - #2066
Open
aventura121 wants to merge 1 commit into
Open
aventura121 wants to merge 1 commit into
aventura121 wants to merge 1 commit into
Conversation
aventura121
force-pushed
the
FIREFLY-2121-ucd-fixes
branch
from
November 13, 2026 19:25
a4d878b to
aa89100
Compare
aventura121
marked this pull request as ready for review
November 13, 2026 19:52
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.
Firefly-2121 "Analyze and add test for VoCoreUtils.js and VoTableRecognizer.js"
This pull request addresses issues stemming from the recognizer hardcoding ra/dec, and the app not handling coordinates properly in several edge cases.
Description
glon/glat), no tagsWhere the branch does less than dev (7, 8), dev's result was wrong, so the branch leaves it out.
Dev mixes up the grids in four ways:
glon/glat, are read as RA/Dec (step 3).pos.eq.ra(step 4).The branch follows the tags:
glon/glatmean galactic;elon/elatmean ecliptic;ra/decand any otherlon/lat, such asobj_lon, mean RA/Dec, as on dev.sglon/sglat, supergalactic, a different grid (VoTableRecognizer.js:723). Without tags those columns aren't used; dev read them as RA/Dec.How to test
Run each step on both builds and compare:
Load the table (every step):
The Coverage tab at the top left shows
HiPS display failedon both builds: a CDS outage, not this branch.Show it on the sky (steps 1–5):
The whole sky now fills the window as an oval. The bright band is the Milky Way; each red box is a group of nearby rows, labeled with how many. < Close at the top left goes back.
Which build is right? Steps 2–8 also give an RA/Dec version of the query: the same rows, with their position as
ra/dec. Both builds read RA/Dec correctly, so it shows where the sources really are. Run it on the after build, the same way.RA/Dec tables are safe
RA/Dec tables behave as on dev: the new code only runs for a table with no RA/Dec tags. The exceptions, all deliberate:
VoTableRecognizer.js:625). A column found by its name is also skipped when its tag's first word names a different quantity (isPositionPairatVoTableRecognizer.js:698). Dev placed those rows by numbers that aren't positions. Step 4 shows one.TableAnalysis.js:446). Centering an image on the row (ActiveRowToImageWatcher.js:180) already gave none on dev for a null cell; now an empty-text cell gives none too.SearchServerCommands.java:151,:177). An RA from 0 to 360 passes through unchanged.HpxIndexCntlr.js:673). On dev, one such row makes the map build throw, and every later row is lost.ra/decnext to one tagged galactic or ecliptic pair: the tagged pair is now the position (VoTableRecognizer.js:354-355); dev tookra/decby name. The markers land in the same place when the table's two positions agree, because the tagged position is converted to RA/Dec. The region file and the TAP upload still usera/dec(TableAnalysis.js:50).flowchart TD A["getCenterColumns()<br/>VoTableRecognizer.js:503"] --> B{"CENTER_COLUMN set?<br/>:505"} B -- yes --> B1["use it"] B -- no --> C{"How many RA/Dec-tagged pairs? *<br/>:343-349"} C -- "exactly 1" --> C1["use it<br/>:344"] C -- "2 or more" --> C2["UType, then ObsCore name tie-break †<br/>:393, :412"] C -- "0" --> D{"NEW: exactly 1 galactic<br/>or ecliptic pair?<br/>:354-355"} D -- yes --> D1["use it"] D -- no --> E["UType, ObsCore names,<br/>then the name guess<br/>:393, :412, :431"] classDef new fill:#d4f4dd,stroke:#2e7d32,color:#000 classDef changed fill:#fff3cd,stroke:#b8860b,color:#000 class D,D1 new class C,E changedGreen is new, yellow is changed, and plain boxes give the same result as dev for an RA/Dec table.
* "RA/Dec-tagged" now leaves out columns tagged as an offset, an error or a drift speed (
VoTableRecognizer.js:167-168,isCoordColumnat:670, the list of such tags at:625). A pair withmeta.mainon only one column is now paired from its tags (:195-202); where dev found such a pair by its column names, the branch returns the same pair.† The tie-break now reads the grid from the tags (
:400,:423); for RA/Dec tags that is J2000, as before.1. RA/Dec tables don't change
A table with RA/Dec columns looks the same on both builds, even when it also has RA/Dec of 1900 and 1950, galactic and drift-speed columns.
Service: HEASARC
Query:
Do: load the table, then show it on the sky.
Code:
VoTableRecognizer.js:343-344: one RA/Dec-tagged pair, used before any new code runs.Validation
2. Galactic columns, tagged
A table whose position columns are tagged galactic now gets markers on the sky, where its RA/Dec version puts them; dev draws none.
Service: HEASARC
Query:
RA/Dec version:
Do: load the table, then show it on the sky.
AX J170047-4139, lands in a different box: the archive's own galactic and RA/Dec numbers for it are 31° apart.Code:
VoTableRecognizer.js:354-355,:370. 74 of the 163 longitudes are negative; the server now sends them as 0 to 360 (SearchServerCommands.java:151,:177), tested bySearchServerCommandsTest.3. Galactic names, no tags
Untagged columns named
glon/glatare now read as galactic; dev reads them as RA/Dec and draws them on empty sky.Service: HEASARC
Query (renamed columns lose their tags):
RA/Dec version:
Do: load the table, then show it on the sky.
Code:
VoTableRecognizer.js:467,:718-723.4. Drift speeds aren't positions
Columns tagged as a drift speed (
pos.pm;pos.eq.ra) are no longer taken as the position of a table without RA/Dec columns; dev piles 19 of the 22 stars into one spot.Service: HEASARC
Query:
RA/Dec version:
Do: load the table, then show it on the sky.
Code:
VoTableRecognizer.js:167-168,isCoordColumnat:670.5. Galactic table over 50,000 rows
A galactic table over 50,000 rows now gets its markers in the right place; dev's server places them by the galactic numbers read as RA/Dec, far from the Milky Way.
Service: IRSA
Query (68,222 rows):
RA/Dec version:
Do: load the table, but before you click Search, change Row Limit (next to it) from
50000to200000. Then show it on the sky.Code:
HpxIndexCntlr.js:261.6. Search SIMBAD from the row
From a galactic row, SIMBAD now searches at the star; dev searches 43° away.
Service: HEASARC
Query (one row, the star Mizar):
RA/Dec version:
Do:
Coord=in its address. The page itself shows an error during the CDS outage; only the address matters.Coord=113.11+61.58, Mizar's galactic numbers read as RA/Dec.Coord=200.98141370159107+54.92448073783569.Coord=200.9812+54.9253, 3″ from the after build's (the table roundsglon/glatto 0.01°).Code:
TableAnalysis.js:449;DefaultSearchActions.js:297,:322.7. Save as a region file
A galactic table is no longer offered as a region file; dev offers it and writes the galactic numbers under a
J2000label.Service: HEASARC
Query (the same as step 6):
RA/Dec version:
Do:
Region (.reg). If it's there, pick it, click Save, and open the saved file.Region (.reg)is offered; the file readsJ2000; color=blue, thenpoint 113.11 61.58 # 10 point=circle.Region (.reg)isn't offered.Region (.reg)is offered; the file readsJ2000; color=blue, thenpoint 200.9812 54.9253 # 10 point=circle.Code:
TableSave.jsx:120.8. Use the table as a TAP upload
A galactic table used as a TAP upload no longer gets its position columns pre-filled; dev pre-fills
glon, glat, which the search then reads as RA/Dec.Service: HEASARC
Query (the same as step 6):
RA/Dec version:
Do:
(from the uploaded table).Position Columns: glon, glat (from the uploaded table)Position Columns: Unspecified Column(s) (from the uploaded table)Position Columns: ra, dec (from the uploaded table)Code:
UploadTableSelector.jsx:375,:381;UploadTableChooser.js:200;SpatialSearch.jsx:156;DefaultSearchActions.js:231.Other changed files
TableAnalysis.js:findTableEqCenterColumns(:50) is the RA/Dec-only lookup that steps 7 and 8 use;makeWorldPtUsingCenterColumnsreturns J2000 (:81). Helpers:toNum(Point.js:248) andconvertToJ2000(VisUtil.js:151).ActiveRowToImageWatcher.js:180: centering an image on the highlighted row uses the same J2000 row position.ttFeatureWatchers.js:223,:229: Prepare Download sends only RA/Dec position columns and converts the cutout center to J2000.ServDescProducts.js:129: service-descriptor cutouts convert the row position to J2000.ObsCoreUtil.java:63: the server returns null ra/dec instead of throwing when a row has no RA/Dec position.WisePlotRequests.js:61: WISE time-series images read only RA/Dec columns; WISE tables use RA/Dec, so nothing changes.VOAnalyzer-test.jsalso tests the recognizer behind steps 1–4: "by UCD, coordinate system", "columns described as something else are not the position", and the name-guesstest.eachcases.VoCoreUtils-test.jsis new: it testsisUCDWithandfindCsysFromUCD, as the ticket asked.VoCoreUtils.jsis unchanged.