"omega ferric_bd530" progressive survey

This Web resource contains HiPS(*) components for omega ferric_bd530 progressive survey.
  • Label: omega ferric_bd530
  • Type: HiPS image
  • Best pixel angular resolution: 51.53"
  • Max tile order: 3 (NSIDE=8)
  • Available encoding tiles: png fits
  • Tile size: 512x512
  • FITS tile BITPIX: -32
  • Processing date: 2018-09-17T14:27Z
  • HiPS builder: Aladin/HipsGen v10.076
  • Coordinate frame: equatorial
  • Sky area: 100.0% of sky => 41253°^2
  • Associated coverage map: MOC
  • Original data access template: metadata.xml
  • Raw property file: properties
  • Base URL:

This survey can be displayed by Aladin Lite (see above), by Aladin Desktop client (just open the base URL)
or any other HiPS aware clients .
(*) The HiPS technology allows a dedicated client to access an astronomical survey at any location and at any scale. HiPS is based on HEALPix sky tessellation and it is designed for astronomical scientifical usages (low distorsion, true pixel values...).HiPS technical documentation is available here urn p.className = null == u ? c : c + " " + u, n(p, { "aria-expanded": b, "aria-label": v, tabindex: 0 }), p.insertAdjacentHTML("beforeend", i ? d + e(a, s) : d), p }, this.v = function (e, n) { var a = n.target, i = e.element, o = e.type, f = e.limit, s = e.less, c = e.typeElement, u = e.originalText, d = e.truncatedText, v = e.btnClass, b = a.classList.contains(v); if (b) { var p = i.getAttribute("aria-expanded"); if (l.h = "false" === p, "text" === o && b && (i.textContent = "", i.insertAdjacentHTML("beforeend", l.h ? u : d), s)) { var h = r(c); h.classList.add("show-more-wrapper"), h.insertAdjacentElement("beforeend", l.p(e)), i.appendChild(h) } if ("list" === o || "table" === o) for (var m = l.u(i, o), x = 0; x < m.length; x++) { var g = "list" === o ? x >= f && x < m.length - 1 : x >= f; "false" === p ? t(m[x]) : g && t(m[x], !0) } o && l.m(Object.assign({}, e, { target: a })) } }, this.u = function (e, t) { return "list" === t ? [].slice.call(e.children) : e.rows }, this.s = function (e) { var t = e.type, n = e.element, a = e.more, i = e.typeElement; if (a) if ("table" === t) n.insertAdjacentElement("afterend", l.p(e)); else { var o = r(i); o.classList.add("show-more-wrapper"), o.appendChild(l.p(e)), n.appendChild(o) } }, this.m = function (t) { var r = t.element, a = t.type, i = t.less, o = t.more, f = t.number, s = t.target, c = l.h ? i : o, u = l.h ? "expand" : "collapse", d = "table" === a ? a : "the " + a, v = r.lastElementChild; n(r, { "aria-expanded": l.h }), n(s, { "aria-expanded": l.h, "aria-label": u + " " + d }), l.g(u, t), c ? s.innerHTML = f ? c + e(r, a) : c : "table" === a ? s.parentNode.removeChild(s) : "list" === a && v.parentNode.removeChild(v) }; var p = [].slice.call(document.querySelectorAll(o)); this.g = u, this.o = Object.assign({}, a, v), p.map((function (e, t) { var n = JSON.parse(e.getAttribute("data-config")), r = b, a = Object.assign({}, r, n); l.i = Object.assign({ index: t, classArray: e.classList }, i, a, { typeElement: a.element || "span", element: e }), l.t() })) } }(); // SAMP JS var samp=function(){var t="samp.webhub.";TYPE_STRING="string",TYPE_LIST="list",TYPE_MAP="map";var e=function(t){if("string"==typeof t)return TYPE_STRING;if(t instanceof Array)return TYPE_LIST;if(t instanceof Object&&null!==t)return TYPE_MAP;throw Error("Not legal SAMP object type: "+t)},n=function(t,e){var n,r,o=t.childNodes,i=[];for(r=0;r of <"+t.tagName+"> is not a <"+e+">");i.push(n)}return i},r=function(t,e){var r=n(t,e);if(1===r.length)return r[0];throw Error("No sole child of <"+t.tagName+">")},o=function(t){var e,n,r="";for(e=0;e/g,">")},i.checkParams=function(t,n){for(r=0;r"+i.escapeXml(n)+"";if(s===TYPE_LIST){for((a=[]).push(r+"",r+" ",r+" "),o=0;o",r+" ",r+""),a.join("\n")}if(s===TYPE_MAP){for(o in(a=[]).push(r+""),a.push(r+" "),n)a.push(r+" "),a.push(r+" "+i.escapeXml(o)+""),a.push(t(n[o],r+" ")),a.push(r+" ");return a.push(r+" "),a.push(r+""),a.join("\n")}throw Error("bad type")},i.xmlToValue=function t(e,i){var a=n(e);if(0===a.length)return o(e);if(1===a.length){if("string"===(h=(p=a[0]).tagName))return o(p);if("array"===h){var s=n(r(p,"data"),"value"),c=[];for(u=0;u and/or in ?")}return v}else if(i&&("int"===h||"i4"===h))return o(p);else throw Error("Non SAMP-friendly value content: <"+h+">")}throw Error("Bad XML-RPC content - multiple elements")},i.decodeParams=function(t){var e,o=n(t,"param"),a=[];for(e=0;e");var n=r(e);if("fault"===n.tagName)return i.decodeFault(n);if("params"===n.tagName)return i.decodeParams(n)[0];throw Error("Bad XML-RPC response - unknown element <"+n.tagName+">")},i.Fault=function(t,e){this.faultString=t,this.faultCode=e},i.Fault.prototype.toString=function(){return"XML-RPC Fault ("+this.faultCode+"): "+this.faultString};var a=function(t,e){this.methodName=t,this.params=e||[]};a.prototype.toString=function(){var t;return this.methodName+"("+(t=this.params,"undefined"==typeof JSON?"...":JSON.stringify(t))+")"},a.prototype.addParam=function(t){return this.params.push(t),this},a.prototype.addParams=function(t){var e;for(e=0;e",""," "+this.methodName+""," ");for(var e=0;e",i.valueToXml(this.params[e]," ")," ");return t.push(" ",""),t.join("\n")};var s=function(t){this.endpoint=t||"http://localhost:21012/"};s.createXHR=function(){var t=function(t){var e,n,r;this.xhr=t,t.onreadystatechange=(e=this,function(){4===t.readyState&&!e.completed&&200==+t.status&&(e.completed=!0,e.responseText=t.responseText,e.responseXML=t.responseXML,e.onload&&e.onload())}),t.onerror=(n=this,function(t){!n.completed&&(n.completed=!0,n.onerror&&(t?t.toString=function(){return"No hub?"}:t="No hub?",n.onerror(t)))}),t.ontimeout=(r=this,function(t){!r.completed&&(r.completed=!0,r.onerror&&r.onerror("timeout"))})};t.prototype.open=function(t,e){this.xhr.open(t,e)},t.prototype.send=function(t){this.xhr.send(t)},t.prototype.abort=function(){this.xhr.abort()},t.prototype.setContentType=function(t){"setRequestHeader"in this.xhr&&this.xhr.setRequestHeader("Content-Type",t)};var e=function(t){var e,n,r;this.xdr=t,t.onload=(e=this,function(){if(e.responseText=t.responseText,"text/xml"===t.contentType||"application/xml"===t.contentType||/\/x-/.test(t.contentType))try{var n=new ActiveXObject("Microsoft.XMLDOM");n.loadXML(t.responseText),e.responseXML=n}catch(r){e.responseXML=r}e.onload&&e.onload()}),t.onerror=(n=this,function(t){n.onerror&&n.onerror(t)}),t.ontimeout=(r=this,function(t){r.onerror&&r.onerror(t)})};if(e.prototype.open=function(t,e){this.xdr.open(t,e)},e.prototype.send=function(t){this.xdr.send(t)},e.prototype.abort=function(){this.xdr.abort()},e.prototype.setContentType=function(t){},"undefined"!=typeof XMLHttpRequest){var n=new XMLHttpRequest;if("withCredentials"in n)return new t(n)}if("undefined"!=typeof XDomainRequest)return new e(new XDomainRequest);if(void 0!==flensed.flXHR)return new t(new flensed.flXHR({instancePooling:!0}));throw Error("no cross-origin mechanism available")},s.prototype.execute=function(t,e,n){!function(r){var o;try{(o=s.createXHR()).open("POST",r.endpoint),o.setContentType("text/xml")}catch(a){throw n(a),a}o.onload=function(){var t,r=o.responseXML;if(r)try{t=i.decodeResponse(r)}catch(a){n&&n(a);return}else{n&&n("no XML response");return}t instanceof i.Fault?n&&n(t):e&&e(t)},o.onerror=function(t){t?t.toString=function(){return"No hub?"}:t="No hub",n&&n(t)},o.send(t.toXml())}(this)};var c=function(t,e){this["samp.mtype"]=t,this["samp.params"]=e},u=function(t){this.regInfo=t,this.privateKey=t["samp.private-key"],this.privateKey,this.xClient=new s};!function(){var e,n={call:[TYPE_STRING,TYPE_STRING,TYPE_MAP],callAll:[TYPE_STRING,TYPE_MAP],callAndWait:[TYPE_STRING,TYPE_MAP,TYPE_STRING],declareMetadata:[TYPE_MAP],declareSubscriptions:[TYPE_MAP],getMetadata:[TYPE_STRING],getRegisteredClients:[],getSubscribedClients:[TYPE_STRING],getSubscriptions:[TYPE_STRING],notify:[TYPE_STRING,TYPE_MAP],notifyAll:[TYPE_MAP],ping:[],reply:[TYPE_STRING,TYPE_MAP]};for(e in n)!function(e,n){u.prototype[e]=function(r,o,s){var c=function(t){return function(){t.close()}}(this);s=s||c,i.checkParams(r,n);var u=new a(t+e);return u.addParam(this.privateKey),u.addParams(r),this.xClient.execute(u,o,s)}}(e,n[e])}(),u.prototype.unregister=function(){if(this.callbackRequest)try{this.callbackRequest.abort()}catch(e){}var n=new a(t+"unregister");n.addParam(this.privateKey);try{this.xClient.execute(n)}catch(r){}delete this.regInfo,delete this.privateKey},u.prototype.close=function(){if(!this.closed){this.closed=!0;try{this.regInfo&&this.unregister()}catch(t){}if(this.onclose){oc=this.onclose,delete this.onclose;try{oc()}catch(e){}}}},u.prototype.setCallable=function(n,r){if(this.callbackRequest)try{this.callbackRequest.abort()}catch(o){}finally{delete this.callbackRequest}if(n||this.regInfo){var i,s=new a(t+"allowReverseCallbacks");s.addParam(this.privateKey),s.addParam(n?"1":"0");var c=(i=this,function(){i.close()});n?function(o){var i,u=function(t){var e=t["samp.methodName"],r=t["samp.params"],o=void 0;"receiveNotification"===e?o=n.receiveNotification:"receiveCall"===e?o=n.receiveCall:"receiveResponse"===e&&(o=n.receiveResponse),o&&o.apply(n,r)},l=function(t){var n;if(e(t)!=TYPE_LIST){p(Error("pullCallbacks result not List"));return}for(n=0;n { let params = { realFullscreen: true, showContextMenu: true, showCooGridControl: true, showSimbadPointerControl: true, survey: hipsURL }; for (const key in aladinParams) { params[key] = aladinParams[key]; } aladin = A.aladin('#aladin-lite-div', params); // call ready callback readyCallback && readyCallback(); fetch(hipsURL + '/properties') .then((response) => response.text()) .then((text) => { const properties = parseHiPSProperties(text); const savedProperties = JSON.parse(JSON.stringify(properties)); let initialFov = 0.2; let initialRa = 0.0; let initialDec = 0.0; const urlParams = new URLSearchParams(window.location.search); if ('hips_initial_fov' in properties) { initialFov = parseFloat(properties['hips_initial_fov']); } const urlParamFov = urlParams.get('fov'); if (urlParamFov) { try { let fov = parseFloat(urlParamFov); if (! isNaN(fov)) { initialFov = fov; } } catch(error) {console.error(error);} } aladin.setFov(initialFov); if ('hips_initial_ra' in properties && 'hips_initial_dec' in properties ) { initialRa = parseFloat(properties['hips_initial_ra']); initialDec = parseFloat(properties['hips_initial_dec']); } const urlParamRa = urlParams.get('ra'); const urlParamDec = urlParams.get('dec'); if (urlParamRa && urlParamDec) { try { let ra = parseFloat(urlParamRa); if (! isNaN(ra)) { initialRa = ra; } let dec = parseFloat(urlParamDec); if (! isNaN(dec)) { initialDec = dec; } } catch(error) {console.error(error);} } aladin.gotoRaDec(initialRa, initialDec); let doi = undefined; if (properties['creator_did'].startsWith('ivo://CDS/') && properties.hasOwnProperty('hips_doi') && window.location.protocol==='https:' && window.location.host==='alasky.cds.unistra.fr') { doi = properties['hips_doi'] delete properties['hips_doi']; } setTitle(properties); buildInfoTable(properties, hipsURL, doi); const hideProperties = (urlParams.get('hideProperties')) !== null; if (window.innerWidth > 650 && !hideProperties) { document.querySelector('#hamburger').click(); } let previewURL = hipsURL + '/preview.jpg'; let hips2fitsURL = 'https://alasky.cds.unistra.fr/hips-image-services/hips2fits?hips=' + encodeURIComponent(hipsURL) + '&width=256&height=256&fov=' + initialFov + '&projection=SIN&coordsys=icrs&rotation_angle=0.0&ra=' + initialRa + '&dec=' + initialDec + '&format=jpg'; fetch(previewURL, {method: 'HEAD'}) .then((response) => {if (!response.ok) previewURL = hips2fitsURL}) .catch(() => previewURL = hips2fitsURL) .finally(() => buildHeadMetadata(savedProperties, hipsURL, previewURL, doi)) }) .catch((err) => console.log(err)); }); const buildHeadMetadata = function(properties, hipsURL, previewURL, doi) { const hipsHostname = new URL(hipsURL).hostname; if (hipsHostname.indexOf('alasky')==0 && hipsHostname.indexOf('.fr')>0) { let canonicalHiPSURL = 'https://alasky.cds.unistra.fr' + new URL(hipsURL).pathname; if (!canonicalHiPSURL.endsWith('/')) { canonicalHiPSURL += '/'; } addCanonicalMetadata(canonicalHiPSURL); buildSchemaMetadata(properties, hipsURL, previewURL, doi); addDublinCoreMetadata(properties, doi); buildTwitterMetadata(properties, hipsURL, previewURL); buildOpenGraphMetadata(properties, hipsURL, previewURL); } }; const addCanonicalMetadata = function(canonicalURL) { const link = cEl('link'); link.setAttribute('rel', 'canonical'); link.href = canonicalURL; document.head.appendChild(link); }; const addDublinCoreMetadata = function(properties, doi) { const link1 = cEl('link'); link1.setAttribute('rel', 'schema.DC'); link1.href = 'http://purl.org/dc/elements/1.1/'; document.head.appendChild(link1); const link2 = cEl('link'); link2.setAttribute('rel', 'schema.DCTERMS'); link2.href = 'http://purl.org/dc/terms/'; document.head.appendChild(link2); const dcTitle = cEl('meta'); dcTitle.setAttribute('name', 'DC.title'); dcTitle.setAttribute('content', properties['obs_title'] + ' HiPS'); document.head.appendChild(dcTitle); const dcType = cEl('meta'); dcType.setAttribute('name', 'DC.type'); dcType.setAttribute('content', 'Dataset'); document.head.appendChild(dcType); const dcCreator = cEl('meta'); dcCreator.setAttribute('name', 'DC.creator'); dcCreator.setAttribute('content', properties['hips_creator']); document.head.appendChild(dcCreator); if (properties.hasOwnProperty('hips_copyright')) { const dcPublisher = cEl('meta'); dcPublisher.setAttribute('name', 'DC.publisher'); dcPublisher.setAttribute('content', properties['hips_copyright']); document.head.appendChild(dcPublisher); } if (properties.hasOwnProperty('prov_progenitor')) { const dcSource = cEl('meta'); dcSource.setAttribute('name', 'DC.source'); dcSource.setAttribute('content', properties['prov_progenitor']); document.head.appendChild(dcSource); } if (doi) { const dcId = cEl('meta'); dcId.setAttribute('name', 'DC.identifier'); dcId.setAttribute('content', 'https://doi.org/' + doi); document.head.appendChild(dcId); } } const buildSchemaMetadata = function(properties, hipsURL, previewURL, doi) { const jsonLd = cEl('script'); jsonLd.setAttribute('type', 'application/ld+json'); let description = escapeStr(properties['obs_description']); // description field must be 50 characters length at least if (description.length<50) { if ('prov_progenitor' in properties) { description += ' - Built from data retrieved at ' + escapeStr(properties['prov_progenitor']); } } let t = '{\n'; t += '"@context": "https://schema.org/",\n'; t += '"@type": "Dataset",\n'; if (doi) { t += '"@id": "' + 'https://doi.org/' + doi + '",\n'; } t += '"name": "' + escapeStr(properties['obs_title']) + ' HiPS (Hierarchical Progressive Survey)",\n'; t += '"description": "' + description + '",\n' t += '"url": "' + hipsURL + '/' + '",\n'; let citation = undefined; if ('bib_reference_url' in properties) { citation = properties['bib_reference_url']; } else if ('bib_reference' in properties) { citation = properties['bib_reference']; } if (citation) { t += '"citation": "' + escapeStr(citation) +'",\n'; } t += '"creator": {\n'; t += '"@type": "Organization",\n'; t += '"name": "' + escapeStr(properties['hips_copyright']) + '"\n'; if (properties['creator_did'].startsWith('ivo://CDS/')) { t += ', "logo": "https://cds.unistra.fr/img/cds.png"\n'; } t += '},\n'; // license if (properties['creator_did'] && properties['creator_did'].startsWith('ivo://CDS/')) { t += '"license": "https://cds.unistra.fr/aladin-org/licences_aladin.html",\n'; } // TODO : extract keywords from description let keywords = [properties['obs_title'], "hips", "astronomy", "astrophysics", "aladin", "aladin lite"]; t += '"keywords": "' + escapeStr(keywords.join(',')) + '",\n'; t += '"thumbnailUrl": "' + previewURL + '",\n'; t += '"isAccessibleForFree": "true",\n'; // dateCreated if ('hips_creation_date' in properties) { t += '"dateCreated": "' + properties['hips_creation_date'] + '",\n'; } // dateModified if ('hips_release_date' in properties) { t += '"dateModified": "' + properties['hips_release_date'] + '",\n'; } // temporalCoverage if ('t_min' in properties && 't_max' in properties) { try { t += '"temporalCoverage": "' + mjdToISO8601(properties['t_min']) + '/' + mjdToISO8601(properties['t_max']) + '",\n'; } catch(e) { console.error(e); } } t += '"identifier": "' + properties['creator_did'] + '"\n'; t += '}'; jsonLd.textContent = t; document.head.appendChild(jsonLd); }; const buildTwitterMetadata = function(properties, hipsURL, previewURL) { const m1 = cEl('meta'); m1.setAttribute('name', 'twitter:card'); m1.setAttribute('content', 'summary'); document.head.appendChild(m1); const m2 = cEl('meta'); m2.setAttribute('name', 'twitter:title'); m2.setAttribute('content', properties['obs_title']); document.head.appendChild(m2); const m3 = cEl('meta'); m3.setAttribute('name', 'twitter:image'); m3.setAttribute('content', previewURL); document.head.appendChild(m3); }; const buildOpenGraphMetadata = function(properties, hipsURL, previewURL) { const m1 = cEl('meta'); m1.setAttribute('property', 'og:url'); m1.setAttribute('content', hipsURL + '/'); document.head.appendChild(m1); const m2 = cEl('meta'); m2.setAttribute('property', 'og:title'); m2.setAttribute('content', properties['obs_title']); document.head.appendChild(m2); const m3 = cEl('meta'); m3.setAttribute('property', 'og:image'); m3.setAttribute('content', previewURL); document.head.appendChild(m3); }; const mjdToISO8601 = function(mjd) { const millis = (mjd - 40587) * 86400000; const date = new Date(millis); const yyyy = date.getUTCFullYear(); const mm = date.getUTCMonth() + 1; // getUTCMonth returns between 0-11 (!!) const dd = date.getUTCDate(); return yyyy + '-' + (mm<10 ? '0' : '') + mm + '-' + (dd<10 ? '0' : '') + dd; }; const setTitle = function(properties) { // in HEAD const headTitle = cEl('title'); headTitle.textContent = properties['obs_title'] + ' HiPS'; document.head.appendChild(headTitle); if ('obs_description' in properties) { const metaDesc = cEl('meta'); metaDesc.setAttribute('name', 'description'); metaDesc.setAttribute('content', escapeStr(properties['obs_description'])); document.head.appendChild(metaDesc); } // in HTML body const el = document.getElementById('title'); const h1 = cEl('h1'); h1.appendChild(cTn(properties['obs_title'] + ' ')); const link = cEl('a'); link.appendChild(cTn('HiPS')); link.setAttribute('title', 'HiPS standard'); link.setAttribute('href', 'https://www.ivoa.net/documents/HiPS/'); link.setAttribute('target', '_blank'); h1.appendChild(link); el.appendChild(h1); } const parseHiPSProperties = function (propertiesStr) { if (propertiesStr == null) { return null; } const propertiesDict = {}; // remove CR characters propertiesStr = propertiesStr.replace(/[\r]/g, ''); // split on LF const lines = propertiesStr.split('\n'); let lastKey; for (let k = 0; k < lines.length; k++) { const l = lines[k].trim(); // ignore comments lines if (l.slice(0, 1) === '#') { continue; } var idx = l.indexOf('='); if (idx < 0) { if (lastKey) { propertiesDict[lastKey] += l; } continue; } var key = l.slice(0, idx).trim(); var value = l.slice(idx + 1).trim(); propertiesDict[key] = value; lastKey = key; } return propertiesDict; }; const formatKey = function (key) { const mustKeys = ['creator_did', 'obs_title', 'hips_version', 'hips_release_date', 'hips_status', 'hips_frame', 'hips_order', 'hips_tile_format', 'dataproduct_type', 'dataproduct_subtype', 'hips_cube_depth']; const shouldKeys = ['obs_description', 'prov_progenitor', 'obs_regime', 'hips_creation_date', 'hips_cat_nrows', 'hips_initial_ra', 'hips_initial_dec', 'hips_initial_fov', 't_min', 't_max', 'em_min', 'em_max']; const keyDescriptions = { creator_did: 'Unique ID of the HiPS', publisher_id: 'Unique ID of the HiPS publisher', obs_collection: 'Short name of original data set', obs_title: 'Data set title', obs_description: 'Data set description', obs_ack: 'Acknowledgment mention', prov_progenitor: 'Provenance of the original data', bib_reference: 'Bibliographic reference', bib_reference_url: 'URL to bibliographic reference', obs_copyright: 'Copyright mention associated to the original data', obs_copyright_url: 'URL to a copyright mention', hips_copyright: 'Copyright mention associated to the HiPS', obs_regime: 'General wavelength', hips_version: 'HiPS version number', hips_builder: 'Name and version of the tool used for building the HiPS', hips_creator: 'Institute or person who built the HiPS', hips_creation_date: 'HiPS first creation date', hips_release_date: 'Last HiPS update date', hips_frame: 'Coordinate frame reference', hips_order: 'Deepest HiPS order', hips_tile_width: 'Tiles width in pixels ', hips_tile_format: 'List of available tile formats', hips_pixel_cut: 'Suggested pixel display cut range (physical values)', hips_data_range: 'Pixel data range taken into account during the HiPS generation (physical values)', hips_pixel_bitpix: 'FITS tile BITPIX code', data_pixel_bitpix: 'Original data BITPIX code', t_min: 'Start time of the observations', t_max: 'Stop time of the observations', em_min: 'Start in spectral coordinates', em_max: 'Stop in spectral coordinates', moc_sky_fraction: 'Fraction of the sky covers by the MOC associated to the HiPS' }; const retNode = cEl('span'); if (key in keyDescriptions) { retNode.setAttribute('title', keyDescriptions[key]); } if (mustKeys.includes(key)) { const strongNode = cEl('strong'); strongNode.appendChild(cTn(key)); retNode.appendChild(strongNode); } else if (shouldKeys.includes(key)) { const italicNode = cEl('em'); italicNode.appendChild(cTn(key)); retNode.appendChild(italicNode); } else { retNode.appendChild(cTn(key)); } return retNode; }; const createShowMOCCb = function() { const labelMocCb = cEl('label'); labelMocCb.classList.add('show-moc-btn'); labelMocCb.setAttribute('title', 'Display HiPS MOC coverage'); const mocCb = cEl('input'); mocCb.setAttribute('id', 'showMOC'); mocCb.setAttribute('type', 'checkbox'); labelMocCb.appendChild(mocCb); labelMocCb.appendChild(cTn('Show coverage')); mocCb.onchange = function(e) { if (e.currentTarget.checked) { if (! moc) { moc = A.MOCFromURL(hipsURL + '/Moc.fits', { color: 'red' }); aladin.addMOC(moc); } moc.show(); } else { moc.hide(); }; }; return labelMocCb; }; const formatValue = function (value, key) { let returnedNode; const textNode = cTn(value); const spanNode = cEl('span'); spanNode.appendChild(textNode); if (key.startsWith('hipsgen_params')) { spanNode.classList.add('hipsgen_params'); } else { spanNode.classList.add(key); } if (value.startsWith('http')) { const linkNode = cEl('a'); linkNode.appendChild(spanNode); linkNode.setAttribute('href', value); linkNode.setAttribute('target', '_blank'); return linkNode; } if (key === 'moc_sky_fraction') { const node = cEl('div'); const fourPiSteradiansInDeg2 = 4 * Math.PI * Math.pow(180 / Math.PI, 2); const fraction = parseFloat(value); let area = parseFloat((fraction * 100).toFixed(6)) + '%' + ' ⇒ ' + (fourPiSteradiansInDeg2 * parseFloat(value)).toFixed(2) + ' deg²'; node.appendChild(cTn(area)); node.appendChild(cEl('br')); node.appendChild(cEl('br')); node.appendChild(createShowMOCCb()); const d = cEl('div'); return node; } if (key === 't_min' || key === 't_max') { spanNode.appendChild(cTn(' (MJD)')); spanNode.appendChild(cEl('br')); italicNode = cEl('em'); italicNode.appendChild(cTn(mjdToISO8601(value))); spanNode.appendChild(italicNode); return spanNode; } if (key === 'em_min' || key === 'em_max') { const valueMeters = value; const italic = cEl('em'); if (valueMeters>1) { const unit = 'm'; italic.appendChild(cTn(' ' + unit)); spanNode.append(italic); return spanNode; } const valueMm = value * 1e3; if (valueMm>1) { const unit = 'mm'; const node = cEl('span'); node.appendChild(cTn(parseFloat(valueMm.toFixed(2)))); italic.appendChild(cTn(' ' + unit)); node.append(italic); return node; } const valueUm = value * 1e6; if (valueUm>1) { const unit = 'μm'; const node = cEl('span'); node.appendChild(cTn(parseFloat(valueUm.toFixed(2)))); italic.appendChild(cTn(' ' + unit)); node.append(italic); return node; } const valueNm = value * 1e9; if (valueNm>1) { const unit = 'nm'; const node = cEl('span'); node.appendChild(cTn(parseFloat(valueNm.toFixed(2)))); italic.appendChild(cTn(' ' + unit)); node.append(italic); return node; } } return spanNode; }; const buildInfoTable = function (propDic, hipsURL, doi) { const linkEl = document.querySelector('.links'); const creatorDid = propDic['creator_did']; const noPrefixDid = creatorDid.replace('ivo://', ''); let h2Title = cTn(noPrefixDid); const h2 = cEl('h2'); h2.appendChild(h2Title); linkEl.appendChild(h2); if (doi) { const doiDiv = cEl('div'); doiDiv.classList.add('doiDisplay'); const doiURL = 'https://doi.org/' + doi; const aDoi = cEl('a'); aDoi.classList.add('doiLink'); aDoi.setAttribute('href', doiURL); aDoi.appendChild(cTn(doiURL)) doiDiv.appendChild(aDoi); linkEl.appendChild(doiDiv); } const dataAccessH3 = cEl('h3'); dataAccessH3.appendChild(cTn('Data Access')); linkEl.appendChild(dataAccessH3); const dataAccessDiv = cEl('div'); dataAccessDiv.classList.add('dataAccess'); // access hips2fits const aHiPS2FITS = cEl('a'); aHiPS2FITS.setAttribute('title', 'Create FITS and JPEG/PNG cutouts for ' + propDic['obs_title']); let hips2fitsHref = 'https://alasky.cds.unistra.fr/hips-image-services/hips2fits#hips=' + (noPrefixDid.startsWith('CDS/') ? encodeURIComponent(noPrefixDid) : encodeURIComponent(hipsURL)); if ('hips_initial_ra' in propDic && 'hips_initial_dec' in propDic) { hips2fitsHref += '&ra=' + propDic['hips_initial_ra'] + '&dec=' + propDic['hips_initial_dec']; } if ('hips_initial_fov' in propDic) { hips2fitsHref += '&fov=' + propDic['hips_initial_fov']; } aHiPS2FITS.setAttribute('href', hips2fitsHref); aHiPS2FITS.setAttribute('target', '_blank'); aHiPS2FITS.appendChild(cTn('HiPS2FITS cutouts')); aHiPS2FITS.onclick = function() { let newHips2fitsHref = 'https://alasky.cds.unistra.fr/hips-image-services/hips2fits#projection=SIN&hips=' + (noPrefixDid.startsWith('CDS/') ? encodeURIComponent(noPrefixDid) : encodeURIComponent(hipsURL)); let raDec = aladin.getRaDec(); let fov = aladin.getFov()[0]; newHips2fitsHref += '&ra=' + raDec[0].toFixed(6); newHips2fitsHref += '&dec=' + raDec[1].toFixed(6); newHips2fitsHref += '&fov=' + fov.toFixed(4); this.setAttribute('href', newHips2fitsHref); return true; }; dataAccessDiv.appendChild(aHiPS2FITS); dataAccessDiv.appendChild(cEl('br')); dataAccessDiv.appendChild(cEl('br')); // SAMP button to send to Aladin Desktop const sampShareBtn = cEl('button'); sampShareBtn.classList.add('send-samp-btn'); sampShareBtn.appendChild(cTn('➤ Send to Aladin Desktop')); dataAccessDiv.appendChild(sampShareBtn); var configureSampEnabled = function(isHubRunning) { sampShareBtn.hidden = !isHubRunning; }; sampShareBtn.onclick = function () { connector.runWithConnection(function(connection) { let cmd = 'load ' + hipsURL; var msg = new samp.Message('script.aladin.send', {'script': cmd}); connection.notifyAll([msg]) }); }; // create and setup SAMP connector var connector = new samp.Connector(propDic['obs_title']); connector.onHubAvailability(configureSampEnabled, 2000); onunload = function() { connector.unregister(); }; linkEl.appendChild(dataAccessDiv); const propH3 = cEl('h3'); propH3.appendChild(cTn('Properties')); const propLink = cEl('a'); propLink.setAttribute('target', '_blank'); propLink.setAttribute('href', hipsURL + '/properties'); propLink.setAttribute('title', 'Access HiPS properties file'); propLink.appendChild(cTn(' 🔗')); propH3.appendChild(propLink); linkEl.appendChild(propH3); const yellowKeys = ['creator_did', 'obs_title', 'moc_sky_fraction', 'obs_description', 'obs_collection', 'hips_creator', 'prov_progenitor', 'bib_reference', 'bib_reference_url', 'obs_copyright', 'obs_copyright_url', 'dataproduct_type']; const yellowTable = cEl('table'); const yellowTBody = cEl('tbody'); yellowTable.appendChild(yellowTBody); yellowTable.classList.add('styled-table', 'yellow-table'); for (const key of yellowKeys) { if (propDic.hasOwnProperty(key)) { const tr = cEl('tr'); const td1 = cEl('td'); td1.appendChild(formatKey(key)); tr.appendChild(td1); const td2 = cEl('td'); td2.appendChild(formatValue(propDic[key], key)); tr.appendChild(td2); yellowTBody.append(tr) delete propDic[key]; } else if (key === 'moc_sky_fraction') { // force creation of show coverage button if moc_sky_fraction missing const tr = cEl('tr'); const td1 = cEl('td'); td1.appendChild(cTn('')); tr.appendChild(td1); const td2 = cEl('td'); td2.appendChild(createShowMOCCb()); tr.appendChild(td2); yellowTBody.append(tr) } } linkEl.appendChild(yellowTable); const purpleKeys = ['t_min', 't_max', 'em_min', 'em_max', 'obs_regime', 'client_category']; const purpleTable = cEl('table'); const purpleTBody = cEl('tbody'); purpleTable.appendChild(purpleTBody); purpleTable.classList.add('styled-table', 'purple-table'); for (const key of purpleKeys) { if (propDic.hasOwnProperty(key)) { const tr = cEl('tr'); const td1 = cEl('td'); td1.appendChild(formatKey(key)); tr.appendChild(td1); const td2 = cEl('td'); td2.appendChild(formatValue(propDic[key], key)); tr.appendChild(td2); purpleTBody.append(tr); delete propDic[key]; } } linkEl.appendChild(purpleTable); const greenKeys = ['hips_frame', 'hips_tile_format', 'hips_order', 'hips_initial_ra', 'hips_initial_dec', 'hips_initial_fov', 'obs_collection', 'hips_creator']; const initialRa = propDic['hips_initial_ra']; const initialDec = propDic['hips_initial_dec']; const initialFov = propDic['hips_initial_fov']; const greenTable = cEl('table'); const greenTBody = cEl('tbody'); greenTable.appendChild(greenTBody); greenTable.classList.add('styled-table', 'green-table'); for (const key of greenKeys) { if (propDic.hasOwnProperty(key)) { const tr = cEl('tr'); const td1 = cEl('td'); td1.appendChild(formatKey(key)); tr.appendChild(td1); const td2 = cEl('td'); if (key === 'hips_tile_format') { let curFormat = aladin.getBaseImageLayer().imgFormat; const formats = propDic[key].split(' '); if (! curFormat) { curFormat = formats[0]; } for (let k = 0; k0) { aladin.gotoObject(this.value); } this.blur(); }); const previousTargetFn = function() { const idxSelected = targets.indexOf(select.value); if (idxSelected>0) { select.value = targets[idxSelected - 1]; select.dispatchEvent(new Event('change')); } }; const nextTargetFn = function() { const idxSelected = targets.indexOf(select.value); if (idxSelected