Spaces:
Running
Running
Deploy SPHEREx Data Explorer (Static)
Browse files- aladin_v3.js +3 -3
- explorer.html +275 -91
- full_explorer.html +0 -0
- s.py +8 -4
aladin_v3.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
(function (zA, vA) { typeof exports == "object" && typeof module < "u" ? module.exports = vA() : typeof define == "function" && define.amd ? define(vA) : (zA = typeof globalThis < "u" ? globalThis : zA || self, zA.A = vA()) })(this, function () {
|
| 2 |
-
"use strict"; const zA = "3.8.2"; let vA = function () { function B() { } return B.prototype.redraw = function (A, I, C, g) { A.lineWidth = 1, A.strokeStyle = "rgb(150,150,220)", A.beginPath(); for (var Q, E, i = 0, o = I.length; i < o; i++)Q = I[i], E = Q.ipix, A.moveTo(Q.vx[0], Q.vy[0]), A.lineTo(Q.vx[1], Q.vy[1]), A.lineTo(Q.vx[2], Q.vy[2]); A.stroke(), A.strokeStyle = "#FFDDDD", A.beginPath(); for (var i = 0, o = I.length; i < o; i++)Q = I[i], E = Q.ipix, A.strokeText(g + "/" + E, (Q.vx[0] + Q.vx[2]) / 2, (Q.vy[0] + Q.vy[2]) / 2); A.stroke() }, B }(), FA = { TAN: { id: 1, label: "Tangential" }, STG: { id: 2, label: "Stereographic" }, SIN: { id: 3, label: "Spheric" }, ZEA: { id: 4, label: "Zenital equal-area" }, MER: { id: 9, label: "Mercator" }, AIT: { id: 13, label: "Hammer-Aïtoff" }, MOL: { id: 16, label: "Mollweide" } }; const Lg = "https://alaskybis.cds.unistra.fr/cgi/JSONProxy"; class Y { static AL_USE_WASM = new Y("AL:Wasm"); static LOADING_START = new Y("AL:loading.started"); static LOADING_STOP = new Y("AL:loading.stopped"); static BACKGROUND_COLOR_CHANGED = new Y("AL:BackgroundColor.changed"); static COO_GRID_ENABLED = new Y("AL:cooGrid.enabled"); static COO_GRID_DISABLED = new Y("AL:cooGrid.disabled"); static COO_GRID_UPDATED = new Y("AL:cooGrid.updated"); static PROJECTION_CHANGED = new Y("AL:projection.changed"); static FRAME_CHANGED = new Y("AL:frame.changed"); static UPDATE_CMAP_LIST = new Y("AL:cmap.updated"); static POSITION_CHANGED = new Y("AL:position.changed"); static ZOOM_CHANGED = new Y("AL:zoom.changed"); static LAYER_ADDED = new Y("AL:Layer.added"); static LAYER_REMOVED = new Y("AL:Layer.removed"); static LAYER_SWAPPED = new Y("AL:Layer.swapped"); static LAYER_CHANGED = new Y("AL:Layer.changed"); static HIPS_CACHE_UPDATED = new Y("AL:HiPSCache.updated"); static FAVORITE_HIPS_LIST_UPDATED = new Y("AL:HiPSFavorites.updated"); static GRAPHIC_OVERLAY_LAYER_ADDED = new Y("AL:GraphicOverlayLayer.added"); static GRAPHIC_OVERLAY_LAYER_REMOVED = new Y("AL:GraphicOverlayLayer.removed"); static GRAPHIC_OVERLAY_LAYER_CHANGED = new Y("AL:GraphicOverlayLayer.changed"); static SAMP_HUB_RUNNING = new Y("AL:samp.hub"); static SAMP_CONNECTED = new Y("AL:samp.connected"); static SAMP_DISCONNECTED = new Y("AL:samp.disconnected"); static CANVAS_EVENT = new Y("AL:Event"); static RETICLE_CHANGED = new Y("AL:Reticle.changed"); static RESOURCE_FETCHED = new Y("AL:Resource.fetched"); static FETCH = new Y("AL:fetch"); static MODE = new Y("AL:mode"); static FULLSCREEN_TOGGLED = new Y("AL:fullscreen.toggled"); constructor(A) { this.name = A } dispatchedTo(A, I) { I ? A.dispatchEvent(new CustomEvent(this.name, { detail: I })) : A.dispatchEvent(new CustomEvent(this.name)) } listenedBy(A, I) { A.addEventListener(this.name, I) } remove(A, I) { A.removeEventListener(this.name, I) } } let l = {}; l.HTTPS_WHITELIST = ["alasky.u-strasbg.fr", "alaskybis.u-strasbg.fr", "alasky.unistra.fr", "alaskybis.unistra.fr", "alasky.cds.unistra.fr", "alaskybis.cds.unistra.fr", "hips.astron.nl", "jvo.nao.ac.jp", "archive.cefca.es", "cade.irap.omp.eu", "skies.esac.esa.int"], l.cssScale = void 0, l.relMouseCoords = function (B) { if (B.offsetX) return { x: B.offsetX, y: B.offsetY }; if (!l.cssScale) { var A = window.getComputedStyle(document.body, null), I = A.getPropertyValue("-webkit-transform") || A.getPropertyValue("-moz-transform") || A.getPropertyValue("-ms-transform") || A.getPropertyValue("-o-transform") || A.getPropertyValue("transform"), C = /matrix\((-?\d*\.?\d+),\s*0,\s*0,\s*(-?\d*\.?\d+),\s*0,\s*0\)/, g = I.match(C); g ? l.cssScale = parseFloat(g[1]) : l.cssScale = 1 } var Q = B, E = Q.target || Q.srcElement, i = E.currentStyle || window.getComputedStyle(E, null), o = parseInt(i.borderLeftWidth, 10), D = parseInt(i.borderTopWidth, 10), t = E.getBoundingClientRect(), e = Q.clientX, w = Q.clientY; Q && Q.changedTouches && (e = Q.changedTouches[0].clientX, w = Q.changedTouches[0].clientY); var s = e - o - t.left, c = w - D - t.top; return { x: Math.round(s / l.cssScale), y: Math.round(c / l.cssScale) } }, Function.prototype.bind || (Function.prototype.bind = function (B) { if (typeof this != "function") throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); var A = [].slice, I = A.call(arguments, 1), C = this, g = function () { }, Q = function () { return C.apply(this instanceof g ? this : B || {}, I.concat(A.call(arguments))) }; return Q.prototype = this.prototype, Q }), l.urlParam = function (B, A) { return A === void 0 && (A = location.search), decodeURIComponent((new RegExp("[?|&]" + B + "=([^&;]+?)(&|#|;|$)").exec(A) || [, ""])[1].replace(/\+/g, "%20")) || null }, l.isNumber = function (B) { return !isNaN(parseFloat(B)) && isFinite(B) }, l.isInt = function (B) { return l.isNumber(B) && Math.floor(B) === B }, l.inverseNewtonRaphson = function (B, A, I, C = 1e-6, g = 100) { let Q = .5, E = 0; for (; E < g;) { let i = A(Q); if (Math.abs(i - B) < C) return Q; let D = I(Q); Q = Q - (i - B) / D, E++ } return null }, l.binarySearch = function (B, A) { for (var I = 0, C = B.length, g; I < C;) { if (g = Math.floor((I + C) / 2), B[g] === A) return g; B[g] < A ? I = g + 1 : C = g } return I }, l.debounce = function (B, A) { var I = null; return function () { var C = this, g = arguments; clearTimeout(I), I = setTimeout(function () { B.apply(C, g) }, A) } }, l.throttle = function (B, A, I) { A || (A = 250); var C, g; return function () { var Q = I || this, E = +new Date, i = arguments; C && E < C + A ? (clearTimeout(g), g = setTimeout(function () { C = E, B.apply(Q, i) }, A)) : (C = E, B.apply(Q, i)) } }, l.detectTrackPad = function (B) { var A = !1; return B.wheelDeltaY ? B.wheelDeltaY === B.deltaY * -3 && (A = !0) : B.deltaMode === 0 && (A = !0), A }, l.LRUCache = function (B) { this._keys = [], this._items = {}, this._expires = {}, this._size = 0, this._maxsize = B || 1024 }, l.LRUCache.prototype = { set: function (B, A) { var I = this._keys, C = this._items, g = this._expires, Q = this._size, E = this._maxsize; Q >= E && (I.sort(function (i, o) { return g[i] > g[o] ? -1 : g[i] < g[o] ? 1 : 0 }), Q--), I[Q] = B, C[B] = A, g[B] = Date.now(), Q++, this._keys = I, this._items = C, this._expires = g, this._size = Q }, get: function (B) { var A = this._items[B]; return A && (this._expires[B] = Date.now()), A }, keys: function () { return this._keys } }, l.loadFromUrls = function (B, A) {
|
| 3 |
const I = A && A.data || void 0, C = A && A.timeout || 5e3, g = A && A.mode || "cors", Q = A && A.contentType || void 0, E = A && A.dataType || "text", i = A && A.desc, o = new AbortController, D = setTimeout(() => o.abort(), C); let t = B[0]; I && (t += "?" + new URLSearchParams(I)); let e = { url: t, method: "GET", mode: g, cache: "default", signal: o.signal, dataType: E, desc: i }; return Q && (e.headers = { "Content-Type": Q }), l.fetch({
|
| 4 |
...e, success: w => (clearTimeout(D), Promise.resolve(w)), error: w => {
|
| 5 |
if (B && B.length === 1) {
|
|
@@ -8,7 +8,7 @@ Message: `+ w.statusText; return Promise.reject(s)
|
|
| 8 |
} else return l.loadFromUrls(B.slice(1), A)
|
| 9 |
}
|
| 10 |
})
|
| 11 |
-
}, l.fetch = function (B) { let A; try { if (A = new URL(B.url), B.useProxy === !0 && (A = l.handleCORSNotSameOrigin(A)), B.data) for (const g in B.data) A.searchParams.append(g, B.data[g]) } catch { A = B.url } let I = new Request(A, { method: B.method || "GET", ...B }), C = { message: B.desc || "fetching: " + A, id: l.uuidv4() }; return Y.FETCH.dispatchedTo(document, { task: C }), fetch(I).then(g => B.dataType && B.dataType.includes("json") ? g.json() : B.dataType && B.dataType.includes("blob") ? g.blob() : B.dataType && B.dataType.includes("arrayBuffer") ? g.arrayBuffer() : B.dataType && B.dataType.includes("readableStream") ? Promise.resolve(g.body) : g.text()).then(g => B.success ? B.success(g) : Promise.resolve(g)).catch(g => B.error ? B.error(g) : Promise.reject(g)).finally(() => { Y.RESOURCE_FETCHED.dispatchedTo(document, { task: C }) }) }, l.on = function (B, A, I) { A.split(" ").forEach(C => { B.addEventListener(C, I) }) }, l.isTouchScreenDevice = void 0, l.hasTouchScreen = function () { if (l.isTouchScreenDevice === void 0) { let B = !1; if ("maxTouchPoints" in navigator) B = navigator.maxTouchPoints > 0; else if ("msMaxTouchPoints" in navigator) B = navigator.msMaxTouchPoints > 0; else { const A = matchMedia?.("(pointer:coarse)"); if (A?.media === "(pointer:coarse)") B = !!A.matches; else if ("orientation" in window) B = !0; else { const I = navigator.userAgent; B = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(I) || /\b(Android|Windows Phone|iPad|iPod)\b/i.test(I) } } l.isTouchScreenDevice = B } return l.isTouchScreenDevice }, l.openNewTab = function (B) { window.open(B, "_blank").focus() }, l.isFileContext = function () { return window.location.protocol === "file:" }, l.isHttpsContext = function () { return window.location.protocol === "https:" }, l.isHttpContext = function () { return window.location.protocol === "http:" }, l.fixURLForHTTPS = function (B) { return l.HTTPS_WHITELIST.some(I => B.includes(I)) ? B.replace("http://", "https://") : B }, l.isUrl = function (B) { try { return new URL(B).href } catch { return } }, l.getAbsoluteURL = function (B) { var A = document.createElement("a"); return A.href = B, A.href }, l.uuidv4 = function () { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (B) { var A = Math.random() * 16 | 0, I = B == "x" ? A : A & 3 | 8; return I.toString(16) }) }, l.clone = function (B) { return Object.assign(Object.create(Object.getPrototypeOf(B)), JSON.parse(JSON.stringify(B))) }, l.getDroppedFilesHandler = function (B) { B.preventDefault(); let A; return B.dataTransfer.items ? A = [...B.dataTransfer.items] : A = [...B.dataTransfer.files], A.filter(C => C.kind === "file").map(C => C.getAsFile()) }, l.dragOverHandler = function (B) { B.preventDefault() }, l.requestCORSIfNotSameOrigin = function (B) {
|
| 12 |
for (var A = B.length, I = 0, C = 0; C < A; C++)B[C].length > I && (I = B[C].length); for (var g = `<table>
|
| 13 |
`, C = 0; C < A; C++) {
|
| 14 |
g += "<tr>"; for (var Q = 0; Q < A; Q++)g += "<td>", C < B[C].length && (g += B[C][Q].toString()), g += "</td>"; g += `</td>
|
|
@@ -107,7 +107,7 @@ The table might contain no data for the cone search specified.`)
|
|
| 107 |
}
|
| 108 |
})); let E = document.createElement("div"); E.style.maxWidth = "100%", I[0].style.display = "block", C[0].update({ toggled: !0 }); for (let i of I) E.appendChild(i); return { layout: C, content: E }
|
| 109 |
} setScrollPosition(A) { this.scrollLeftPosition = A, this.el.querySelector(".aladin-measurement-div").scrollLeft = A } _show() { this.options.cssStyle && this.setCss(this.options.cssStyle), this.options.tooltip && wA.add(this.options.tooltip, this), super._show() } remove() { this.el.querySelector(".aladin-measurement-div").removeEventListener("scroll", this.scrollCallback), super.remove() }
|
| 110 |
-
} class cI extends V { constructor(A, I, C = "beforeend") { let g = document.createElement("div"); g.setAttribute("class", "aladin-measurement-div"); let Q = document.createElement("table"); Q.style.borderColor = A.color; const E = cI._createTableHeader(A), i = cI._createTableBody(A); Q.appendChild(E), Q.appendChild(i), g.appendChild(Q), super(g, A), this.attachTo(I, C) } static _createTableBody = function (A) { const I = document.createElement("tbody"); return A.rows.forEach(C => { let g = document.createElement("tr"); for (let Q in C.data) { let E = document.createElement("td"); if (E.classList.add(Q), A.showCallback && A.showCallback[Q]) { let i = A.showCallback[Q], o = i(C.data); o instanceof Element ? E.appendChild(o) : E.innerHTML = o } else { let i = C.data[Q] || "--"; E.innerHTML = i, E.classList.add("aladin-text-td-container"), E.title = i } g.appendChild(E) } I.appendChild(g) }), I }; static _createTableHeader = function (A) { let I = document.createElement("thead"); var C = "<tr>"; for (let [g, Q] of Object.entries(A.fields)) Q.name && (C += "<th>" + Q.name + "</th>"); return C += "</tr>", I.innerHTML = C, I } } let AC = function () { function B(A) { this.aladin = A } return B.prototype.showMeasurement = function (A) { if (A.length === 0) return; let I = A.map(C => { let g = new cI(C), Q = '<div style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;max-width: 20em;">' + C.name + "</div>", E = new P({ icon: { size: "small", url: gA.dataURLFromSVG({ svg: gA.SVG_ICONS.CATALOG, color: C.color }) }, content: Q }); return { title: C.name, label: E, content: g } }); this.hide(), this.table = new $g({ tooltip: { global: !0, aladin: this.aladin, content: "Scroll to see more..." }, aladin: this.aladin, layout: I }, this.aladin.aladinDiv), this.scrollLeft !== void 0 && this.scrollLeft !== null && this.table.setScrollPosition(this.scrollLeft) }, B.prototype.hide = function () { this.table && (this.scrollLeft = this.table.scrollLeftPosition, this.table.remove()) }, B }(), Ag = function () { let B = {}; return B.GALACTIC_TO_ICRS = [-.05487565771261968, .49410943719710765, -.8676661375571626, -.8734370519557791, -.4448297212220537, -.19807633727507057, -.48383507361641837, .7469821839845094, .4559838136911524], B.ICRS_TO_GALACTIC = [-.05487565771261968, -.8734370519557791, -.48383507361641837, .49410943719710765, -.4448297212220537, .7469821839845094, -.8676661375571626, -.19807633727507057, .4559838136911524], B.Transform = function (A, I) { A[0] = A[0] * Math.PI / 180, A[1] = A[1] * Math.PI / 180; var C = new Array(Math.cos(A[0]) * Math.cos(A[1]), Math.sin(A[0]) * Math.cos(A[1]), Math.sin(A[1])), g = new Array(C[0] * I[0] + C[1] * I[1] + C[2] * I[2], C[0] * I[3] + C[1] * I[4] + C[2] * I[5], C[0] * I[6] + C[1] * I[7] + C[2] * I[8]), Q = Math.sqrt(g[0] * g[0] + g[1] * g[1] + g[2] * g[2]), E = new Array(0, 0); E[1] = Math.asin(g[2] / Q); var i = g[0] / Q / Math.cos(E[1]), o = g[1] / Q / Math.cos(E[1]); return E[0] = Math.atan2(o, i), E[0] < 0 && (E[0] = E[0] + 2 * Math.PI), E[0] = E[0] * 180 / Math.PI, E[1] = E[1] * 180 / Math.PI, E }, B.GalacticToICRS = function (A) { return B.Transform(A, B.GALACTIC_TO_ICRS) }, B.ICRSToGalactic = function (A) { return B.Transform(A, B.ICRS_TO_GALACTIC) }, B }(), IC = function () { let B = function () { this.cache = {} }; return B.prototype.append = function (A, I) { this.cache[A] = I, Y.HIPS_CACHE_UPDATED.dispatchedTo(document.body) }, B.prototype.delete = function (A) { delete this.cache[A], Y.HIPS_CACHE_UPDATED.dispatchedTo(document.body) }, B.prototype.get = function (A) { return this.cache[A] }, B.prototype.contains = function (A) { return this.cache[A] !== void 0 && this.cache[A] !== null }, B }(), gC = function () { function B() { } return B.DEFAULT = [{ creatorDid: "ivo://CDS/P/DSS2/color", name: "DSS colored", id: "P/DSS2/color", maxOrder: 9, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://alasky.cds.unistra.fr/DSS/DSSColor" }, { creatorDid: "ivo://erosita/dr1/rate/rgb", id: "erosita/dr1/rate/rgb", name: "eROSITA-DE DR1 RGB (0.2-0.5, 0.5-1.0, 1.0-2.0 keV) Rate Image", maxOrder: 6, tileSize: 512, imgFormat: "png", cooFrame: "equatorial", startUrl: "https://erosita.mpe.mpg.de/dr1/erodat/static/hips/eRASS1_RGB_Rate_c010/" }, { creatorDid: "ivo://CDS/P/2MASS/color", name: "2MASS colored", id: "P/2MASS/color", maxOrder: 9, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://alaskybis.cds.unistra.fr/2MASS/Color" }, { creatorDid: "ivo://CDS/P/DSS2/red", name: "DSS2 Red (F+R)", id: "P/DSS2/red", maxOrder: 9, tileSize: 512, imgFormat: "fits", cooFrame: "equatorial", numBitsPerPixel: 16, minCut: 1e3, maxCut: 1e4, colormap: "magma", stretch: "Linear", imgFormat: "fits", startUrl: "https://alaskybis.cds.unistra.fr/DSS/DSS2Merged" }, { creatorDid: "ivo://CDS/P/DM/I/350/gaiaedr3", name: "Density map for Gaia EDR3 (I/350/gaiaedr3)", id: "P/DM/I/350/gaiaedr3", maxOrder: 7, tileSize: 512, numBitsPerPixel: -32, cooFrame: "equatorial", minCut: 0, maxCut: 12e3, stretch: "asinh", colormap: "rdylbu", imgFormat: "fits", startUrl: "https://alaskybis.cds.unistra.fr/ancillary/GaiaEDR3/density-map" }, { creatorDid: "ivo://CDS/P/PanSTARRS/DR1/g", name: "PanSTARRS DR1 g", id: "P/PanSTARRS/DR1/g", maxOrder: 11, tileSize: 512, imgFormat: "fits", cooFrame: "equatorial", numBitsPerPixel: -32, minCut: -34, maxCut: 7e3, stretch: "asinh", colormap: "redtemperature", startUrl: "https://alasky.cds.unistra.fr/Pan-STARRS/DR1/g" }, { creatorDid: "ivo://CDS/P/PanSTARRS/DR1/color-z-zg-g", name: "PanSTARRS DR1 color", id: "P/PanSTARRS/DR1/color-z-zg-g", maxOrder: 11, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://alasky.cds.unistra.fr/Pan-STARRS/DR1/color-z-zg-g" }, { creatorDid: "ivo://CDS/P/DECaPS/DR2/color", name: "DECaPS DR2 color", id: "P/DECaPS/DR2/color", maxOrder: 11, cooFrame: "equatorial", tileSize: 512, imgFormat: "png", startUrl: "https://alasky.cds.unistra.fr/DECaPS/DR2/CDS_P_DECaPS_DR2_color" }, { creatorDid: "ivo://CDS/P/Fermi/color", name: "Fermi color", id: "P/Fermi/color", maxOrder: 3, imgFormat: "jpeg", tileSize: 512, cooFrame: "equatorial", startUrl: "https://alasky.cds.unistra.fr/Fermi/Color" }, { creatorDid: "ivo://CDS/P/GALEXGR6_7/NUV", id: "P/GALEXGR6_7/NUV", name: "GALEXGR6_7 NUV", maxOrder: 8, imgFormat: "png", tileSize: 512, cooFrame: "equatorial", startUrl: "https://alasky.cds.unistra.fr/GALEX/GALEXGR6_7_NUV" }, { creatorDid: "ivo://CDS/P/IRIS/color", id: "P/IRIS/color", name: "IRIS colored", maxOrder: 3, tileSize: 256, imgFormat: "jpeg", cooFrame: "galactic", startUrl: "https://alasky.cds.unistra.fr/IRISColor" }, { creatorDid: "ivo://CDS/P/Mellinger/color", id: "P/Mellinger/color", name: "Mellinger colored", maxOrder: 4, tileSize: 512, imgFormat: "jpeg", cooFrame: "galactic", startUrl: "https://alasky.cds.unistra.fr/MellingerRGB" }, { creatorDid: "ivo://CDS/P/SDSS9/color", id: "P/SDSS9/color", name: "SDSS9 colored", maxOrder: 10, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://alasky.cds.unistra.fr/SDSS/DR9/color" }, { creatorDid: "ivo://CDS/P/SPITZER/color", id: "P/SPITZER/color", name: "IRAC color I1,I2,I4 - (GLIMPSE, SAGE, SAGE-SMC, SINGS)", maxOrder: 9, tileSize: 512, imgFormat: "jpeg", cooFrame: "galactic", startUrl: "https://alasky.cds.unistra.fr/Spitzer/SpitzerI1I2I4color" }, { creatorDid: "ivo://CDS/P/allWISE/color", id: "P/allWISE/color", name: "AllWISE color Red (W4) , Green (W2) , Blue (W1) from raw Atlas Images", maxOrder: 8, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://alaskybis.cds.unistra.fr/AllWISE/RGB-W4-W2-W1" }, { creatorDid: "ivo://CDS/P/SDSS9/g", id: "P/SDSS9/g", name: "SDSS9 band-g", maxOrder: 10, tileSize: 512, numBitsPerPixel: 16, imgFormat: "fits", cooFrame: "equatorial", minCut: 0, maxCut: 1.8, stretch: "linear", colormap: "redtemperature", startUrl: "https://alasky.cds.unistra.fr/SDSS/DR9/band-g" }, { id: "P/Finkbeiner", name: "Halpha", maxOrder: 3, minCut: -10, maxCut: 800, colormap: "rdbu", imgFormat: "fits", startUrl: "https://alasky.cds.unistra.fr/FinkbeinerHalpha" }, { id: "P/VTSS/Ha", name: "VTSS-Ha", maxOrder: 3, minCut: -10, maxCut: 100, colormap: "grayscale", imgFormat: "fits", startUrl: "https://alasky.cds.unistra.fr/VTSS/Ha" }, { id: "P/GLIMPSE360", name: "GLIMPSE360", maxOrder: 9, imgFormat: "jpeg", minOrder: 3, startUrl: "https://alasky.cds.unistra.fr/IPAC/IPAC_P_GLIMPSE360" }], B }(); class CC extends x { constructor(A, I) { let C = A && A.position || "topleft"; delete A.position, super([], A, I), this.position = C, this.vertical = A && A.vertical === !0, this.toggled = null, this.widgets = {} } _toggleOffWidget(A) { this.toggled && this.toggled !== A && (this.toggled && this.toggled.close && this.toggled.close(), this.toggled = null) } has(A) { return A in this.widgets } enabled(A) { return this.has(A) ? this.widgets[A].el.disabled === !1 : !1 } enable(A) { if (!this.has(A)) return; this.widgets[A].update({ disabled: !1 }) } disable(A) { if (!this.has(A)) return; this.widgets[A].update({ disabled: !0 }) } add(A, I) { switch (I instanceof V || (I = new P(I)), this.position) { case "topleft": I.update({ openDirection: "right" }), this.update({ position: { anchor: "left top" } }); break; case "topright": I.update({ openDirection: "left" }), this.update({ position: { anchor: "right top" } }); break; case "bottomleft": I.update({ openDirection: "top" }), this.update({ position: { anchor: "left bottom" } }); break; case "bottomright": I.update({ openDirection: "top right" }), this.update({ position: { anchor: "right bottom" } }); break }const C = I.options.action; I.update({ action: g => { this._toggleOffWidget(I), this.toggled = I, C(g) } }), this.widgets[A] = I, this.appendLast(I) } remove(A) { let I = this.widgets[A]; this.toggled === I && (this.toggled = null), this.removeItem(I), delete this.widgets[A], I.remove() } } let _A = function () {
|
| 111 |
var B = 21012, A = "/", I = "samp.webhub.", C = "", g = "string", Q = "list", E = "map", i = function (N) { function R() { } return R.prototype = N, new R }, o = function (N) { if (typeof N == "string") return g; if (N instanceof Array) return Q; if (N instanceof Object && N !== null) return E; throw new Error("Not legal SAMP object type: " + N) }, D = function (N, R) { var d = N.childNodes, K, k = [], L; for (L = 0; L < d.length; L++)if (K = d[L], K.nodeType === 1) { if (R && K.tagName !== R) throw new Error("Child <" + d[L].tagName + "> of <" + N.tagName + "> is not a <" + R + ">"); k.push(K) } return k }, t = function (N, R) { var d = D(N, R); if (d.length === 1) return d[0]; throw new Error("No sole child of <" + N.tagName + ">") }, e = function (N) { var R = "", d, K; for (d = 0; d < N.childNodes.length; d++) { if (K = N.childNodes[d], K.nodeType === 1) throw new Error("Element found in text content"); (K.nodeType === 3 || K.nodeType === 4) && (R += K.nodeValue) } return R }, w = function (N) { return typeof JSON > "u" ? "..." : JSON.stringify(N) }, s = {}; s.escapeXml = function (N) { return N.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") }, s.checkParams = function (N, R) { var d; for (d = 0; d < R.length; d++)if (R[d] !== g && R[d] !== Q && R[d] !== E) throw new Error("Unknown type " + R[d] + " in check list"); var K = N.length, k = [], L = !0; for (d = 0; d < K; d++)k.push(o(N[d])); for (L = L && R.length === K, d = 0; L && d < K; d++)L = L && R[d] === k[d]; if (!L) throw new Error("Param type list mismatch: [" + R + "] != [" + k + "]") }, s.valueToXml = function N(R, d) {
|
| 112 |
d = d || ""; var K, k, L = o(R); if (L === g) return d + "<value><string>" + s.escapeXml(R) + "</string></value>"; if (L === Q) {
|
| 113 |
for (k = [], k.push(d + "<value>", d + " <array>", d + " <data>"), K = 0; K < R.length; K++)k.push(N(R[K], d + " ")); return k.push(d + " </data>", d + " </array>", d + "</value>"), k.join(`
|
|
|
|
| 1 |
(function (zA, vA) { typeof exports == "object" && typeof module < "u" ? module.exports = vA() : typeof define == "function" && define.amd ? define(vA) : (zA = typeof globalThis < "u" ? globalThis : zA || self, zA.A = vA()) })(this, function () {
|
| 2 |
+
"use strict"; const zA = "3.8.2"; let vA = function () { function B() { } return B.prototype.redraw = function (A, I, C, g) { A.lineWidth = 1, A.strokeStyle = "rgb(150,150,220)", A.beginPath(); for (var Q, E, i = 0, o = I.length; i < o; i++)Q = I[i], E = Q.ipix, A.moveTo(Q.vx[0], Q.vy[0]), A.lineTo(Q.vx[1], Q.vy[1]), A.lineTo(Q.vx[2], Q.vy[2]); A.stroke(), A.strokeStyle = "#FFDDDD", A.beginPath(); for (var i = 0, o = I.length; i < o; i++)Q = I[i], E = Q.ipix, A.strokeText(g + "/" + E, (Q.vx[0] + Q.vx[2]) / 2, (Q.vy[0] + Q.vy[2]) / 2); A.stroke() }, B }(), FA = { TAN: { id: 1, label: "Tangential" }, STG: { id: 2, label: "Stereographic" }, SIN: { id: 3, label: "Spheric" }, ZEA: { id: 4, label: "Zenital equal-area" }, MER: { id: 9, label: "Mercator" }, AIT: { id: 13, label: "Hammer-Aïtoff" }, MOL: { id: 16, label: "Mollweide" } }; const Lg = "https://alaskybis.cds.unistra.fr/cgi/JSONProxy"; class Y { static AL_USE_WASM = new Y("AL:Wasm"); static LOADING_START = new Y("AL:loading.started"); static LOADING_STOP = new Y("AL:loading.stopped"); static BACKGROUND_COLOR_CHANGED = new Y("AL:BackgroundColor.changed"); static COO_GRID_ENABLED = new Y("AL:cooGrid.enabled"); static COO_GRID_DISABLED = new Y("AL:cooGrid.disabled"); static COO_GRID_UPDATED = new Y("AL:cooGrid.updated"); static PROJECTION_CHANGED = new Y("AL:projection.changed"); static FRAME_CHANGED = new Y("AL:frame.changed"); static UPDATE_CMAP_LIST = new Y("AL:cmap.updated"); static POSITION_CHANGED = new Y("AL:position.changed"); static ZOOM_CHANGED = new Y("AL:zoom.changed"); static LAYER_ADDED = new Y("AL:Layer.added"); static LAYER_REMOVED = new Y("AL:Layer.removed"); static LAYER_SWAPPED = new Y("AL:Layer.swapped"); static LAYER_CHANGED = new Y("AL:Layer.changed"); static HIPS_CACHE_UPDATED = new Y("AL:HiPSCache.updated"); static FAVORITE_HIPS_LIST_UPDATED = new Y("AL:HiPSFavorites.updated"); static GRAPHIC_OVERLAY_LAYER_ADDED = new Y("AL:GraphicOverlayLayer.added"); static GRAPHIC_OVERLAY_LAYER_REMOVED = new Y("AL:GraphicOverlayLayer.removed"); static GRAPHIC_OVERLAY_LAYER_CHANGED = new Y("AL:GraphicOverlayLayer.changed"); static SAMP_HUB_RUNNING = new Y("AL:samp.hub"); static SAMP_CONNECTED = new Y("AL:samp.connected"); static SAMP_DISCONNECTED = new Y("AL:samp.disconnected"); static CANVAS_EVENT = new Y("AL:Event"); static RETICLE_CHANGED = new Y("AL:Reticle.changed"); static RESOURCE_FETCHED = new Y("AL:Resource.fetched"); static FETCH = new Y("AL:fetch"); static MODE = new Y("AL:mode"); static FULLSCREEN_TOGGLED = new Y("AL:fullscreen.toggled"); constructor(A) { this.name = A } dispatchedTo(A, I) { I ? A.dispatchEvent(new CustomEvent(this.name, { detail: I })) : A.dispatchEvent(new CustomEvent(this.name)) } listenedBy(A, I) { A.addEventListener(this.name, I) } remove(A, I) { A.removeEventListener(this.name, I) } } let l = {}; l.HTTPS_WHITELIST = ["alasky.u-strasbg.fr", "alaskybis.u-strasbg.fr", "alasky.unistra.fr", "alaskybis.unistra.fr", "alasky.cds.unistra.fr", "alaskybis.cds.unistra.fr", "irsa.ipac.caltech.edu", "casda.csiro.au", "stpubdata.s3.us-east-1.amazonaws.com", "stpubdata.s3.amazonaws.com", "simbad.cfa.harvard.edu", "vizier.cfa.harvard.edu", "hips.astron.nl", "jvo.nao.ac.jp", "archive.cefca.es", "cade.irap.omp.eu", "skies.esac.esa.int"], l.cssScale = void 0, l.relMouseCoords = function (B) { if (B.offsetX) return { x: B.offsetX, y: B.offsetY }; if (!l.cssScale) { var A = window.getComputedStyle(document.body, null), I = A.getPropertyValue("-webkit-transform") || A.getPropertyValue("-moz-transform") || A.getPropertyValue("-ms-transform") || A.getPropertyValue("-o-transform") || A.getPropertyValue("transform"), C = /matrix\((-?\d*\.?\d+),\s*0,\s*0,\s*(-?\d*\.?\d+),\s*0,\s*0\)/, g = I.match(C); g ? l.cssScale = parseFloat(g[1]) : l.cssScale = 1 } var Q = B, E = Q.target || Q.srcElement, i = E.currentStyle || window.getComputedStyle(E, null), o = parseInt(i.borderLeftWidth, 10), D = parseInt(i.borderTopWidth, 10), t = E.getBoundingClientRect(), e = Q.clientX, w = Q.clientY; Q && Q.changedTouches && (e = Q.changedTouches[0].clientX, w = Q.changedTouches[0].clientY); var s = e - o - t.left, c = w - D - t.top; return { x: Math.round(s / l.cssScale), y: Math.round(c / l.cssScale) } }, Function.prototype.bind || (Function.prototype.bind = function (B) { if (typeof this != "function") throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); var A = [].slice, I = A.call(arguments, 1), C = this, g = function () { }, Q = function () { return C.apply(this instanceof g ? this : B || {}, I.concat(A.call(arguments))) }; return Q.prototype = this.prototype, Q }), l.urlParam = function (B, A) { return A === void 0 && (A = location.search), decodeURIComponent((new RegExp("[?|&]" + B + "=([^&;]+?)(&|#|;|$)").exec(A) || [, ""])[1].replace(/\+/g, "%20")) || null }, l.isNumber = function (B) { return !isNaN(parseFloat(B)) && isFinite(B) }, l.isInt = function (B) { return l.isNumber(B) && Math.floor(B) === B }, l.inverseNewtonRaphson = function (B, A, I, C = 1e-6, g = 100) { let Q = .5, E = 0; for (; E < g;) { let i = A(Q); if (Math.abs(i - B) < C) return Q; let D = I(Q); Q = Q - (i - B) / D, E++ } return null }, l.binarySearch = function (B, A) { for (var I = 0, C = B.length, g; I < C;) { if (g = Math.floor((I + C) / 2), B[g] === A) return g; B[g] < A ? I = g + 1 : C = g } return I }, l.debounce = function (B, A) { var I = null; return function () { var C = this, g = arguments; clearTimeout(I), I = setTimeout(function () { B.apply(C, g) }, A) } }, l.throttle = function (B, A, I) { A || (A = 250); var C, g; return function () { var Q = I || this, E = +new Date, i = arguments; C && E < C + A ? (clearTimeout(g), g = setTimeout(function () { C = E, B.apply(Q, i) }, A)) : (C = E, B.apply(Q, i)) } }, l.detectTrackPad = function (B) { var A = !1; return B.wheelDeltaY ? B.wheelDeltaY === B.deltaY * -3 && (A = !0) : B.deltaMode === 0 && (A = !0), A }, l.LRUCache = function (B) { this._keys = [], this._items = {}, this._expires = {}, this._size = 0, this._maxsize = B || 1024 }, l.LRUCache.prototype = { set: function (B, A) { var I = this._keys, C = this._items, g = this._expires, Q = this._size, E = this._maxsize; Q >= E && (I.sort(function (i, o) { return g[i] > g[o] ? -1 : g[i] < g[o] ? 1 : 0 }), Q--), I[Q] = B, C[B] = A, g[B] = Date.now(), Q++, this._keys = I, this._items = C, this._expires = g, this._size = Q }, get: function (B) { var A = this._items[B]; return A && (this._expires[B] = Date.now()), A }, keys: function () { return this._keys } }, l.loadFromUrls = function (B, A) {
|
| 3 |
const I = A && A.data || void 0, C = A && A.timeout || 5e3, g = A && A.mode || "cors", Q = A && A.contentType || void 0, E = A && A.dataType || "text", i = A && A.desc, o = new AbortController, D = setTimeout(() => o.abort(), C); let t = B[0]; I && (t += "?" + new URLSearchParams(I)); let e = { url: t, method: "GET", mode: g, cache: "default", signal: o.signal, dataType: E, desc: i }; return Q && (e.headers = { "Content-Type": Q }), l.fetch({
|
| 4 |
...e, success: w => (clearTimeout(D), Promise.resolve(w)), error: w => {
|
| 5 |
if (B && B.length === 1) {
|
|
|
|
| 8 |
} else return l.loadFromUrls(B.slice(1), A)
|
| 9 |
}
|
| 10 |
})
|
| 11 |
+
}, l.fetch = function (B) { let A; try { if (A = new URL(B.url), B.useProxy === !0 && (A = l.handleCORSNotSameOrigin(A)), B.data) for (const g in B.data) A.searchParams.append(g, B.data[g]) } catch { A = B.url } let I = new Request(A, { method: B.method || "GET", ...B }), C = { message: B.desc || "fetching: " + A, id: l.uuidv4() }; return Y.FETCH.dispatchedTo(document, { task: C }), fetch(I).then(g => B.dataType && B.dataType.includes("json") ? g.json() : B.dataType && B.dataType.includes("blob") ? g.blob() : B.dataType && B.dataType.includes("arrayBuffer") ? g.arrayBuffer() : B.dataType && B.dataType.includes("readableStream") ? Promise.resolve(g.body) : g.text()).then(g => B.success ? B.success(g) : Promise.resolve(g)).catch(g => B.error ? B.error(g) : Promise.reject(g)).finally(() => { Y.RESOURCE_FETCHED.dispatchedTo(document, { task: C }) }) }, l.on = function (B, A, I) { A.split(" ").forEach(C => { B.addEventListener(C, I) }) }, l.isTouchScreenDevice = void 0, l.hasTouchScreen = function () { if (l.isTouchScreenDevice === void 0) { let B = !1; if ("maxTouchPoints" in navigator) B = navigator.maxTouchPoints > 0; else if ("msMaxTouchPoints" in navigator) B = navigator.msMaxTouchPoints > 0; else { const A = matchMedia?.("(pointer:coarse)"); if (A?.media === "(pointer:coarse)") B = !!A.matches; else if ("orientation" in window) B = !0; else { const I = navigator.userAgent; B = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(I) || /\b(Android|Windows Phone|iPad|iPod)\b/i.test(I) } } l.isTouchScreenDevice = B } return l.isTouchScreenDevice }, l.openNewTab = function (B) { window.open(B, "_blank").focus() }, l.isFileContext = function () { return window.location.protocol === "file:" }, l.isHttpsContext = function () { return window.location.protocol === "https:" }, l.isHttpContext = function () { return window.location.protocol === "http:" }, l.fixURLForHTTPS = function (B) { return l.HTTPS_WHITELIST.some(I => B.includes(I)) ? B.replace("http://", "https://") : B }, l.isUrl = function (B) { try { return new URL(B).href } catch { return } }, l.getAbsoluteURL = function (B) { var A = document.createElement("a"); return A.href = B, A.href }, l.uuidv4 = function () { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (B) { var A = Math.random() * 16 | 0, I = B == "x" ? A : A & 3 | 8; return I.toString(16) }) }, l.clone = function (B) { return Object.assign(Object.create(Object.getPrototypeOf(B)), JSON.parse(JSON.stringify(B))) }, l.getDroppedFilesHandler = function (B) { B.preventDefault(); let A; return B.dataTransfer.items ? A = [...B.dataTransfer.items] : A = [...B.dataTransfer.files], A.filter(C => C.kind === "file").map(C => C.getAsFile()) }, l.dragOverHandler = function (B) { B.preventDefault() }, l.requestCORSIfNotSameOrigin = function (B) { try { const u = new URL(B, window.location.href); if (l.HTTPS_WHITELIST.some(h => u.hostname.includes(h))) return false; return u.origin !== window.location.origin } catch (e) { return false } }, l.handleCORSNotSameOrigin = function (B) { if (l.requestCORSIfNotSameOrigin(B)) { try { let A = new URL(Lg); A.searchParams.append("url", B); return A } catch (e) { return B } } return B }, l.deepCopy = function (B) { return Object.assign(Object.create(Object.getPrototypeOf(B)), B) }, l.download = function (B, A = void 0) { const I = document.createElement("a"); I.href = B, A && (I.download = A), I.click() }, l.copy2Clipboard = async function (B) { if (navigator.clipboard && window.isSecureContext) await navigator.clipboard.writeText(B); else { const A = document.createElement("textarea"); A.value = B, A.style.position = "absolute", A.style.opacity = "0", document.body.prepend(A), A.select(); try { document.execCommand("copy") } catch (I) { console.error(I) } finally { A.remove() } } }, l.measureTime = function (B, A) { let I = performance.now(), C = A(), g = performance.now() - I; return console.log(B, g), C }; let q = function () { }; q.D2R = Math.PI / 180, q.R2D = 180 / Math.PI, q.sign = function (B) { return B > 0 ? 1 : B < 0 ? -1 : 0 }, q.cosd = function (B) { if (B % 90 == 0) { var A = Math.abs(Math.floor(B / 90 + .5)) % 4; switch (A) { case 0: return 1; case 1: return 0; case 2: return -1; case 3: return 0 } } return Math.cos(B * q.D2R) }, q.sind = function (B) { if (B % 90 === 0) { var A = Math.abs(Math.floor(B / 90 - .5)) % 4; switch (A) { case 0: return 1; case 1: return 0; case 2: return -1; case 3: return 0 } } return Math.sin(B * q.D2R) }, q.tand = function (B) { var A; return A = B % 360, A == 0 || Math.abs(A) == 180 ? 0 : A == 45 || A == 225 ? 1 : A == -135 || A == -315 ? -1 : Math.tan(B * q.D2R) }, q.asind = function (B) { return Math.asin(B) * q.R2D }, q.acosd = function (B) { return Math.acos(B) * q.R2D }, q.atand = function (B) { return Math.atan(B) * q.R2D }, q.atan2 = function (B, A) { if (B != 0) { var I = q.sign(B); if (A != 0) { var C = Math.atan(Math.abs(B / A)); if (A > 0) return C * I; if (A < 0) return (Math.PI - C) * I } else return Math.PI / 2 * I } else return A > 0 ? 0 : A < 0 ? Math.PI : 0 / 0 }, q.atan2d = function (B, A) { return q.atan2(B, A) * q.R2D }, q.cosh = function (B) { return (Math.exp(B) + Math.exp(-B)) / 2 }, q.sinh = function (B) { return (Math.exp(B) - Math.exp(-B)) / 2 }, q.tanh = function (B) { return (Math.exp(B) - Math.exp(-B)) / (Math.exp(B) + Math.exp(-B)) }, q.acosh = function (B) { return Math.log(B + Math.sqrt(B * B - 1)) }, q.asinh = function (B) { return Math.log(B + Math.sqrt(B * B + 1)) }, q.atanh = function (B) { return .5 * Math.log((1 + B) / (1 - B)) }, q.sinc = function (B) { var A = Math.abs(B), I; return A <= .001 ? (A *= A, I = 1 - A * (1 - A / 20) / 6) : I = Math.sin(A) / A, I }, q.asinc = function (B) { var A = Math.abs(B), I; return A <= .001 ? (A *= A, I = 1 + A * (6 + A * (9 / 20)) / 6) : I = Math.asin(A) / A, I }, q.hypot = function (B, A) { return Math.sqrt(B * B + A * A) }, q.eulerMatrix = function (B, A, I) { var C = new Array(3); C[0] = new Array(3), C[1] = new Array(3), C[2] = new Array(3); var g = q.cosd(B), Q = q.sind(B), E = q.cosd(A), i = q.sind(A), o = q.cosd(I), D = q.sind(I); return C[0][0] = o * E * g - D * Q, C[0][1] = -D * E * g - o * Q, C[0][2] = -i * g, C[1][0] = o * E * Q + D * g, C[1][1] = -D * E * Q + o * g, C[1][2] = -i * Q, C[2][0] = -i * o, C[2][1] = -i * g, C[2][2] = E, C }, q.displayMatrix = function (B) {
|
| 12 |
for (var A = B.length, I = 0, C = 0; C < A; C++)B[C].length > I && (I = B[C].length); for (var g = `<table>
|
| 13 |
`, C = 0; C < A; C++) {
|
| 14 |
g += "<tr>"; for (var Q = 0; Q < A; Q++)g += "<td>", C < B[C].length && (g += B[C][Q].toString()), g += "</td>"; g += `</td>
|
|
|
|
| 107 |
}
|
| 108 |
})); let E = document.createElement("div"); E.style.maxWidth = "100%", I[0].style.display = "block", C[0].update({ toggled: !0 }); for (let i of I) E.appendChild(i); return { layout: C, content: E }
|
| 109 |
} setScrollPosition(A) { this.scrollLeftPosition = A, this.el.querySelector(".aladin-measurement-div").scrollLeft = A } _show() { this.options.cssStyle && this.setCss(this.options.cssStyle), this.options.tooltip && wA.add(this.options.tooltip, this), super._show() } remove() { this.el.querySelector(".aladin-measurement-div").removeEventListener("scroll", this.scrollCallback), super.remove() }
|
| 110 |
+
} class cI extends V { constructor(A, I, C = "beforeend") { let g = document.createElement("div"); g.setAttribute("class", "aladin-measurement-div"); let Q = document.createElement("table"); Q.style.borderColor = A.color; const E = cI._createTableHeader(A), i = cI._createTableBody(A); Q.appendChild(E), Q.appendChild(i), g.appendChild(Q), super(g, A), this.attachTo(I, C) } static _createTableBody = function (A) { const I = document.createElement("tbody"); return A.rows.forEach(C => { let g = document.createElement("tr"); for (let Q in C.data) { let E = document.createElement("td"); if (E.classList.add(Q), A.showCallback && A.showCallback[Q]) { let i = A.showCallback[Q], o = i(C.data); o instanceof Element ? E.appendChild(o) : E.innerHTML = o } else { let i = C.data[Q] || "--"; E.innerHTML = i, E.classList.add("aladin-text-td-container"), E.title = i } g.appendChild(E) } I.appendChild(g) }), I }; static _createTableHeader = function (A) { let I = document.createElement("thead"); var C = "<tr>"; for (let [g, Q] of Object.entries(A.fields)) Q.name && (C += "<th>" + Q.name + "</th>"); return C += "</tr>", I.innerHTML = C, I } } let AC = function () { function B(A) { this.aladin = A } return B.prototype.showMeasurement = function (A) { if (A.length === 0) return; let I = A.map(C => { let g = new cI(C), Q = '<div style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;max-width: 20em;">' + C.name + "</div>", E = new P({ icon: { size: "small", url: gA.dataURLFromSVG({ svg: gA.SVG_ICONS.CATALOG, color: C.color }) }, content: Q }); return { title: C.name, label: E, content: g } }); this.hide(), this.table = new $g({ tooltip: { global: !0, aladin: this.aladin, content: "Scroll to see more..." }, aladin: this.aladin, layout: I }, this.aladin.aladinDiv), this.scrollLeft !== void 0 && this.scrollLeft !== null && this.table.setScrollPosition(this.scrollLeft) }, B.prototype.hide = function () { this.table && (this.scrollLeft = this.table.scrollLeftPosition, this.table.remove()) }, B }(), Ag = function () { let B = {}; return B.GALACTIC_TO_ICRS = [-.05487565771261968, .49410943719710765, -.8676661375571626, -.8734370519557791, -.4448297212220537, -.19807633727507057, -.48383507361641837, .7469821839845094, .4559838136911524], B.ICRS_TO_GALACTIC = [-.05487565771261968, -.8734370519557791, -.48383507361641837, .49410943719710765, -.4448297212220537, .7469821839845094, -.8676661375571626, -.19807633727507057, .4559838136911524], B.Transform = function (A, I) { A[0] = A[0] * Math.PI / 180, A[1] = A[1] * Math.PI / 180; var C = new Array(Math.cos(A[0]) * Math.cos(A[1]), Math.sin(A[0]) * Math.cos(A[1]), Math.sin(A[1])), g = new Array(C[0] * I[0] + C[1] * I[1] + C[2] * I[2], C[0] * I[3] + C[1] * I[4] + C[2] * I[5], C[0] * I[6] + C[1] * I[7] + C[2] * I[8]), Q = Math.sqrt(g[0] * g[0] + g[1] * g[1] + g[2] * g[2]), E = new Array(0, 0); E[1] = Math.asin(g[2] / Q); var i = g[0] / Q / Math.cos(E[1]), o = g[1] / Q / Math.cos(E[1]); return E[0] = Math.atan2(o, i), E[0] < 0 && (E[0] = E[0] + 2 * Math.PI), E[0] = E[0] * 180 / Math.PI, E[1] = E[1] * 180 / Math.PI, E }, B.GalacticToICRS = function (A) { return B.Transform(A, B.GALACTIC_TO_ICRS) }, B.ICRSToGalactic = function (A) { return B.Transform(A, B.ICRS_TO_GALACTIC) }, B }(), IC = function () { let B = function () { this.cache = {} }; return B.prototype.append = function (A, I) { this.cache[A] = I, Y.HIPS_CACHE_UPDATED.dispatchedTo(document.body) }, B.prototype.delete = function (A) { delete this.cache[A], Y.HIPS_CACHE_UPDATED.dispatchedTo(document.body) }, B.prototype.get = function (A) { return this.cache[A] }, B.prototype.contains = function (A) { return this.cache[A] !== void 0 && this.cache[A] !== null }, B }(), gC = function () { function B() { } return B.DEFAULT = [{ creatorDid: "ivo://CDS/P/DSS2/color", name: "DSS colored", id: "P/DSS2/color", maxOrder: 9, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/color" }, { creatorDid: "ivo://erosita/dr1/rate/rgb", id: "erosita/dr1/rate/rgb", name: "eROSITA-DE DR1 RGB (0.2-0.5, 0.5-1.0, 1.0-2.0 keV) Rate Image", maxOrder: 6, tileSize: 512, imgFormat: "png", cooFrame: "equatorial", startUrl: "https://erosita.mpe.mpg.de/dr1/erodat/static/hips/eRASS1_RGB_Rate_c010/" }, { creatorDid: "ivo://CDS/P/2MASS/color", name: "2MASS colored", id: "P/2MASS/color", maxOrder: 9, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://irsa.ipac.caltech.edu/data/hips/CDS/2MASS/Color" }, { creatorDid: "ivo://CDS/P/DSS2/red", name: "DSS2 Red (F+R)", id: "P/DSS2/red", maxOrder: 9, tileSize: 512, imgFormat: "fits", cooFrame: "equatorial", numBitsPerPixel: 16, minCut: 1e3, maxCut: 1e4, colormap: "magma", stretch: "Linear", imgFormat: "fits", startUrl: "https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/red" }, { creatorDid: "ivo://CDS/P/DM/I/350/gaiaedr3", name: "Density map for Gaia EDR3 (I/350/gaiaedr3)", id: "P/DM/I/350/gaiaedr3", maxOrder: 7, tileSize: 512, numBitsPerPixel: -32, cooFrame: "equatorial", minCut: 0, maxCut: 12e3, stretch: "asinh", colormap: "rdylbu", imgFormat: "fits", startUrl: "https://alaskybis.cds.unistra.fr/ancillary/GaiaEDR3/density-map" }, { creatorDid: "ivo://CDS/P/PanSTARRS/DR1/g", name: "PanSTARRS DR1 g", id: "P/PanSTARRS/DR1/g", maxOrder: 11, tileSize: 512, imgFormat: "fits", cooFrame: "equatorial", numBitsPerPixel: -32, minCut: -34, maxCut: 7e3, stretch: "asinh", colormap: "redtemperature", startUrl: "https://alasky.cds.unistra.fr/Pan-STARRS/DR1/g" }, { creatorDid: "ivo://CDS/P/PanSTARRS/DR1/color-z-zg-g", name: "PanSTARRS DR1 color", id: "P/PanSTARRS/DR1/color-z-zg-g", maxOrder: 11, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://stpubdata.s3.us-east-1.amazonaws.com/mast/skybackgrounds/PanSTARRS" }, { creatorDid: "ivo://CDS/P/DECaPS/DR2/color", name: "DECaPS DR2 color", id: "P/DECaPS/DR2/color", maxOrder: 11, cooFrame: "equatorial", tileSize: 512, imgFormat: "png", startUrl: "https://alasky.cds.unistra.fr/DECaPS/DR2/CDS_P_DECaPS_DR2_color" }, { creatorDid: "ivo://CDS/P/Fermi/color", name: "Fermi color", id: "P/Fermi/color", maxOrder: 3, imgFormat: "jpeg", tileSize: 512, cooFrame: "equatorial", startUrl: "https://alasky.cds.unistra.fr/Fermi/Color" }, { creatorDid: "ivo://CDS/P/GALEXGR6_7/NUV", id: "P/GALEXGR6_7/NUV", name: "GALEXGR6_7 NUV", maxOrder: 8, imgFormat: "png", tileSize: 512, cooFrame: "equatorial", startUrl: "https://alasky.cds.unistra.fr/GALEX/GALEXGR6_7_NUV" }, { creatorDid: "ivo://CDS/P/IRIS/color", id: "P/IRIS/color", name: "IRIS colored", maxOrder: 3, tileSize: 256, imgFormat: "jpeg", cooFrame: "galactic", startUrl: "https://alasky.cds.unistra.fr/IRISColor" }, { creatorDid: "ivo://CDS/P/Mellinger/color", id: "P/Mellinger/color", name: "Mellinger colored", maxOrder: 4, tileSize: 512, imgFormat: "jpeg", cooFrame: "galactic", startUrl: "https://casda.csiro.au/hips/DSS2/color" }, { creatorDid: "ivo://CDS/P/SDSS9/color", id: "P/SDSS9/color", name: "SDSS9 colored", maxOrder: 10, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://irsa.ipac.caltech.edu/data/hips/CDS/SDSS/DR9/color" }, { creatorDid: "ivo://CDS/P/SPITZER/color", id: "P/SPITZER/color", name: "IRAC color I1,I2,I4 - (GLIMPSE, SAGE, SAGE-SMC, SINGS)", maxOrder: 9, tileSize: 512, imgFormat: "jpeg", cooFrame: "galactic", startUrl: "https://alasky.cds.unistra.fr/Spitzer/SpitzerI1I2I4color" }, { creatorDid: "ivo://CDS/P/allWISE/color", id: "P/allWISE/color", name: "AllWISE color Red (W4) , Green (W2) , Blue (W1) from raw Atlas Images", maxOrder: 8, tileSize: 512, imgFormat: "jpeg", cooFrame: "equatorial", startUrl: "https://irsa.ipac.caltech.edu/data/hips/CDS/AllWISE/RGB-W4-W2-W1" }, { creatorDid: "ivo://CDS/P/SDSS9/g", id: "P/SDSS9/g", name: "SDSS9 band-g", maxOrder: 10, tileSize: 512, numBitsPerPixel: 16, imgFormat: "fits", cooFrame: "equatorial", minCut: 0, maxCut: 1.8, stretch: "linear", colormap: "redtemperature", startUrl: "https://alasky.cds.unistra.fr/SDSS/DR9/band-g" }, { id: "P/Finkbeiner", name: "Halpha", maxOrder: 3, minCut: -10, maxCut: 800, colormap: "rdbu", imgFormat: "fits", startUrl: "https://alasky.cds.unistra.fr/FinkbeinerHalpha" }, { id: "P/VTSS/Ha", name: "VTSS-Ha", maxOrder: 3, minCut: -10, maxCut: 100, colormap: "grayscale", imgFormat: "fits", startUrl: "https://alasky.cds.unistra.fr/VTSS/Ha" }, { id: "P/GLIMPSE360", name: "GLIMPSE360", maxOrder: 9, imgFormat: "jpeg", minOrder: 3, startUrl: "https://alasky.cds.unistra.fr/IPAC/IPAC_P_GLIMPSE360" }], B }(); class CC extends x { constructor(A, I) { let C = A && A.position || "topleft"; delete A.position, super([], A, I), this.position = C, this.vertical = A && A.vertical === !0, this.toggled = null, this.widgets = {} } _toggleOffWidget(A) { this.toggled && this.toggled !== A && (this.toggled && this.toggled.close && this.toggled.close(), this.toggled = null) } has(A) { return A in this.widgets } enabled(A) { return this.has(A) ? this.widgets[A].el.disabled === !1 : !1 } enable(A) { if (!this.has(A)) return; this.widgets[A].update({ disabled: !1 }) } disable(A) { if (!this.has(A)) return; this.widgets[A].update({ disabled: !0 }) } add(A, I) { switch (I instanceof V || (I = new P(I)), this.position) { case "topleft": I.update({ openDirection: "right" }), this.update({ position: { anchor: "left top" } }); break; case "topright": I.update({ openDirection: "left" }), this.update({ position: { anchor: "right top" } }); break; case "bottomleft": I.update({ openDirection: "top" }), this.update({ position: { anchor: "left bottom" } }); break; case "bottomright": I.update({ openDirection: "top right" }), this.update({ position: { anchor: "right bottom" } }); break }const C = I.options.action; I.update({ action: g => { this._toggleOffWidget(I), this.toggled = I, C(g) } }), this.widgets[A] = I, this.appendLast(I) } remove(A) { let I = this.widgets[A]; this.toggled === I && (this.toggled = null), this.removeItem(I), delete this.widgets[A], I.remove() } } let _A = function () {
|
| 111 |
var B = 21012, A = "/", I = "samp.webhub.", C = "", g = "string", Q = "list", E = "map", i = function (N) { function R() { } return R.prototype = N, new R }, o = function (N) { if (typeof N == "string") return g; if (N instanceof Array) return Q; if (N instanceof Object && N !== null) return E; throw new Error("Not legal SAMP object type: " + N) }, D = function (N, R) { var d = N.childNodes, K, k = [], L; for (L = 0; L < d.length; L++)if (K = d[L], K.nodeType === 1) { if (R && K.tagName !== R) throw new Error("Child <" + d[L].tagName + "> of <" + N.tagName + "> is not a <" + R + ">"); k.push(K) } return k }, t = function (N, R) { var d = D(N, R); if (d.length === 1) return d[0]; throw new Error("No sole child of <" + N.tagName + ">") }, e = function (N) { var R = "", d, K; for (d = 0; d < N.childNodes.length; d++) { if (K = N.childNodes[d], K.nodeType === 1) throw new Error("Element found in text content"); (K.nodeType === 3 || K.nodeType === 4) && (R += K.nodeValue) } return R }, w = function (N) { return typeof JSON > "u" ? "..." : JSON.stringify(N) }, s = {}; s.escapeXml = function (N) { return N.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") }, s.checkParams = function (N, R) { var d; for (d = 0; d < R.length; d++)if (R[d] !== g && R[d] !== Q && R[d] !== E) throw new Error("Unknown type " + R[d] + " in check list"); var K = N.length, k = [], L = !0; for (d = 0; d < K; d++)k.push(o(N[d])); for (L = L && R.length === K, d = 0; L && d < K; d++)L = L && R[d] === k[d]; if (!L) throw new Error("Param type list mismatch: [" + R + "] != [" + k + "]") }, s.valueToXml = function N(R, d) {
|
| 112 |
d = d || ""; var K, k, L = o(R); if (L === g) return d + "<value><string>" + s.escapeXml(R) + "</string></value>"; if (L === Q) {
|
| 113 |
for (k = [], k.push(d + "<value>", d + " <array>", d + " <data>"), K = 0; K < R.length; K++)k.push(N(R[K], d + " ")); return k.push(d + " </data>", d + " </array>", d + "</value>"), k.join(`
|
explorer.html
CHANGED
|
@@ -48,40 +48,61 @@
|
|
| 48 |
(function () {
|
| 49 |
function rewriteSkyUrl(rawUrl) {
|
| 50 |
if (typeof rawUrl !== "string") return rawUrl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
const isLocal = window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1";
|
| 52 |
-
if (
|
| 53 |
-
if (rawUrl.indexOf("
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
[
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
];
|
| 80 |
-
for (const [pattern, replacement] of
|
| 81 |
if (pattern.test(rawUrl)) {
|
| 82 |
return rawUrl.replace(pattern, replacement);
|
| 83 |
}
|
| 84 |
}
|
|
|
|
|
|
|
|
|
|
| 85 |
return rawUrl;
|
| 86 |
}
|
| 87 |
|
|
@@ -316,8 +337,6 @@
|
|
| 316 |
<nav class="viewToggleGroup" aria-label="Explorer views">
|
| 317 |
<button class="viewToggle" id="skyMapBtn" aria-pressed="false">Sky Map</button>
|
| 318 |
<button class="viewToggle" id="fitsViewBtn" aria-pressed="false">FITS Viewer</button>
|
| 319 |
-
<button class="viewToggle" id="blinkViewBtn" aria-pressed="false"
|
| 320 |
-
title="WiseView-style SPHEREx Image Blink Player">Blink Viewer</button>
|
| 321 |
<button class="viewToggle" id="splitViewBtn" aria-pressed="false"
|
| 322 |
title="Compare Sky Map & FITS Viewer side-by-side">Split View</button>
|
| 323 |
<button class="viewToggle" id="terrainViewBtn" aria-pressed="false">3D Terrain</button>
|
|
@@ -411,7 +430,6 @@
|
|
| 411 |
<button class="workflowStep active" data-view="sky"><span class="stepNum">1</span>Find sky position</button>
|
| 412 |
<button class="workflowStep" data-view="fits"><span class="stepNum">2</span>Inspect FITS data</button>
|
| 413 |
<button class="workflowStep" data-view="terrain"><span class="stepNum">3</span>Explore in 3D</button>
|
| 414 |
-
<button class="workflowStep" data-view="blink"><span class="stepNum">4</span>Blink Movers</button>
|
| 415 |
</nav>
|
| 416 |
<div class="subBarDivider"></div>
|
| 417 |
<div id="status"><span class="statusDot" id="statusDot"></span><span id="statusText">Connecting to
|
|
@@ -1981,13 +1999,13 @@
|
|
| 1981 |
let activeRegimeFilter = "all";
|
| 1982 |
const DEFAULT_SKY = "dss2-color";
|
| 1983 |
const DEFAULT_SKY_SURVEYS = [
|
| 1984 |
-
{ key: "dss2-color", label: "DSS2 color", id: "P/DSS2/color", url: "https://
|
| 1985 |
-
{ key: "dss2-red", label: "DSS2 red", id: "P/DSS2/red", url: "https://
|
| 1986 |
-
{ key: "2mass-color", label: "2MASS color", id: "P/2MASS/color", url: "https://
|
| 1987 |
-
{ key: "allwise-color", label: "AllWISE color", id: "P/allWISE/color", url: "https://
|
| 1988 |
-
{ key: "panstarrs", label: "Pan-STARRS DR1 color", id: "P/PanSTARRS/DR1/color-z-zg-g", url: "https://
|
| 1989 |
-
{ key: "sdss9", label: "SDSS9 color", id: "P/SDSS9/color", url: "https://
|
| 1990 |
-
{ key: "mellinger", label: "Mellinger optical", id: "P/DM/color", url: "https://
|
| 1991 |
];
|
| 1992 |
let skySurveys = [...DEFAULT_SKY_SURVEYS];
|
| 1993 |
let currentSky = DEFAULT_SKY;
|
|
@@ -1999,7 +2017,7 @@
|
|
| 1999 |
return `${location.origin}/hips/${key}`;
|
| 2000 |
}
|
| 2001 |
const s = (skySurveys || []).find(x => x.key === key) || DEFAULT_SKY_SURVEYS.find(x => x.key === key);
|
| 2002 |
-
return s ? (s.
|
| 2003 |
}
|
| 2004 |
|
| 2005 |
function renderSkyOptions() {
|
|
@@ -3079,6 +3097,7 @@
|
|
| 3079 |
{ name: "Galactic Center", type: "Region", ra: 266.4168, dec: -29.0078, desc: "Sagittarius A*" },
|
| 3080 |
{ name: "Pleiades", type: "Open Cluster", ra: 56.7500, dec: 24.1167, desc: "Seven Sisters / M45" },
|
| 3081 |
{ name: "M45", type: "Open Cluster", ra: 56.7500, dec: 24.1167, desc: "Pleiades" },
|
|
|
|
| 3082 |
{ name: "Crab Nebula", type: "Supernova Remnant", ra: 83.6331, dec: 22.0145, desc: "M1 / Taurus A" },
|
| 3083 |
{ name: "M1", type: "Supernova Remnant", ra: 83.6331, dec: 22.0145, desc: "Crab Nebula" },
|
| 3084 |
{ name: "Cygnus X", type: "Star Forming Region", ra: 307.5200, dec: 40.8600, desc: "Cygnus OB2 / Massive star complex" },
|
|
@@ -3109,6 +3128,62 @@
|
|
| 3109 |
const sName = document.getElementById("sName");
|
| 3110 |
const sResolve = document.getElementById("sResolve");
|
| 3111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3112 |
async function resolveName(rawName) {
|
| 3113 |
const name = (rawName || "").trim();
|
| 3114 |
if (!name) {
|
|
@@ -3117,7 +3192,6 @@
|
|
| 3117 |
return null;
|
| 3118 |
}
|
| 3119 |
|
| 3120 |
-
|
| 3121 |
const lower = name.toLowerCase();
|
| 3122 |
const local = KNOWN_BENCHMARK_TARGETS.find(t =>
|
| 3123 |
t.name.toLowerCase() === lower || (t.desc && t.desc.toLowerCase().includes(lower))
|
|
@@ -3132,12 +3206,24 @@
|
|
| 3132 |
|
| 3133 |
sResolve.disabled = true;
|
| 3134 |
sResolve.textContent = "Resolving...";
|
| 3135 |
-
sMsg.textContent = `Resolving "${name}"
|
| 3136 |
try {
|
| 3137 |
-
|
| 3138 |
-
|
| 3139 |
-
|
| 3140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3141 |
sMsg.textContent = `Could not resolve "${name}". Try a different name (e.g. M31, NGC 1068).`;
|
| 3142 |
return null;
|
| 3143 |
}
|
|
@@ -4163,7 +4249,7 @@
|
|
| 4163 |
step.classList.toggle("active", active);
|
| 4164 |
step.setAttribute("aria-current", active ? "step" : "false");
|
| 4165 |
});
|
| 4166 |
-
[[skyMapBtn, "sky"], [fitsViewBtn, "fits"], [splitViewBtn, "split"], [terrainViewBtn, "terrain"], [skyDomeBtn, "dome"]
|
| 4167 |
if (btn) btn.setAttribute("aria-pressed", String(view === activeView));
|
| 4168 |
});
|
| 4169 |
}
|
|
@@ -4447,9 +4533,8 @@
|
|
| 4447 |
if (splitViewBtn) splitViewBtn.addEventListener("click", () => { hideDomeRootIfActive(); showSplitView(); });
|
| 4448 |
terrainViewBtn.addEventListener("click", () => { hideDomeRootIfActive(); showTerrainView(); });
|
| 4449 |
if (skyDomeBtn) skyDomeBtn.addEventListener("click", showSkyDome);
|
| 4450 |
-
if (blinkViewBtn) blinkViewBtn.addEventListener("click", () => { hideDomeRootIfActive(); showBlinkView(); });
|
| 4451 |
|
| 4452 |
-
const viewToggles = [skyMapBtn, fitsViewBtn, splitViewBtn, terrainViewBtn, skyDomeBtn
|
| 4453 |
viewToggles.forEach((btn, idx) => {
|
| 4454 |
btn.addEventListener("keydown", (e) => {
|
| 4455 |
if (e.key === "ArrowRight" || e.key === "ArrowDown") {
|
|
@@ -4480,7 +4565,6 @@
|
|
| 4480 |
if (step.dataset.view === "sky") showSkyMap();
|
| 4481 |
if (step.dataset.view === "fits") showFitsView();
|
| 4482 |
if (step.dataset.view === "terrain") showTerrainView();
|
| 4483 |
-
if (step.dataset.view === "blink") showBlinkView();
|
| 4484 |
});
|
| 4485 |
step.addEventListener("keydown", (e) => {
|
| 4486 |
if (e.key === "ArrowRight" || e.key === "ArrowDown") {
|
|
@@ -9099,6 +9183,61 @@
|
|
| 9099 |
: 6.2;
|
| 9100 |
const fovRadius = Math.max(0.05, Math.min(4.0, Math.hypot(w, h) * (pixScale / 3600.0) / 2.0));
|
| 9101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9102 |
fetch("/api/analysis/nearby", {
|
| 9103 |
method: "POST",
|
| 9104 |
headers: { "Content-Type": "application/json" },
|
|
@@ -9110,29 +9249,21 @@
|
|
| 9110 |
source_obs_id: displayName
|
| 9111 |
})
|
| 9112 |
})
|
| 9113 |
-
.then(r =>
|
|
|
|
|
|
|
|
|
|
| 9114 |
.then(data => {
|
| 9115 |
-
|
| 9116 |
-
const sources = data.detectedFeatures || [];
|
| 9117 |
-
window.currentFitsSimbadSources = sources;
|
| 9118 |
-
if (textEl) {
|
| 9119 |
-
if (sources.length > 0) {
|
| 9120 |
-
const top = sources[0];
|
| 9121 |
-
textEl.textContent = `SIMBAD: ${sources.length} sources (${top.name})`;
|
| 9122 |
-
textEl.parentElement.title = `Found ${sources.length} SIMBAD objects in this FITS file frame. Click to search & inspect.`;
|
| 9123 |
-
} else {
|
| 9124 |
-
textEl.textContent = `SIMBAD: None in frame`;
|
| 9125 |
-
}
|
| 9126 |
-
}
|
| 9127 |
-
updateSimbadCatalogMarkers();
|
| 9128 |
-
if (typeof populateFssFrameObjects === "function") {
|
| 9129 |
-
populateFssFrameObjects(sources);
|
| 9130 |
-
}
|
| 9131 |
-
renderApertureOverlay();
|
| 9132 |
})
|
| 9133 |
-
.catch(() => {
|
| 9134 |
-
|
| 9135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9136 |
});
|
| 9137 |
}
|
| 9138 |
|
|
@@ -11108,6 +11239,63 @@
|
|
| 11108 |
}, true);
|
| 11109 |
}
|
| 11110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11111 |
function querySimbadForPanel(ra, dec) {
|
| 11112 |
if (!Number.isFinite(ra) || !Number.isFinite(dec)) {
|
| 11113 |
fssObjLoading.style.display = "none";
|
|
@@ -11122,29 +11310,25 @@
|
|
| 11122 |
fssObjNone.style.display = "none";
|
| 11123 |
fssObjError.style.display = "none";
|
| 11124 |
|
| 11125 |
-
fetch(`/api/identify?ra=${encodeURIComponent(ra)}&dec=${encodeURIComponent(dec)}&radius=0.
|
| 11126 |
-
.then(res =>
|
|
|
|
|
|
|
|
|
|
| 11127 |
.then(data => {
|
| 11128 |
-
|
| 11129 |
-
if (data && data.name) {
|
| 11130 |
-
fssObjContent.style.display = "block";
|
| 11131 |
-
fssObjName.textContent = data.name;
|
| 11132 |
-
fssObjType.textContent = data.type ? data.type : "Object";
|
| 11133 |
-
fssObjSep.textContent = Number.isFinite(data.sep_arcsec)
|
| 11134 |
-
? `${data.sep_arcsec.toFixed(1)}″ separation`
|
| 11135 |
-
: "";
|
| 11136 |
-
fssObjNote.textContent = "Candidate catalog object near this sky position (SIMBAD).";
|
| 11137 |
-
lastNarration = `Sky object near this pixel: ${data.name}, type ${data.type || "unknown"}.`;
|
| 11138 |
-
} else {
|
| 11139 |
-
fssObjNone.style.display = "block";
|
| 11140 |
-
fssObjNone.textContent = "No cataloged SIMBAD object found within 0.01° radius.";
|
| 11141 |
-
lastNarration = "No cataloged object found nearby in SIMBAD.";
|
| 11142 |
-
}
|
| 11143 |
})
|
| 11144 |
-
.catch(() => {
|
| 11145 |
-
|
| 11146 |
-
|
| 11147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11148 |
});
|
| 11149 |
}
|
| 11150 |
|
|
|
|
| 48 |
(function () {
|
| 49 |
function rewriteSkyUrl(rawUrl) {
|
| 50 |
if (typeof rawUrl !== "string") return rawUrl;
|
| 51 |
+
if (rawUrl.indexOf("JSONProxy") >= 0) {
|
| 52 |
+
try {
|
| 53 |
+
const parsedUrl = new URL(rawUrl);
|
| 54 |
+
const proxied = parsedUrl.searchParams.get("url");
|
| 55 |
+
if (proxied) return rewriteSkyUrl(proxied);
|
| 56 |
+
} catch (_) { }
|
| 57 |
+
}
|
| 58 |
const isLocal = window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1";
|
| 59 |
+
if (isLocal) {
|
| 60 |
+
if (rawUrl.indexOf("MocServer/query") >= 0) {
|
| 61 |
+
const qIdx = rawUrl.indexOf("?");
|
| 62 |
+
return qIdx >= 0 ? "/mocserver?" + rawUrl.slice(qIdx + 1) : "/mocserver";
|
| 63 |
+
}
|
| 64 |
+
if (rawUrl.indexOf("nph-sesame") >= 0 || rawUrl.indexOf("/sesame") >= 0) {
|
| 65 |
+
const qIdx = rawUrl.indexOf("?");
|
| 66 |
+
return qIdx >= 0 ? "/sesame?" + rawUrl.slice(qIdx + 1) : "/sesame";
|
| 67 |
+
}
|
| 68 |
+
const localSurveyRewrites = [
|
| 69 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/DSS\/DSSColor/i, "/hips/dss2-color"],
|
| 70 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/DSS\/DSS2Merged/i, "/hips/dss2-red"],
|
| 71 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/2MASS\/Color/i, "/hips/2mass-color"],
|
| 72 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/AllWISE\/RGB-W4-W2-W1/i, "/hips/allwise-color"],
|
| 73 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/MellingerRGB/i, "/hips/mellinger"],
|
| 74 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/Pan-STARRS\/DR1\/color-z-zg-g/i, "/hips/panstarrs"],
|
| 75 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/SDSS\/DR9\/color/i, "/hips/sdss9"],
|
| 76 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/Spitzer\/SpitzerI1I2I4color/i, "/hips/spitzer"],
|
| 77 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/Fermi\/Color/i, "/hips/fermi"],
|
| 78 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/IRISColor/i, "/hips/iras"],
|
| 79 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/(?:IPAC\/IPAC_P_GLIMPSE360|Spitzer\/GLIMPSE360)/i, "/hips/glimpse"],
|
| 80 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/DSSColor/i, "/hips/dss2-color"]
|
| 81 |
+
];
|
| 82 |
+
for (const [pattern, replacement] of localSurveyRewrites) {
|
| 83 |
+
if (pattern.test(rawUrl)) {
|
| 84 |
+
return rawUrl.replace(pattern, replacement);
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
const directRewrites = [
|
| 89 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/2MASS\/Color/i, "https://irsa.ipac.caltech.edu/data/hips/CDS/2MASS/Color"],
|
| 90 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/AllWISE\/RGB-W4-W2-W1/i, "https://irsa.ipac.caltech.edu/data/hips/CDS/AllWISE/RGB-W4-W2-W1"],
|
| 91 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/DSS\/DSSColor/i, "https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/color"],
|
| 92 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/DSSColor/i, "https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/color"],
|
| 93 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/DSS\/DSS2Merged/i, "https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/red"],
|
| 94 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/SDSS\/DR9\/color/i, "https://irsa.ipac.caltech.edu/data/hips/CDS/SDSS/DR9/color"],
|
| 95 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/Pan-STARRS\/DR1\/color-z-zg-g/i, "https://stpubdata.s3.us-east-1.amazonaws.com/mast/skybackgrounds/PanSTARRS"],
|
| 96 |
+
[/https?:\/\/[^\/]*alasky[^\/]*\/MellingerRGB/i, "https://casda.csiro.au/hips/DSS2/color"]
|
| 97 |
];
|
| 98 |
+
for (const [pattern, replacement] of directRewrites) {
|
| 99 |
if (pattern.test(rawUrl)) {
|
| 100 |
return rawUrl.replace(pattern, replacement);
|
| 101 |
}
|
| 102 |
}
|
| 103 |
+
if (rawUrl.indexOf("alasky.unistra.fr") >= 0 && rawUrl.indexOf("alasky.cds.unistra.fr") === -1) {
|
| 104 |
+
return rawUrl.replace("alasky.unistra.fr", "alasky.cds.unistra.fr");
|
| 105 |
+
}
|
| 106 |
return rawUrl;
|
| 107 |
}
|
| 108 |
|
|
|
|
| 337 |
<nav class="viewToggleGroup" aria-label="Explorer views">
|
| 338 |
<button class="viewToggle" id="skyMapBtn" aria-pressed="false">Sky Map</button>
|
| 339 |
<button class="viewToggle" id="fitsViewBtn" aria-pressed="false">FITS Viewer</button>
|
|
|
|
|
|
|
| 340 |
<button class="viewToggle" id="splitViewBtn" aria-pressed="false"
|
| 341 |
title="Compare Sky Map & FITS Viewer side-by-side">Split View</button>
|
| 342 |
<button class="viewToggle" id="terrainViewBtn" aria-pressed="false">3D Terrain</button>
|
|
|
|
| 430 |
<button class="workflowStep active" data-view="sky"><span class="stepNum">1</span>Find sky position</button>
|
| 431 |
<button class="workflowStep" data-view="fits"><span class="stepNum">2</span>Inspect FITS data</button>
|
| 432 |
<button class="workflowStep" data-view="terrain"><span class="stepNum">3</span>Explore in 3D</button>
|
|
|
|
| 433 |
</nav>
|
| 434 |
<div class="subBarDivider"></div>
|
| 435 |
<div id="status"><span class="statusDot" id="statusDot"></span><span id="statusText">Connecting to
|
|
|
|
| 1999 |
let activeRegimeFilter = "all";
|
| 2000 |
const DEFAULT_SKY = "dss2-color";
|
| 2001 |
const DEFAULT_SKY_SURVEYS = [
|
| 2002 |
+
{ key: "dss2-color", label: "DSS2 color", id: "P/DSS2/color", url: "https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/color" },
|
| 2003 |
+
{ key: "dss2-red", label: "DSS2 red", id: "P/DSS2/red", url: "https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/red" },
|
| 2004 |
+
{ key: "2mass-color", label: "2MASS color", id: "P/2MASS/color", url: "https://irsa.ipac.caltech.edu/data/hips/CDS/2MASS/Color" },
|
| 2005 |
+
{ key: "allwise-color", label: "AllWISE color", id: "P/allWISE/color", url: "https://irsa.ipac.caltech.edu/data/hips/CDS/AllWISE/RGB-W4-W2-W1" },
|
| 2006 |
+
{ key: "panstarrs", label: "Pan-STARRS DR1 color", id: "P/PanSTARRS/DR1/color-z-zg-g", url: "https://stpubdata.s3.us-east-1.amazonaws.com/mast/skybackgrounds/PanSTARRS" },
|
| 2007 |
+
{ key: "sdss9", label: "SDSS9 color", id: "P/SDSS9/color", url: "https://irsa.ipac.caltech.edu/data/hips/CDS/SDSS/DR9/color" },
|
| 2008 |
+
{ key: "mellinger", label: "Mellinger optical", id: "P/DM/color", url: "https://casda.csiro.au/hips/DSS2/color" },
|
| 2009 |
];
|
| 2010 |
let skySurveys = [...DEFAULT_SKY_SURVEYS];
|
| 2011 |
let currentSky = DEFAULT_SKY;
|
|
|
|
| 2017 |
return `${location.origin}/hips/${key}`;
|
| 2018 |
}
|
| 2019 |
const s = (skySurveys || []).find(x => x.key === key) || DEFAULT_SKY_SURVEYS.find(x => x.key === key);
|
| 2020 |
+
return s ? (s.url || s.id) : "https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/color";
|
| 2021 |
}
|
| 2022 |
|
| 2023 |
function renderSkyOptions() {
|
|
|
|
| 3097 |
{ name: "Galactic Center", type: "Region", ra: 266.4168, dec: -29.0078, desc: "Sagittarius A*" },
|
| 3098 |
{ name: "Pleiades", type: "Open Cluster", ra: 56.7500, dec: 24.1167, desc: "Seven Sisters / M45" },
|
| 3099 |
{ name: "M45", type: "Open Cluster", ra: 56.7500, dec: 24.1167, desc: "Pleiades" },
|
| 3100 |
+
{ name: "Crab", type: "Supernova Remnant", ra: 83.6331, dec: 22.0145, desc: "Crab Nebula / M1" },
|
| 3101 |
{ name: "Crab Nebula", type: "Supernova Remnant", ra: 83.6331, dec: 22.0145, desc: "M1 / Taurus A" },
|
| 3102 |
{ name: "M1", type: "Supernova Remnant", ra: 83.6331, dec: 22.0145, desc: "Crab Nebula" },
|
| 3103 |
{ name: "Cygnus X", type: "Star Forming Region", ra: 307.5200, dec: 40.8600, desc: "Cygnus OB2 / Massive star complex" },
|
|
|
|
| 3128 |
const sName = document.getElementById("sName");
|
| 3129 |
const sResolve = document.getElementById("sResolve");
|
| 3130 |
|
| 3131 |
+
async function resolveNameDirect(name) {
|
| 3132 |
+
const sesameUrls = [
|
| 3133 |
+
`https://vizier.cfa.harvard.edu/viz-bin/nph-sesame/-oxp/SNV?${encodeURIComponent(name)}`,
|
| 3134 |
+
`https://cds.unistra.fr/cgi-bin/nph-sesame/-oxp/SNV?${encodeURIComponent(name)}`
|
| 3135 |
+
];
|
| 3136 |
+
for (const sUrl of sesameUrls) {
|
| 3137 |
+
try {
|
| 3138 |
+
const res = await fetch(sUrl, { mode: "cors" });
|
| 3139 |
+
if (!res.ok) continue;
|
| 3140 |
+
const text = await res.text();
|
| 3141 |
+
const doc = new DOMParser().parseFromString(text, "text/xml");
|
| 3142 |
+
const jradeg = doc.querySelector("jradeg");
|
| 3143 |
+
const jdedeg = doc.querySelector("jdedeg");
|
| 3144 |
+
if (jradeg && jdedeg) {
|
| 3145 |
+
const ra = parseFloat(jradeg.textContent);
|
| 3146 |
+
const dec = parseFloat(jdedeg.textContent);
|
| 3147 |
+
if (Number.isFinite(ra) && Number.isFinite(dec)) {
|
| 3148 |
+
const oname = doc.querySelector("oname")?.textContent || name;
|
| 3149 |
+
const otype = doc.querySelector("otype")?.textContent || "Astronomical Object";
|
| 3150 |
+
return { name: oname, ra, dec, type: otype };
|
| 3151 |
+
}
|
| 3152 |
+
}
|
| 3153 |
+
} catch (_) { }
|
| 3154 |
+
}
|
| 3155 |
+
|
| 3156 |
+
try {
|
| 3157 |
+
const cleanName = name.replace(/'/g, "''");
|
| 3158 |
+
const query = `SELECT TOP 1 main_id, otype_txt, ra, dec FROM basic WHERE main_id = '${cleanName}'`;
|
| 3159 |
+
const body = new URLSearchParams({
|
| 3160 |
+
request: "doQuery",
|
| 3161 |
+
lang: "adql",
|
| 3162 |
+
format: "json",
|
| 3163 |
+
query: query
|
| 3164 |
+
});
|
| 3165 |
+
const res = await fetch("https://simbad.cfa.harvard.edu/simbad/sim-tap/sync", {
|
| 3166 |
+
method: "POST",
|
| 3167 |
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
| 3168 |
+
body: body.toString()
|
| 3169 |
+
});
|
| 3170 |
+
if (res.ok) {
|
| 3171 |
+
const json = await res.json();
|
| 3172 |
+
if (json.data && json.data.length > 0) {
|
| 3173 |
+
const row = json.data[0];
|
| 3174 |
+
return {
|
| 3175 |
+
name: row[0] || name,
|
| 3176 |
+
type: row[1] || "Object",
|
| 3177 |
+
ra: parseFloat(row[2]),
|
| 3178 |
+
dec: parseFloat(row[3])
|
| 3179 |
+
};
|
| 3180 |
+
}
|
| 3181 |
+
}
|
| 3182 |
+
} catch (_) { }
|
| 3183 |
+
|
| 3184 |
+
return null;
|
| 3185 |
+
}
|
| 3186 |
+
|
| 3187 |
async function resolveName(rawName) {
|
| 3188 |
const name = (rawName || "").trim();
|
| 3189 |
if (!name) {
|
|
|
|
| 3192 |
return null;
|
| 3193 |
}
|
| 3194 |
|
|
|
|
| 3195 |
const lower = name.toLowerCase();
|
| 3196 |
const local = KNOWN_BENCHMARK_TARGETS.find(t =>
|
| 3197 |
t.name.toLowerCase() === lower || (t.desc && t.desc.toLowerCase().includes(lower))
|
|
|
|
| 3206 |
|
| 3207 |
sResolve.disabled = true;
|
| 3208 |
sResolve.textContent = "Resolving...";
|
| 3209 |
+
sMsg.textContent = `Resolving "${name}"...`;
|
| 3210 |
try {
|
| 3211 |
+
let result = null;
|
| 3212 |
+
try {
|
| 3213 |
+
const res = await fetch(`/api/sky/resolve?q=${encodeURIComponent(name)}`);
|
| 3214 |
+
if (res.ok) {
|
| 3215 |
+
const data = await res.json();
|
| 3216 |
+
if (data && Number.isFinite(data.ra) && Number.isFinite(data.dec)) {
|
| 3217 |
+
result = data;
|
| 3218 |
+
}
|
| 3219 |
+
}
|
| 3220 |
+
} catch (_) { }
|
| 3221 |
+
|
| 3222 |
+
if (!result) {
|
| 3223 |
+
result = await resolveNameDirect(name);
|
| 3224 |
+
}
|
| 3225 |
+
|
| 3226 |
+
if (!result || !Number.isFinite(result.ra) || !Number.isFinite(result.dec)) {
|
| 3227 |
sMsg.textContent = `Could not resolve "${name}". Try a different name (e.g. M31, NGC 1068).`;
|
| 3228 |
return null;
|
| 3229 |
}
|
|
|
|
| 4249 |
step.classList.toggle("active", active);
|
| 4250 |
step.setAttribute("aria-current", active ? "step" : "false");
|
| 4251 |
});
|
| 4252 |
+
[[skyMapBtn, "sky"], [fitsViewBtn, "fits"], [splitViewBtn, "split"], [terrainViewBtn, "terrain"], [skyDomeBtn, "dome"]].forEach(([btn, view]) => {
|
| 4253 |
if (btn) btn.setAttribute("aria-pressed", String(view === activeView));
|
| 4254 |
});
|
| 4255 |
}
|
|
|
|
| 4533 |
if (splitViewBtn) splitViewBtn.addEventListener("click", () => { hideDomeRootIfActive(); showSplitView(); });
|
| 4534 |
terrainViewBtn.addEventListener("click", () => { hideDomeRootIfActive(); showTerrainView(); });
|
| 4535 |
if (skyDomeBtn) skyDomeBtn.addEventListener("click", showSkyDome);
|
|
|
|
| 4536 |
|
| 4537 |
+
const viewToggles = [skyMapBtn, fitsViewBtn, splitViewBtn, terrainViewBtn, skyDomeBtn].filter(Boolean);
|
| 4538 |
viewToggles.forEach((btn, idx) => {
|
| 4539 |
btn.addEventListener("keydown", (e) => {
|
| 4540 |
if (e.key === "ArrowRight" || e.key === "ArrowDown") {
|
|
|
|
| 4565 |
if (step.dataset.view === "sky") showSkyMap();
|
| 4566 |
if (step.dataset.view === "fits") showFitsView();
|
| 4567 |
if (step.dataset.view === "terrain") showTerrainView();
|
|
|
|
| 4568 |
});
|
| 4569 |
step.addEventListener("keydown", (e) => {
|
| 4570 |
if (e.key === "ArrowRight" || e.key === "ArrowDown") {
|
|
|
|
| 9183 |
: 6.2;
|
| 9184 |
const fovRadius = Math.max(0.05, Math.min(4.0, Math.hypot(w, h) * (pixScale / 3600.0) / 2.0));
|
| 9185 |
|
| 9186 |
+
async function querySimbadFieldDirect(ra, dec, radiusDeg, maxResults) {
|
| 9187 |
+
maxResults = maxResults || 100;
|
| 9188 |
+
radiusDeg = Math.min(radiusDeg || 0.25, 1.0);
|
| 9189 |
+
const query = `SELECT TOP ${maxResults} main_id, otype_txt, ra, dec, DISTANCE(POINT('ICRS', ra, dec), POINT('ICRS', ${ra.toFixed(6)}, ${dec.toFixed(6)})) * 3600.0 AS sep_arcsec FROM basic WHERE 1 = CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', ${ra.toFixed(6)}, ${dec.toFixed(6)}, ${radiusDeg.toFixed(6)})) ORDER BY sep_arcsec ASC`;
|
| 9190 |
+
const endpoints = [
|
| 9191 |
+
"https://simbad.cfa.harvard.edu/simbad/sim-tap/sync",
|
| 9192 |
+
"https://simbad.cds.unistra.fr/simbad/sim-tap/sync"
|
| 9193 |
+
];
|
| 9194 |
+
for (const ep of endpoints) {
|
| 9195 |
+
try {
|
| 9196 |
+
const body = new URLSearchParams({
|
| 9197 |
+
request: "doQuery",
|
| 9198 |
+
lang: "adql",
|
| 9199 |
+
format: "json",
|
| 9200 |
+
query: query
|
| 9201 |
+
});
|
| 9202 |
+
const res = await fetch(ep, {
|
| 9203 |
+
method: "POST",
|
| 9204 |
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
| 9205 |
+
body: body.toString()
|
| 9206 |
+
});
|
| 9207 |
+
if (!res.ok) continue;
|
| 9208 |
+
const json = await res.json();
|
| 9209 |
+
const rows = json.data || [];
|
| 9210 |
+
return rows.map(r => ({
|
| 9211 |
+
name: r[0],
|
| 9212 |
+
type: r[1] || "Source",
|
| 9213 |
+
ra: r[2],
|
| 9214 |
+
dec: r[3],
|
| 9215 |
+
sep_arcsec: typeof r[4] === "number" ? r[4] : parseFloat(r[4]) || null
|
| 9216 |
+
}));
|
| 9217 |
+
} catch (e) { }
|
| 9218 |
+
}
|
| 9219 |
+
return [];
|
| 9220 |
+
}
|
| 9221 |
+
|
| 9222 |
+
function applyFrameSimbadSources(sources) {
|
| 9223 |
+
const textEl = document.getElementById("fitsCenterSimbadText");
|
| 9224 |
+
window.currentFitsSimbadSources = sources || [];
|
| 9225 |
+
if (textEl) {
|
| 9226 |
+
if (sources.length > 0) {
|
| 9227 |
+
const top = sources[0];
|
| 9228 |
+
textEl.textContent = `SIMBAD: ${sources.length} sources (${top.name})`;
|
| 9229 |
+
textEl.parentElement.title = `Found ${sources.length} SIMBAD objects in this FITS file frame. Click to search & inspect.`;
|
| 9230 |
+
} else {
|
| 9231 |
+
textEl.textContent = `SIMBAD: None in frame`;
|
| 9232 |
+
}
|
| 9233 |
+
}
|
| 9234 |
+
updateSimbadCatalogMarkers();
|
| 9235 |
+
if (typeof populateFssFrameObjects === "function") {
|
| 9236 |
+
populateFssFrameObjects(sources);
|
| 9237 |
+
}
|
| 9238 |
+
renderApertureOverlay();
|
| 9239 |
+
}
|
| 9240 |
+
|
| 9241 |
fetch("/api/analysis/nearby", {
|
| 9242 |
method: "POST",
|
| 9243 |
headers: { "Content-Type": "application/json" },
|
|
|
|
| 9249 |
source_obs_id: displayName
|
| 9250 |
})
|
| 9251 |
})
|
| 9252 |
+
.then(r => {
|
| 9253 |
+
if (!r.ok) throw new Error("HTTP " + r.status);
|
| 9254 |
+
return r.json();
|
| 9255 |
+
})
|
| 9256 |
.then(data => {
|
| 9257 |
+
applyFrameSimbadSources(data.detectedFeatures || []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9258 |
})
|
| 9259 |
+
.catch(async () => {
|
| 9260 |
+
try {
|
| 9261 |
+
const direct = await querySimbadFieldDirect(centerRa, centerDec, fovRadius, 100);
|
| 9262 |
+
applyFrameSimbadSources(direct);
|
| 9263 |
+
} catch (_) {
|
| 9264 |
+
const textEl = document.getElementById("fitsCenterSimbadText");
|
| 9265 |
+
if (textEl) textEl.textContent = `SIMBAD: Search`;
|
| 9266 |
+
}
|
| 9267 |
});
|
| 9268 |
}
|
| 9269 |
|
|
|
|
| 11239 |
}, true);
|
| 11240 |
}
|
| 11241 |
|
| 11242 |
+
async function querySimbadPointDirect(ra, dec, radiusDeg) {
|
| 11243 |
+
radiusDeg = radiusDeg || 0.02;
|
| 11244 |
+
const query = `SELECT TOP 1 main_id, otype_txt, DISTANCE(POINT('ICRS', ra, dec), POINT('ICRS', ${ra.toFixed(6)}, ${dec.toFixed(6)})) * 3600.0 AS sep_arcsec FROM basic WHERE 1 = CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', ${ra.toFixed(6)}, ${dec.toFixed(6)}, ${radiusDeg.toFixed(6)})) ORDER BY sep_arcsec ASC`;
|
| 11245 |
+
const endpoints = [
|
| 11246 |
+
"https://simbad.cfa.harvard.edu/simbad/sim-tap/sync",
|
| 11247 |
+
"https://simbad.cds.unistra.fr/simbad/sim-tap/sync"
|
| 11248 |
+
];
|
| 11249 |
+
for (const ep of endpoints) {
|
| 11250 |
+
try {
|
| 11251 |
+
const body = new URLSearchParams({
|
| 11252 |
+
request: "doQuery",
|
| 11253 |
+
lang: "adql",
|
| 11254 |
+
format: "json",
|
| 11255 |
+
query: query
|
| 11256 |
+
});
|
| 11257 |
+
const res = await fetch(ep, {
|
| 11258 |
+
method: "POST",
|
| 11259 |
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
| 11260 |
+
body: body.toString()
|
| 11261 |
+
});
|
| 11262 |
+
if (!res.ok) continue;
|
| 11263 |
+
const json = await res.json();
|
| 11264 |
+
const rows = json.data || [];
|
| 11265 |
+
if (!rows.length) return { name: null };
|
| 11266 |
+
const row = rows[0];
|
| 11267 |
+
return {
|
| 11268 |
+
name: row[0] || null,
|
| 11269 |
+
type: row[1] || "Object",
|
| 11270 |
+
sep_arcsec: typeof row[2] === "number" ? row[2] : parseFloat(row[2]) || null
|
| 11271 |
+
};
|
| 11272 |
+
} catch (e) { }
|
| 11273 |
+
}
|
| 11274 |
+
throw new Error("SIMBAD TAP unreachable");
|
| 11275 |
+
}
|
| 11276 |
+
|
| 11277 |
+
function handleSimbadPanelData(data) {
|
| 11278 |
+
fssObjLoading.style.display = "none";
|
| 11279 |
+
if (data && data.name) {
|
| 11280 |
+
fssObjContent.style.display = "block";
|
| 11281 |
+
fssObjNone.style.display = "none";
|
| 11282 |
+
fssObjError.style.display = "none";
|
| 11283 |
+
fssObjName.textContent = data.name;
|
| 11284 |
+
fssObjType.textContent = data.type ? data.type : "Object";
|
| 11285 |
+
fssObjSep.textContent = Number.isFinite(data.sep_arcsec)
|
| 11286 |
+
? `${data.sep_arcsec.toFixed(1)}″ separation`
|
| 11287 |
+
: "";
|
| 11288 |
+
fssObjNote.textContent = "Candidate catalog object near this sky position (SIMBAD).";
|
| 11289 |
+
lastNarration = `Sky object near this pixel: ${data.name}, type ${data.type || "unknown"}.`;
|
| 11290 |
+
} else {
|
| 11291 |
+
fssObjContent.style.display = "none";
|
| 11292 |
+
fssObjError.style.display = "none";
|
| 11293 |
+
fssObjNone.style.display = "block";
|
| 11294 |
+
fssObjNone.textContent = "No cataloged SIMBAD object found within 0.02° radius.";
|
| 11295 |
+
lastNarration = "No cataloged object found nearby in SIMBAD.";
|
| 11296 |
+
}
|
| 11297 |
+
}
|
| 11298 |
+
|
| 11299 |
function querySimbadForPanel(ra, dec) {
|
| 11300 |
if (!Number.isFinite(ra) || !Number.isFinite(dec)) {
|
| 11301 |
fssObjLoading.style.display = "none";
|
|
|
|
| 11310 |
fssObjNone.style.display = "none";
|
| 11311 |
fssObjError.style.display = "none";
|
| 11312 |
|
| 11313 |
+
fetch(`/api/identify?ra=${encodeURIComponent(ra)}&dec=${encodeURIComponent(dec)}&radius=0.02`)
|
| 11314 |
+
.then(res => {
|
| 11315 |
+
if (!res.ok) throw new Error("HTTP " + res.status);
|
| 11316 |
+
return res.json();
|
| 11317 |
+
})
|
| 11318 |
.then(data => {
|
| 11319 |
+
handleSimbadPanelData(data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11320 |
})
|
| 11321 |
+
.catch(async () => {
|
| 11322 |
+
try {
|
| 11323 |
+
const direct = await querySimbadPointDirect(ra, dec, 0.02);
|
| 11324 |
+
handleSimbadPanelData(direct);
|
| 11325 |
+
} catch (err) {
|
| 11326 |
+
fssObjLoading.style.display = "none";
|
| 11327 |
+
fssObjContent.style.display = "none";
|
| 11328 |
+
fssObjNone.style.display = "none";
|
| 11329 |
+
fssObjError.style.display = "block";
|
| 11330 |
+
lastNarration = "Catalog lookup failed.";
|
| 11331 |
+
}
|
| 11332 |
});
|
| 11333 |
}
|
| 11334 |
|
full_explorer.html
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
s.py
CHANGED
|
@@ -176,10 +176,10 @@ SKY_SURVEYS = {
|
|
| 176 |
|
| 177 |
FALLBACK_BASES = {
|
| 178 |
"CDS/P/DSS2/color": [
|
| 179 |
-
"http://skies.esac.esa.int/DSSColor",
|
| 180 |
"https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/color",
|
| 181 |
-
"https://casda.csiro.au/hips/DSS2/color",
|
| 182 |
"https://stpubdata.s3.us-east-1.amazonaws.com/mast/skybackgrounds/DSSColor",
|
|
|
|
|
|
|
| 183 |
"https://alaskybis.cds.unistra.fr/DSS/DSSColor",
|
| 184 |
],
|
| 185 |
"CDS/P/DSS2/red": [
|
|
@@ -187,23 +187,27 @@ FALLBACK_BASES = {
|
|
| 187 |
"https://alaskybis.cds.unistra.fr/DSS/DSS2Merged",
|
| 188 |
],
|
| 189 |
"CDS/P/2MASS/color": [
|
| 190 |
-
"http://skies.esac.esa.int/2MASSColor",
|
| 191 |
"https://irsa.ipac.caltech.edu/data/hips/CDS/2MASS/Color",
|
|
|
|
|
|
|
| 192 |
"https://alaskybis.cds.unistra.fr/2MASS/Color",
|
| 193 |
],
|
| 194 |
"CDS/P/allWISE/color": [
|
| 195 |
-
"http://skies.esac.esa.int/AllWISEColor",
|
| 196 |
"https://irsa.ipac.caltech.edu/data/hips/CDS/AllWISE/RGB-W4-W2-W1",
|
|
|
|
|
|
|
| 197 |
"https://hips.china-vo.org/m/CDS_P_allWISE_color",
|
| 198 |
"https://alaskybis.cds.unistra.fr/AllWISE/RGB-W4-W2-W1",
|
| 199 |
],
|
| 200 |
"CDS/P/Mellinger/color": [
|
|
|
|
| 201 |
"https://casda.csiro.au/hips/MellingerRGB",
|
| 202 |
"http://skies.esac.esa.int/MellingerRGB",
|
| 203 |
"https://hips.china-vo.org/m/CDS_P_Mellinger_color",
|
| 204 |
"https://alaskybis.cds.unistra.fr/MellingerRGB",
|
| 205 |
],
|
| 206 |
"CDS/P/PanSTARRS/DR1/color-z-zg-g": [
|
|
|
|
| 207 |
"https://hips.china-vo.org/m/CDS_P_PanSTARRS_DR1_color-z-zg-g",
|
| 208 |
"http://skies.esac.esa.int/Pan-STARRS/DR1/color-z-zg-g",
|
| 209 |
"https://alaskybis.cds.unistra.fr/Pan-STARRS/DR1/color-z-zg-g",
|
|
|
|
| 176 |
|
| 177 |
FALLBACK_BASES = {
|
| 178 |
"CDS/P/DSS2/color": [
|
|
|
|
| 179 |
"https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/color",
|
|
|
|
| 180 |
"https://stpubdata.s3.us-east-1.amazonaws.com/mast/skybackgrounds/DSSColor",
|
| 181 |
+
"https://casda.csiro.au/hips/DSS2/color",
|
| 182 |
+
"http://skies.esac.esa.int/DSSColor",
|
| 183 |
"https://alaskybis.cds.unistra.fr/DSS/DSSColor",
|
| 184 |
],
|
| 185 |
"CDS/P/DSS2/red": [
|
|
|
|
| 187 |
"https://alaskybis.cds.unistra.fr/DSS/DSS2Merged",
|
| 188 |
],
|
| 189 |
"CDS/P/2MASS/color": [
|
|
|
|
| 190 |
"https://irsa.ipac.caltech.edu/data/hips/CDS/2MASS/Color",
|
| 191 |
+
"https://casda.csiro.au/hips/2MASS/Color",
|
| 192 |
+
"http://skies.esac.esa.int/2MASSColor",
|
| 193 |
"https://alaskybis.cds.unistra.fr/2MASS/Color",
|
| 194 |
],
|
| 195 |
"CDS/P/allWISE/color": [
|
|
|
|
| 196 |
"https://irsa.ipac.caltech.edu/data/hips/CDS/AllWISE/RGB-W4-W2-W1",
|
| 197 |
+
"https://casda.csiro.au/hips/AllWISE/RGB-W4-W2-W1",
|
| 198 |
+
"http://skies.esac.esa.int/AllWISEColor",
|
| 199 |
"https://hips.china-vo.org/m/CDS_P_allWISE_color",
|
| 200 |
"https://alaskybis.cds.unistra.fr/AllWISE/RGB-W4-W2-W1",
|
| 201 |
],
|
| 202 |
"CDS/P/Mellinger/color": [
|
| 203 |
+
"https://casda.csiro.au/hips/DSS2/color",
|
| 204 |
"https://casda.csiro.au/hips/MellingerRGB",
|
| 205 |
"http://skies.esac.esa.int/MellingerRGB",
|
| 206 |
"https://hips.china-vo.org/m/CDS_P_Mellinger_color",
|
| 207 |
"https://alaskybis.cds.unistra.fr/MellingerRGB",
|
| 208 |
],
|
| 209 |
"CDS/P/PanSTARRS/DR1/color-z-zg-g": [
|
| 210 |
+
"https://stpubdata.s3.us-east-1.amazonaws.com/mast/skybackgrounds/PanSTARRS",
|
| 211 |
"https://hips.china-vo.org/m/CDS_P_PanSTARRS_DR1_color-z-zg-g",
|
| 212 |
"http://skies.esac.esa.int/Pan-STARRS/DR1/color-z-zg-g",
|
| 213 |
"https://alaskybis.cds.unistra.fr/Pan-STARRS/DR1/color-z-zg-g",
|