diff --git a/.buildinfo b/.buildinfo index f44e962..caaec6f 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 3a324aa3bdbd0549e0962a4882d09fa3 +config: 5d34cb93619b1cc1eceb8111f9990357 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_collections/notebooks/01_Getting_Started.html b/_collections/notebooks/01_Getting_Started.html index 596e41d..7eddd58 100644 --- a/_collections/notebooks/01_Getting_Started.html +++ b/_collections/notebooks/01_Getting_Started.html @@ -8,7 +8,7 @@ -
aladin = Aladin(
- survey="http://alasky.cds.unistra.fr/DECaPS/DR1/color/",
+ survey="CDS/P/DECaPS/DR1/color",
show_coo_grid=True,
target="galactic center",
coo_frame="galactic",
diff --git a/_collections/notebooks/01_Getting_Started.ipynb b/_collections/notebooks/01_Getting_Started.ipynb
index c1d4209..a698e51 100644
--- a/_collections/notebooks/01_Getting_Started.ipynb
+++ b/_collections/notebooks/01_Getting_Started.ipynb
@@ -42,7 +42,7 @@
],
"source": [
"aladin = Aladin(\n",
- " survey=\"http://alasky.cds.unistra.fr/DECaPS/DR1/color/\",\n",
+ " survey=\"CDS/P/DECaPS/DR1/color\",\n",
" show_coo_grid=True,\n",
" target=\"galactic center\",\n",
" coo_frame=\"galactic\",\n",
diff --git a/_collections/notebooks/02_Base_Commands.html b/_collections/notebooks/02_Base_Commands.html
index 59164ed..e2cdc30 100644
--- a/_collections/notebooks/02_Base_Commands.html
+++ b/_collections/notebooks/02_Base_Commands.html
@@ -8,7 +8,7 @@
- Aladin commands — ipyaladin 0.5.0 documentation
+ Aladin commands — ipyaladin 0.5.1 documentation
@@ -39,7 +39,7 @@
-
+
@@ -490,7 +490,7 @@ Aladin commands
-
They can also be modified in the next cells with an interactive effect on the generated view.
<SkyCoord (ICRS): (ra, dec) in deg
- (266.41681662, -29.00782497)>
+ (266.41681663, -29.00782497)>
The x-axis field of view (fov) can be set
@@ -633,7 +633,7 @@[3]:
@@ -583,7 +583,7 @@ Built-in methods
-
[7]:
@@ -603,7 +603,7 @@ Built-in methods
-{"state": {"f1e0ebfdbcdf4b968cf07b06ba86c06c": {"model_name": "LayoutModel", "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "state": {"_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null}}, "5cc3e43f3d2f4a16a80f4d70841e9b7b": {"model_name": "AnyModel", "model_module": "anywidget", "model_module_version": "~0.9.*", "state": {"_anywidget_id": "ipyaladin.widget.Aladin", "_base_layer_last_view": "https://alaskybis.unistra.fr/DSS/DSSColor", "_css": ".cell-output-ipywidget-background{background:transparent}.jp-OutputArea-output,.aladin-widget{background-color:transparent}.aladin-widget .aladin-measurement-div{max-height:100px}\n", "_dom_classes": [], "_esm": "function _(n){n.charAt(0)===\"_\"&&(n=n.slice(1));let e=n.split(\"_\");for(let a=1;a{this.aladin.gotoRaDec(c,l),console.info(`FITS located at ra: ${c}, dec: ${l}`),URL.revokeObjectURL(o)});this.aladin.setOverlayImageLayer(d,s.name)}handleAddCatalogFromURL(e){let a=h(e.options||{});this.aladin.addCatalog(r.catalogFromURL(e.votable_URL,a))}handleAddMOCFromURL(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromURL(e.moc_URL,a))}handleAddMOCFromDict(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromJSON(e.moc_dict,a))}handleAddOverlay(e){let a=e.regions_infos,s=h(e.graphic_options||{});s.color||(s.color=\"red\");let i=r.graphicOverlay(s);this.aladin.addOverlay(i);for(let t of a){let o=t.infos;switch(t.region_type){case\"stcs\":i.addFootprints(r.footprintsFromSTCS(o.stcs,t.options));break;case\"circle\":i.add(r.circle(o.ra,o.dec,o.radius,t.options));break;case\"ellipse\":i.add(r.ellipse(o.ra,o.dec,o.a,o.b,o.theta,t.options));break;case\"line\":t.options.lineWidth=t.options.lineWidth||3,i.add(r.vector(o.ra1,o.dec1,o.ra2,o.dec2,t.options));break;case\"polygon\":i.add(r.polygon(o.vertices,t.options));break}}}handleChangeColormap(e){this.aladin.getBaseImageLayer().setColormap(e.colormap)}handleGetJPGThumbnail(){this.aladin.exportAsPNG()}handleTriggerSelection(e){let a=e.selection_type;a===\"rectangle\"?a=\"rect\":a===\"polygon\"&&(a=\"poly\"),this.aladin.select(a)}handleAddTable(e,a){let s=h(e.options||{}),i=a[0].buffer,t=new TextDecoder(\"utf-8\"),o=new Blob([t.decode(i)]),d=URL.createObjectURL(o);r.catalogFromURL(d,Object.assign(s,{onClick:\"showTable\"}),c=>{this.aladin.addCatalog(c)},!1),URL.revokeObjectURL(d)}};var u=class{constructor(e,a,s){this.aladin=e,this.aladinDiv=a,this.model=s,this.messageHandler=new p(e,s),this.currentDivNumber=parseInt(a.id.split(\"-\").pop())}isLastDiv(){if(this.currentDivNumber===g)return!0;let e=g;for(let a=e;a>=0;a--){let s=document.getElementById(`aladin-lite-div-${a}`);if(s&&s.style.display!==\"none\"){e=a;break}}return f(e),this.currentDivNumber===e}updateWCS(){this.isLastDiv()&&this.model.set(\"_wcs\",this.aladin.getViewWCS())}update2AxisFoV(){if(!this.isLastDiv())return;let e=this.aladin.getFov();this.model.set(\"_fov_xy\",{x:e[0],y:e[1]})}subscribeAll(){let e=new m,a=new m;this.aladin.on(\"positionChanged\",t=>{if(a.locked){a.unlock();return}e.lock();let o=[t.ra,t.dec];this.updateWCS(),this.model.set(\"_target\",`${o[0]} ${o[1]}`),this.model.save_changes()}),this.model.on(\"change:_target\",()=>{if(e.locked){e.unlock();return}a.lock();let t=this.model.get(\"_target\"),[o,d]=t.split(\" \");this.aladin.gotoRaDec(o,d)});let s=new m,i=new m;this.aladin.on(\"zoomChanged\",t=>{if(i.locked){i.unlock();return}s.lock(),this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_fov\",parseFloat(t.toFixed(5))),this.model.save_changes()}),this.model.on(\"change:_fov\",()=>{if(s.locked){s.unlock();return}i.lock();let t=this.model.get(\"_fov\");this.aladin.setFoV(t)}),this.model.on(\"change:_height\",()=>{let t=this.model.get(\"_height\");this.aladinDiv.style.height=`${t}px`,this.updateWCS(),this.update2AxisFoV(),this.model.save_changes()}),this.aladin.on(\"cooFrameChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"projectionChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"layerChanged\",(t,o,d)=>{o===\"base\"&&this.model.set(\"_survey_body\",t.hipsBody||\"sky\"),!(o!==\"base\"||d!==\"ADDED\")&&(this.updateWCS(),this.model.set(\"_base_layer_last_view\",t.id),this.model.save_changes())}),this.aladin.on(\"resizeChanged\",(t,o)=>{if(t===1&&o===1){this.model.set(\"_is_reduced\",!0),this.model.save_changes();return}else this.model.set(\"_is_reduced\",!1);this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_height\",o),this.model.save_changes()}),this.aladin.on(\"objectHovered\",t=>{t.data!==void 0&&this.model.send({event_type:\"object_hovered\",content:{ra:t.ra,dec:t.dec}})}),this.aladin.on(\"objectClicked\",t=>{if(t){let o={ra:t.ra,dec:t.dec};t.data!==void 0&&(o.data=t.data),this.model.set(\"clicked_object\",o),this.model.send({event_type:\"object_clicked\",content:o}),this.model.save_changes()}}),this.aladin.on(\"click\",t=>{this.model.send({event_type:\"click\",content:t})}),this.aladin.on(\"select\",t=>{let o=t.map(c=>c.map(l=>({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})));this.model.set(\"_selected_objects\",o),this.model.save_changes();let d=[];t.forEach(c=>{c.forEach(l=>{d.push({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})})}),this.model.send({event_type:\"select\",content:d})}),this.model.on(\"change:coo_frame\",()=>{this.aladin.setFrame(this.model.get(\"coo_frame\"))}),this.model.on(\"change:survey\",()=>{this.aladin.setImageSurvey(this.model.get(\"survey\"))}),this.model.on(\"change:overlay_survey\",()=>{this.aladin.setOverlayImageLayer(this.model.get(\"overlay_survey\"))}),this.model.on(\"change:overlay_survey_opacity\",()=>{this.aladin.getOverlayImageLayer().setAlpha(this.model.get(\"overlay_survey_opacity\"))}),this.eventHandlers={add_marker:this.messageHandler.handleAddMarker,change_fov:this.messageHandler.handleChangeFoV,goto_ra_dec:this.messageHandler.handleGotoRaDec,save_view_as_image:this.messageHandler.handleSaveViewAsImage,add_fits:this.messageHandler.handleAddFits,add_catalog_from_URL:this.messageHandler.handleAddCatalogFromURL,add_MOC_from_URL:this.messageHandler.handleAddMOCFromURL,add_MOC_from_dict:this.messageHandler.handleAddMOCFromDict,add_overlay:this.messageHandler.handleAddOverlay,change_colormap:this.messageHandler.handleChangeColormap,get_JPG_thumbnail:this.messageHandler.handleGetJPGThumbnail,trigger_selection:this.messageHandler.handleTriggerSelection,add_table:this.messageHandler.handleAddTable},this.model.on(\"msg:custom\",(t,o)=>{let d=t.event_name,c=this.eventHandlers[d];if(c)c.call(this,t,o);else throw new Error(`Unknown event name: ${d}`)})}unsubscribeAll(){this.model.off(\"change:_target\"),this.model.off(\"change:_fov\"),this.model.off(\"change:_height\"),this.model.off(\"change:coo_frame\"),this.model.off(\"change:survey\"),this.model.off(\"change:overlay_survey\"),this.model.off(\"change:overlay_survey_opacity\"),this.model.off(\"change:trigger_event\"),this.model.off(\"msg:custom\")}};function b(n,e){f(g+1);let a=n.get(\"_init_options\"),s={};for(let l in a)s[_(l)]=a[l];let i=document.createElement(\"div\");i.classList.add(\"aladin-widget\"),i.style.height=`${n.get(\"_height\")}px`,i.id=`aladin-lite-div-${g}`;let t=new r.aladin(i,s);e.appendChild(i);let o=n.get(\"_target\").split(\" \");t.gotoRaDec(o[0],o[1]);let d={...t.getFov()};n.set(\"_fov_xy\",{x:d[0],y:d[1]});let c={...t.getViewWCS()};return n.set(\"_wcs\",c),n.set(\"_is_loaded\",!0),n.save_changes(),{aladin:t,aladinDiv:i}}async function C({model:n}){await r.init}function k({model:n,el:e}){let{aladin:a,aladinDiv:s}=b(n,e),i=new u(a,s,n);return i.subscribeAll(),()=>{i.unsubscribeAll()}}var I={initialize:C,render:k};export{I as default};\n", "_fov": 10.0, "_fov_xy": {}, "_height": 400, "_init_options": {"show_simbad_pointer_control": true, "show_coo_grid_control": true, "show_settings_control": true, "show_context_menu": true, "survey": "P/DSS2/red", "fov": 10, "target": "LMC", "reticle_color": "#ff89ff", "show_status_bar": true}, "_is_loaded": true, "_is_reduced": false, "_model_module": "anywidget", "_model_module_version": "~0.9.*", "_model_name": "AnyModel", "_ready": false, "_selected_objects": [], "_survey_body": "sky", "_target": "80.89416667 -69.75611111", "_view_count": null, "_view_module": "anywidget", "_view_module_version": "~0.9.*", "_view_name": "AnyView", "_wcs": {}, "clicked_object": {}, "coo_frame": "ICRS", "layout": "IPY_MODEL_f1e0ebfdbcdf4b968cf07b06ba86c06c", "overlay_survey": "", "overlay_survey_opacity": 0.0, "projection": "SIN", "survey": "P/DSS2/red", "tabbable": null, "tooltip": null}}, "95f686d5c7fe4e6dbc71768eb97a2eb2": {"model_name": "LayoutModel", "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "state": {"_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null}}, "0391a5eec1f5488297cbaee4971e82ff": {"model_name": "AnyModel", "model_module": "anywidget", "model_module_version": "~0.9.*", "state": {"_anywidget_id": "ipyaladin.widget.Aladin", "_base_layer_last_view": "https://alaskybis.unistra.fr/DSS/DSSColor", "_css": ".cell-output-ipywidget-background{background:transparent}.jp-OutputArea-output,.aladin-widget{background-color:transparent}.aladin-widget .aladin-measurement-div{max-height:100px}\n", "_dom_classes": [], "_esm": "function _(n){n.charAt(0)===\"_\"&&(n=n.slice(1));let e=n.split(\"_\");for(let a=1;a{this.aladin.gotoRaDec(c,l),console.info(`FITS located at ra: ${c}, dec: ${l}`),URL.revokeObjectURL(o)});this.aladin.setOverlayImageLayer(d,s.name)}handleAddCatalogFromURL(e){let a=h(e.options||{});this.aladin.addCatalog(r.catalogFromURL(e.votable_URL,a))}handleAddMOCFromURL(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromURL(e.moc_URL,a))}handleAddMOCFromDict(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromJSON(e.moc_dict,a))}handleAddOverlay(e){let a=e.regions_infos,s=h(e.graphic_options||{});s.color||(s.color=\"red\");let i=r.graphicOverlay(s);this.aladin.addOverlay(i);for(let t of a){let o=t.infos;switch(t.region_type){case\"stcs\":i.addFootprints(r.footprintsFromSTCS(o.stcs,t.options));break;case\"circle\":i.add(r.circle(o.ra,o.dec,o.radius,t.options));break;case\"ellipse\":i.add(r.ellipse(o.ra,o.dec,o.a,o.b,o.theta,t.options));break;case\"line\":t.options.lineWidth=t.options.lineWidth||3,i.add(r.vector(o.ra1,o.dec1,o.ra2,o.dec2,t.options));break;case\"polygon\":i.add(r.polygon(o.vertices,t.options));break}}}handleChangeColormap(e){this.aladin.getBaseImageLayer().setColormap(e.colormap)}handleGetJPGThumbnail(){this.aladin.exportAsPNG()}handleTriggerSelection(e){let a=e.selection_type;a===\"rectangle\"?a=\"rect\":a===\"polygon\"&&(a=\"poly\"),this.aladin.select(a)}handleAddTable(e,a){let s=h(e.options||{}),i=a[0].buffer,t=new TextDecoder(\"utf-8\"),o=new Blob([t.decode(i)]),d=URL.createObjectURL(o);r.catalogFromURL(d,Object.assign(s,{onClick:\"showTable\"}),c=>{this.aladin.addCatalog(c)},!1),URL.revokeObjectURL(d)}};var u=class{constructor(e,a,s){this.aladin=e,this.aladinDiv=a,this.model=s,this.messageHandler=new p(e,s),this.currentDivNumber=parseInt(a.id.split(\"-\").pop())}isLastDiv(){if(this.currentDivNumber===g)return!0;let e=g;for(let a=e;a>=0;a--){let s=document.getElementById(`aladin-lite-div-${a}`);if(s&&s.style.display!==\"none\"){e=a;break}}return f(e),this.currentDivNumber===e}updateWCS(){this.isLastDiv()&&this.model.set(\"_wcs\",this.aladin.getViewWCS())}update2AxisFoV(){if(!this.isLastDiv())return;let e=this.aladin.getFov();this.model.set(\"_fov_xy\",{x:e[0],y:e[1]})}subscribeAll(){let e=new m,a=new m;this.aladin.on(\"positionChanged\",t=>{if(a.locked){a.unlock();return}e.lock();let o=[t.ra,t.dec];this.updateWCS(),this.model.set(\"_target\",`${o[0]} ${o[1]}`),this.model.save_changes()}),this.model.on(\"change:_target\",()=>{if(e.locked){e.unlock();return}a.lock();let t=this.model.get(\"_target\"),[o,d]=t.split(\" \");this.aladin.gotoRaDec(o,d)});let s=new m,i=new m;this.aladin.on(\"zoomChanged\",t=>{if(i.locked){i.unlock();return}s.lock(),this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_fov\",parseFloat(t.toFixed(5))),this.model.save_changes()}),this.model.on(\"change:_fov\",()=>{if(s.locked){s.unlock();return}i.lock();let t=this.model.get(\"_fov\");this.aladin.setFoV(t)}),this.model.on(\"change:_height\",()=>{let t=this.model.get(\"_height\");this.aladinDiv.style.height=`${t}px`,this.updateWCS(),this.update2AxisFoV(),this.model.save_changes()}),this.aladin.on(\"cooFrameChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"projectionChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"layerChanged\",(t,o,d)=>{o===\"base\"&&this.model.set(\"_survey_body\",t.hipsBody||\"sky\"),!(o!==\"base\"||d!==\"ADDED\")&&(this.updateWCS(),this.model.set(\"_base_layer_last_view\",t.id),this.model.save_changes())}),this.aladin.on(\"resizeChanged\",(t,o)=>{if(t===1&&o===1){this.model.set(\"_is_reduced\",!0),this.model.save_changes();return}else this.model.set(\"_is_reduced\",!1);this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_height\",o),this.model.save_changes()}),this.aladin.on(\"objectHovered\",t=>{t.data!==void 0&&this.model.send({event_type:\"object_hovered\",content:{ra:t.ra,dec:t.dec}})}),this.aladin.on(\"objectClicked\",t=>{if(t){let o={ra:t.ra,dec:t.dec};t.data!==void 0&&(o.data=t.data),this.model.set(\"clicked_object\",o),this.model.send({event_type:\"object_clicked\",content:o}),this.model.save_changes()}}),this.aladin.on(\"click\",t=>{this.model.send({event_type:\"click\",content:t})}),this.aladin.on(\"select\",t=>{let o=t.map(c=>c.map(l=>({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})));this.model.set(\"_selected_objects\",o),this.model.save_changes();let d=[];t.forEach(c=>{c.forEach(l=>{d.push({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})})}),this.model.send({event_type:\"select\",content:d})}),this.model.on(\"change:coo_frame\",()=>{this.aladin.setFrame(this.model.get(\"coo_frame\"))}),this.model.on(\"change:survey\",()=>{this.aladin.setImageSurvey(this.model.get(\"survey\"))}),this.model.on(\"change:overlay_survey\",()=>{this.aladin.setOverlayImageLayer(this.model.get(\"overlay_survey\"))}),this.model.on(\"change:overlay_survey_opacity\",()=>{this.aladin.getOverlayImageLayer().setAlpha(this.model.get(\"overlay_survey_opacity\"))}),this.eventHandlers={add_marker:this.messageHandler.handleAddMarker,change_fov:this.messageHandler.handleChangeFoV,goto_ra_dec:this.messageHandler.handleGotoRaDec,save_view_as_image:this.messageHandler.handleSaveViewAsImage,add_fits:this.messageHandler.handleAddFits,add_catalog_from_URL:this.messageHandler.handleAddCatalogFromURL,add_MOC_from_URL:this.messageHandler.handleAddMOCFromURL,add_MOC_from_dict:this.messageHandler.handleAddMOCFromDict,add_overlay:this.messageHandler.handleAddOverlay,change_colormap:this.messageHandler.handleChangeColormap,get_JPG_thumbnail:this.messageHandler.handleGetJPGThumbnail,trigger_selection:this.messageHandler.handleTriggerSelection,add_table:this.messageHandler.handleAddTable},this.model.on(\"msg:custom\",(t,o)=>{let d=t.event_name,c=this.eventHandlers[d];if(c)c.call(this,t,o);else throw new Error(`Unknown event name: ${d}`)})}unsubscribeAll(){this.model.off(\"change:_target\"),this.model.off(\"change:_fov\"),this.model.off(\"change:_height\"),this.model.off(\"change:coo_frame\"),this.model.off(\"change:survey\"),this.model.off(\"change:overlay_survey\"),this.model.off(\"change:overlay_survey_opacity\"),this.model.off(\"change:trigger_event\"),this.model.off(\"msg:custom\")}};function b(n,e){f(g+1);let a=n.get(\"_init_options\"),s={};for(let l in a)s[_(l)]=a[l];let i=document.createElement(\"div\");i.classList.add(\"aladin-widget\"),i.style.height=`${n.get(\"_height\")}px`,i.id=`aladin-lite-div-${g}`;let t=new r.aladin(i,s);e.appendChild(i);let o=n.get(\"_target\").split(\" \");t.gotoRaDec(o[0],o[1]);let d={...t.getFov()};n.set(\"_fov_xy\",{x:d[0],y:d[1]});let c={...t.getViewWCS()};return n.set(\"_wcs\",c),n.set(\"_is_loaded\",!0),n.save_changes(),{aladin:t,aladinDiv:i}}async function C({model:n}){await r.init}function k({model:n,el:e}){let{aladin:a,aladinDiv:s}=b(n,e),i=new u(a,s,n);return i.subscribeAll(),()=>{i.unsubscribeAll()}}var I={initialize:C,render:k};export{I as default};\n", "_fov": 1.0, "_fov_xy": {}, "_height": 400, "_init_options": {"show_simbad_pointer_control": true, "show_coo_grid_control": true, "show_settings_control": true, "show_context_menu": true, "target": "269.956288 -23.823863", "fov": 1}, "_is_loaded": true, "_is_reduced": false, "_model_module": "anywidget", "_model_module_version": "~0.9.*", "_model_name": "AnyModel", "_ready": false, "_selected_objects": [], "_survey_body": "sky", "_target": "269.956288 -23.823863", "_view_count": null, "_view_module": "anywidget", "_view_module_version": "~0.9.*", "_view_name": "AnyView", "_wcs": {}, "clicked_object": {}, "coo_frame": "ICRS", "layout": "IPY_MODEL_95f686d5c7fe4e6dbc71768eb97a2eb2", "overlay_survey": "", "overlay_survey_opacity": 0.0, "projection": "SIN", "survey": "https://alaskybis.unistra.fr/DSS/DSSColor", "tabbable": null, "tooltip": null}}}, "version_major": 2, "version_minor": 0}
+{"state": {"545338ee2f6a48c98209902344bdb379": {"model_name": "LayoutModel", "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "state": {"_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null}}, "3443e47f5fb24092a971fdf626f1a765": {"model_name": "AnyModel", "model_module": "anywidget", "model_module_version": "~0.9.*", "state": {"_anywidget_id": "ipyaladin.widget.Aladin", "_base_layer_last_view": "https://alaskybis.unistra.fr/DSS/DSSColor", "_css": ".cell-output-ipywidget-background{background:transparent}.jp-OutputArea-output,.aladin-widget{background-color:transparent}.aladin-widget .aladin-measurement-div{max-height:100px}\n", "_dom_classes": [], "_esm": "function v(n){n.charAt(0)===\"_\"&&(n=n.slice(1));let e=n.split(\"_\");for(let a=1;a{this.aladin.gotoRaDec(c,l),console.info(`FITS located at ra: ${c}, dec: ${l}`),URL.revokeObjectURL(o)});this.aladin.setOverlayImageLayer(d,s.name)}handleAddCatalogFromURL(e){let a=h(e.options||{});this.aladin.addCatalog(r.catalogFromURL(e.votable_URL,a))}handleAddMOCFromURL(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromURL(e.moc_URL,a))}handleAddMOCFromDict(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromJSON(e.moc_dict,a))}handleAddOverlay(e){let a=e.regions_infos,s=h(e.graphic_options||{});s.color||(s.color=\"red\");let i=r.graphicOverlay(s);this.aladin.addOverlay(i);for(let t of a){let o=t.infos;switch(t.region_type){case\"stcs\":i.addFootprints(r.footprintsFromSTCS(o.stcs,t.options));break;case\"circle\":i.add(r.circle(o.ra,o.dec,o.radius,t.options));break;case\"ellipse\":i.add(r.ellipse(o.ra,o.dec,o.a,o.b,o.theta,t.options));break;case\"line\":t.options.lineWidth=t.options.lineWidth||3,i.add(r.vector(o.ra1,o.dec1,o.ra2,o.dec2,t.options));break;case\"polygon\":i.add(r.polygon(o.vertices,t.options));break}}}handleChangeColormap(e){this.aladin.getBaseImageLayer().setColormap(e.colormap)}handleGetJPGThumbnail(){this.aladin.exportAsPNG()}handleTriggerSelection(e){let a=e.selection_type;a===\"rectangle\"?a=\"rect\":a===\"polygon\"&&(a=\"poly\"),this.aladin.select(a)}handleAddTable(e,a){let s=h(e.options||{}),i=a[0].buffer,t=new TextDecoder(\"utf-8\"),o=new Blob([t.decode(i)]),d=URL.createObjectURL(o);r.catalogFromURL(d,Object.assign(s,{onClick:\"showTable\"}),c=>{this.aladin.addCatalog(c)},!1),URL.revokeObjectURL(d)}};var u=class{constructor(e,a,s){this.aladin=e,this.aladinDiv=a,this.model=s,this.messageHandler=new p(e,s),this.currentDivNumber=parseInt(a.id.split(\"-\").pop())}isLastDiv(){if(this.currentDivNumber===g)return!0;let e=g;for(let a=e;a>=0;a--){let s=document.getElementById(`aladin-lite-div-${a}`);if(s&&s.style.display!==\"none\"){e=a;break}}return f(e),this.currentDivNumber===e}updateWCS(){this.isLastDiv()&&this.model.set(\"_wcs\",this.aladin.getViewWCS())}update2AxisFoV(){if(!this.isLastDiv())return;let e=this.aladin.getFov();this.model.set(\"_fov_xy\",{x:e[0],y:e[1]})}subscribeAll(){let e=new m,a=new m;this.aladin.on(\"positionChanged\",t=>{if(a.locked){a.unlock();return}e.lock();let o=[t.ra,t.dec];this.updateWCS(),this.model.set(\"_target\",`${o[0]} ${o[1]}`),this.model.save_changes()}),this.model.on(\"change:_target\",()=>{if(e.locked){e.unlock();return}a.lock();let t=this.model.get(\"_target\"),[o,d]=t.split(\" \");this.aladin.gotoRaDec(o,d)});let s=new m,i=new m;this.aladin.on(\"zoomChanged\",t=>{if(i.locked){i.unlock();return}s.lock(),this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_fov\",parseFloat(t.toFixed(5))),this.model.save_changes()}),this.model.on(\"change:_fov\",()=>{if(s.locked){s.unlock();return}i.lock();let t=this.model.get(\"_fov\");this.aladin.setFoV(t)}),this.model.on(\"change:_height\",()=>{_(this.model.get(\"_height\"),this.aladinDiv),this.updateWCS(),this.update2AxisFoV(),this.model.save_changes()}),this.aladin.on(\"cooFrameChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"projectionChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"layerChanged\",(t,o,d)=>{o===\"base\"&&this.model.set(\"_survey_body\",t.hipsBody||\"sky\"),!(o!==\"base\"||d!==\"ADDED\")&&(this.updateWCS(),this.model.set(\"_base_layer_last_view\",t.id),this.model.save_changes())}),this.aladin.on(\"resizeChanged\",(t,o)=>{if(t===1&&o===1){this.model.set(\"_is_reduced\",!0),this.model.save_changes();return}else this.model.set(\"_is_reduced\",!1);this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_height\",o),this.model.save_changes()}),this.aladin.on(\"objectHovered\",t=>{t.data!==void 0&&this.model.send({event_type:\"object_hovered\",content:{ra:t.ra,dec:t.dec}})}),this.aladin.on(\"objectClicked\",t=>{if(t){let o={ra:t.ra,dec:t.dec};t.data!==void 0&&(o.data=t.data),this.model.set(\"clicked_object\",o),this.model.send({event_type:\"object_clicked\",content:o}),this.model.save_changes()}}),this.aladin.on(\"click\",t=>{this.model.send({event_type:\"click\",content:t})}),this.aladin.on(\"select\",t=>{let o=t.map(c=>c.map(l=>({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})));this.model.set(\"_selected_objects\",o),this.model.save_changes();let d=[];t.forEach(c=>{c.forEach(l=>{d.push({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})})}),this.model.send({event_type:\"select\",content:d})}),this.model.on(\"change:coo_frame\",()=>{this.aladin.setFrame(this.model.get(\"coo_frame\"))}),this.model.on(\"change:survey\",()=>{this.aladin.setImageSurvey(this.model.get(\"survey\"))}),this.model.on(\"change:overlay_survey\",()=>{this.aladin.setOverlayImageLayer(this.model.get(\"overlay_survey\"))}),this.model.on(\"change:overlay_survey_opacity\",()=>{this.aladin.getOverlayImageLayer().setAlpha(this.model.get(\"overlay_survey_opacity\"))}),this.eventHandlers={add_marker:this.messageHandler.handleAddMarker,change_fov:this.messageHandler.handleChangeFoV,goto_ra_dec:this.messageHandler.handleGotoRaDec,save_view_as_image:this.messageHandler.handleSaveViewAsImage,add_fits:this.messageHandler.handleAddFits,add_catalog_from_URL:this.messageHandler.handleAddCatalogFromURL,add_MOC_from_URL:this.messageHandler.handleAddMOCFromURL,add_MOC_from_dict:this.messageHandler.handleAddMOCFromDict,add_overlay:this.messageHandler.handleAddOverlay,change_colormap:this.messageHandler.handleChangeColormap,get_JPG_thumbnail:this.messageHandler.handleGetJPGThumbnail,trigger_selection:this.messageHandler.handleTriggerSelection,add_table:this.messageHandler.handleAddTable},this.model.on(\"msg:custom\",(t,o)=>{let d=t.event_name,c=this.eventHandlers[d];if(c)c.call(this,t,o);else throw new Error(`Unknown event name: ${d}`)})}unsubscribeAll(){this.model.off(\"change:_target\"),this.model.off(\"change:_fov\"),this.model.off(\"change:_height\"),this.model.off(\"change:coo_frame\"),this.model.off(\"change:survey\"),this.model.off(\"change:overlay_survey\"),this.model.off(\"change:overlay_survey_opacity\"),this.model.off(\"change:trigger_event\"),this.model.off(\"msg:custom\")}};function C(n,e){f(g+1);let a=n.get(\"_init_options\"),s={};for(let l in a)s[v(l)]=a[l];let i=document.createElement(\"div\");i.classList.add(\"aladin-widget\"),_(n.get(\"_height\"),i),i.id=`aladin-lite-div-${g}`;let t=new r.aladin(i,s);e.appendChild(i);let o=n.get(\"_target\").split(\" \");t.gotoRaDec(o[0],o[1]);let d={...t.getFov()};n.set(\"_fov_xy\",{x:d[0],y:d[1]});let c={...t.getViewWCS()};return n.set(\"_wcs\",c),n.set(\"_is_loaded\",!0),n.save_changes(),{aladin:t,aladinDiv:i}}async function k({model:n}){await r.init}function w({model:n,el:e}){let{aladin:a,aladinDiv:s}=C(n,e),i=new u(a,s,n);return i.subscribeAll(),()=>{i.unsubscribeAll()}}var W={initialize:k,render:w};export{W as default};\n", "_fov": 10.0, "_fov_xy": {}, "_height": 400, "_init_options": {"show_simbad_pointer_control": true, "show_coo_grid_control": true, "show_settings_control": true, "show_context_menu": true, "survey": "P/DSS2/red", "fov": 10, "target": "LMC", "reticle_color": "#ff89ff", "show_status_bar": true}, "_is_loaded": true, "_is_reduced": false, "_model_module": "anywidget", "_model_module_version": "~0.9.*", "_model_name": "AnyModel", "_ready": false, "_selected_objects": [], "_survey_body": "sky", "_target": "80.89417 -69.75611", "_view_count": null, "_view_module": "anywidget", "_view_module_version": "~0.9.*", "_view_name": "AnyView", "_wcs": {}, "clicked_object": {}, "coo_frame": "ICRS", "layout": "IPY_MODEL_545338ee2f6a48c98209902344bdb379", "overlay_survey": "", "overlay_survey_opacity": 0.0, "projection": "SIN", "survey": "P/DSS2/red", "tabbable": null, "tooltip": null}}, "804cd71ec7954e24b82e421c48f98b23": {"model_name": "LayoutModel", "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "state": {"_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null}}, "5a5e6365165b41a4bccfeea50c27db97": {"model_name": "AnyModel", "model_module": "anywidget", "model_module_version": "~0.9.*", "state": {"_anywidget_id": "ipyaladin.widget.Aladin", "_base_layer_last_view": "https://alaskybis.unistra.fr/DSS/DSSColor", "_css": ".cell-output-ipywidget-background{background:transparent}.jp-OutputArea-output,.aladin-widget{background-color:transparent}.aladin-widget .aladin-measurement-div{max-height:100px}\n", "_dom_classes": [], "_esm": "function v(n){n.charAt(0)===\"_\"&&(n=n.slice(1));let e=n.split(\"_\");for(let a=1;a{this.aladin.gotoRaDec(c,l),console.info(`FITS located at ra: ${c}, dec: ${l}`),URL.revokeObjectURL(o)});this.aladin.setOverlayImageLayer(d,s.name)}handleAddCatalogFromURL(e){let a=h(e.options||{});this.aladin.addCatalog(r.catalogFromURL(e.votable_URL,a))}handleAddMOCFromURL(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromURL(e.moc_URL,a))}handleAddMOCFromDict(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromJSON(e.moc_dict,a))}handleAddOverlay(e){let a=e.regions_infos,s=h(e.graphic_options||{});s.color||(s.color=\"red\");let i=r.graphicOverlay(s);this.aladin.addOverlay(i);for(let t of a){let o=t.infos;switch(t.region_type){case\"stcs\":i.addFootprints(r.footprintsFromSTCS(o.stcs,t.options));break;case\"circle\":i.add(r.circle(o.ra,o.dec,o.radius,t.options));break;case\"ellipse\":i.add(r.ellipse(o.ra,o.dec,o.a,o.b,o.theta,t.options));break;case\"line\":t.options.lineWidth=t.options.lineWidth||3,i.add(r.vector(o.ra1,o.dec1,o.ra2,o.dec2,t.options));break;case\"polygon\":i.add(r.polygon(o.vertices,t.options));break}}}handleChangeColormap(e){this.aladin.getBaseImageLayer().setColormap(e.colormap)}handleGetJPGThumbnail(){this.aladin.exportAsPNG()}handleTriggerSelection(e){let a=e.selection_type;a===\"rectangle\"?a=\"rect\":a===\"polygon\"&&(a=\"poly\"),this.aladin.select(a)}handleAddTable(e,a){let s=h(e.options||{}),i=a[0].buffer,t=new TextDecoder(\"utf-8\"),o=new Blob([t.decode(i)]),d=URL.createObjectURL(o);r.catalogFromURL(d,Object.assign(s,{onClick:\"showTable\"}),c=>{this.aladin.addCatalog(c)},!1),URL.revokeObjectURL(d)}};var u=class{constructor(e,a,s){this.aladin=e,this.aladinDiv=a,this.model=s,this.messageHandler=new p(e,s),this.currentDivNumber=parseInt(a.id.split(\"-\").pop())}isLastDiv(){if(this.currentDivNumber===g)return!0;let e=g;for(let a=e;a>=0;a--){let s=document.getElementById(`aladin-lite-div-${a}`);if(s&&s.style.display!==\"none\"){e=a;break}}return f(e),this.currentDivNumber===e}updateWCS(){this.isLastDiv()&&this.model.set(\"_wcs\",this.aladin.getViewWCS())}update2AxisFoV(){if(!this.isLastDiv())return;let e=this.aladin.getFov();this.model.set(\"_fov_xy\",{x:e[0],y:e[1]})}subscribeAll(){let e=new m,a=new m;this.aladin.on(\"positionChanged\",t=>{if(a.locked){a.unlock();return}e.lock();let o=[t.ra,t.dec];this.updateWCS(),this.model.set(\"_target\",`${o[0]} ${o[1]}`),this.model.save_changes()}),this.model.on(\"change:_target\",()=>{if(e.locked){e.unlock();return}a.lock();let t=this.model.get(\"_target\"),[o,d]=t.split(\" \");this.aladin.gotoRaDec(o,d)});let s=new m,i=new m;this.aladin.on(\"zoomChanged\",t=>{if(i.locked){i.unlock();return}s.lock(),this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_fov\",parseFloat(t.toFixed(5))),this.model.save_changes()}),this.model.on(\"change:_fov\",()=>{if(s.locked){s.unlock();return}i.lock();let t=this.model.get(\"_fov\");this.aladin.setFoV(t)}),this.model.on(\"change:_height\",()=>{_(this.model.get(\"_height\"),this.aladinDiv),this.updateWCS(),this.update2AxisFoV(),this.model.save_changes()}),this.aladin.on(\"cooFrameChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"projectionChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"layerChanged\",(t,o,d)=>{o===\"base\"&&this.model.set(\"_survey_body\",t.hipsBody||\"sky\"),!(o!==\"base\"||d!==\"ADDED\")&&(this.updateWCS(),this.model.set(\"_base_layer_last_view\",t.id),this.model.save_changes())}),this.aladin.on(\"resizeChanged\",(t,o)=>{if(t===1&&o===1){this.model.set(\"_is_reduced\",!0),this.model.save_changes();return}else this.model.set(\"_is_reduced\",!1);this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_height\",o),this.model.save_changes()}),this.aladin.on(\"objectHovered\",t=>{t.data!==void 0&&this.model.send({event_type:\"object_hovered\",content:{ra:t.ra,dec:t.dec}})}),this.aladin.on(\"objectClicked\",t=>{if(t){let o={ra:t.ra,dec:t.dec};t.data!==void 0&&(o.data=t.data),this.model.set(\"clicked_object\",o),this.model.send({event_type:\"object_clicked\",content:o}),this.model.save_changes()}}),this.aladin.on(\"click\",t=>{this.model.send({event_type:\"click\",content:t})}),this.aladin.on(\"select\",t=>{let o=t.map(c=>c.map(l=>({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})));this.model.set(\"_selected_objects\",o),this.model.save_changes();let d=[];t.forEach(c=>{c.forEach(l=>{d.push({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})})}),this.model.send({event_type:\"select\",content:d})}),this.model.on(\"change:coo_frame\",()=>{this.aladin.setFrame(this.model.get(\"coo_frame\"))}),this.model.on(\"change:survey\",()=>{this.aladin.setImageSurvey(this.model.get(\"survey\"))}),this.model.on(\"change:overlay_survey\",()=>{this.aladin.setOverlayImageLayer(this.model.get(\"overlay_survey\"))}),this.model.on(\"change:overlay_survey_opacity\",()=>{this.aladin.getOverlayImageLayer().setAlpha(this.model.get(\"overlay_survey_opacity\"))}),this.eventHandlers={add_marker:this.messageHandler.handleAddMarker,change_fov:this.messageHandler.handleChangeFoV,goto_ra_dec:this.messageHandler.handleGotoRaDec,save_view_as_image:this.messageHandler.handleSaveViewAsImage,add_fits:this.messageHandler.handleAddFits,add_catalog_from_URL:this.messageHandler.handleAddCatalogFromURL,add_MOC_from_URL:this.messageHandler.handleAddMOCFromURL,add_MOC_from_dict:this.messageHandler.handleAddMOCFromDict,add_overlay:this.messageHandler.handleAddOverlay,change_colormap:this.messageHandler.handleChangeColormap,get_JPG_thumbnail:this.messageHandler.handleGetJPGThumbnail,trigger_selection:this.messageHandler.handleTriggerSelection,add_table:this.messageHandler.handleAddTable},this.model.on(\"msg:custom\",(t,o)=>{let d=t.event_name,c=this.eventHandlers[d];if(c)c.call(this,t,o);else throw new Error(`Unknown event name: ${d}`)})}unsubscribeAll(){this.model.off(\"change:_target\"),this.model.off(\"change:_fov\"),this.model.off(\"change:_height\"),this.model.off(\"change:coo_frame\"),this.model.off(\"change:survey\"),this.model.off(\"change:overlay_survey\"),this.model.off(\"change:overlay_survey_opacity\"),this.model.off(\"change:trigger_event\"),this.model.off(\"msg:custom\")}};function C(n,e){f(g+1);let a=n.get(\"_init_options\"),s={};for(let l in a)s[v(l)]=a[l];let i=document.createElement(\"div\");i.classList.add(\"aladin-widget\"),_(n.get(\"_height\"),i),i.id=`aladin-lite-div-${g}`;let t=new r.aladin(i,s);e.appendChild(i);let o=n.get(\"_target\").split(\" \");t.gotoRaDec(o[0],o[1]);let d={...t.getFov()};n.set(\"_fov_xy\",{x:d[0],y:d[1]});let c={...t.getViewWCS()};return n.set(\"_wcs\",c),n.set(\"_is_loaded\",!0),n.save_changes(),{aladin:t,aladinDiv:i}}async function k({model:n}){await r.init}function w({model:n,el:e}){let{aladin:a,aladinDiv:s}=C(n,e),i=new u(a,s,n);return i.subscribeAll(),()=>{i.unsubscribeAll()}}var W={initialize:k,render:w};export{W as default};\n", "_fov": 1.0, "_fov_xy": {}, "_height": 400, "_init_options": {"show_simbad_pointer_control": true, "show_coo_grid_control": true, "show_settings_control": true, "show_context_menu": true, "target": "269.956288 -23.823863", "fov": 1}, "_is_loaded": true, "_is_reduced": false, "_model_module": "anywidget", "_model_module_version": "~0.9.*", "_model_name": "AnyModel", "_ready": false, "_selected_objects": [], "_survey_body": "sky", "_target": "269.956288 -23.823863", "_view_count": null, "_view_module": "anywidget", "_view_module_version": "~0.9.*", "_view_name": "AnyView", "_wcs": {}, "clicked_object": {}, "coo_frame": "ICRS", "layout": "IPY_MODEL_804cd71ec7954e24b82e421c48f98b23", "overlay_survey": "", "overlay_survey_opacity": 0.0, "projection": "SIN", "survey": "https://alaskybis.unistra.fr/DSS/DSSColor", "tabbable": null, "tooltip": null}}}, "version_major": 2, "version_minor": 0}
diff --git a/_collections/notebooks/03_Functions.ipynb b/_collections/notebooks/03_Functions.ipynb
index 0bb72e8..66a9df7 100644
--- a/_collections/notebooks/03_Functions.ipynb
+++ b/_collections/notebooks/03_Functions.ipynb
@@ -13,10 +13,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-19T15:51:22.927280Z",
- "iopub.status.busy": "2024-09-19T15:51:22.927088Z",
- "iopub.status.idle": "2024-09-19T15:51:23.644902Z",
- "shell.execute_reply": "2024-09-19T15:51:23.644268Z"
+ "iopub.execute_input": "2024-09-30T16:02:44.217760Z",
+ "iopub.status.busy": "2024-09-30T16:02:44.217322Z",
+ "iopub.status.idle": "2024-09-30T16:02:44.875843Z",
+ "shell.execute_reply": "2024-09-30T16:02:44.875214Z"
}
},
"outputs": [],
@@ -39,17 +39,17 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-19T15:51:23.647282Z",
- "iopub.status.busy": "2024-09-19T15:51:23.646812Z",
- "iopub.status.idle": "2024-09-19T15:51:24.398085Z",
- "shell.execute_reply": "2024-09-19T15:51:24.397571Z"
+ "iopub.execute_input": "2024-09-30T16:02:44.878127Z",
+ "iopub.status.busy": "2024-09-30T16:02:44.877687Z",
+ "iopub.status.idle": "2024-09-30T16:02:45.237733Z",
+ "shell.execute_reply": "2024-09-30T16:02:45.237183Z"
}
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "5cc3e43f3d2f4a16a80f4d70841e9b7b",
+ "model_id": "3443e47f5fb24092a971fdf626f1a765",
"version_major": 2,
"version_minor": 1
},
@@ -78,10 +78,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-19T15:51:24.400084Z",
- "iopub.status.busy": "2024-09-19T15:51:24.399696Z",
- "iopub.status.idle": "2024-09-19T15:51:24.503313Z",
- "shell.execute_reply": "2024-09-19T15:51:24.502856Z"
+ "iopub.execute_input": "2024-09-30T16:02:45.239654Z",
+ "iopub.status.busy": "2024-09-30T16:02:45.239279Z",
+ "iopub.status.idle": "2024-09-30T16:02:45.343168Z",
+ "shell.execute_reply": "2024-09-30T16:02:45.342598Z"
}
},
"outputs": [],
@@ -106,10 +106,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-19T15:51:24.505015Z",
- "iopub.status.busy": "2024-09-19T15:51:24.504814Z",
- "iopub.status.idle": "2024-09-19T15:51:24.508774Z",
- "shell.execute_reply": "2024-09-19T15:51:24.508193Z"
+ "iopub.execute_input": "2024-09-30T16:02:45.345167Z",
+ "iopub.status.busy": "2024-09-30T16:02:45.344791Z",
+ "iopub.status.idle": "2024-09-30T16:02:45.348826Z",
+ "shell.execute_reply": "2024-09-30T16:02:45.348219Z"
}
},
"outputs": [
@@ -133,10 +133,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-19T15:51:24.510572Z",
- "iopub.status.busy": "2024-09-19T15:51:24.510214Z",
- "iopub.status.idle": "2024-09-19T15:51:24.514151Z",
- "shell.execute_reply": "2024-09-19T15:51:24.513605Z"
+ "iopub.execute_input": "2024-09-30T16:02:45.350660Z",
+ "iopub.status.busy": "2024-09-30T16:02:45.350284Z",
+ "iopub.status.idle": "2024-09-30T16:02:45.353850Z",
+ "shell.execute_reply": "2024-09-30T16:02:45.353357Z"
}
},
"outputs": [],
@@ -187,17 +187,17 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-19T15:51:24.515820Z",
- "iopub.status.busy": "2024-09-19T15:51:24.515623Z",
- "iopub.status.idle": "2024-09-19T15:51:24.524650Z",
- "shell.execute_reply": "2024-09-19T15:51:24.524022Z"
+ "iopub.execute_input": "2024-09-30T16:02:45.355691Z",
+ "iopub.status.busy": "2024-09-30T16:02:45.355319Z",
+ "iopub.status.idle": "2024-09-30T16:02:45.364054Z",
+ "shell.execute_reply": "2024-09-30T16:02:45.363431Z"
}
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "0391a5eec1f5488297cbaee4971e82ff",
+ "model_id": "5a5e6365165b41a4bccfeea50c27db97",
"version_major": 2,
"version_minor": 1
},
@@ -220,10 +220,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-19T15:51:24.526186Z",
- "iopub.status.busy": "2024-09-19T15:51:24.526002Z",
- "iopub.status.idle": "2024-09-19T15:51:24.629260Z",
- "shell.execute_reply": "2024-09-19T15:51:24.628750Z"
+ "iopub.execute_input": "2024-09-30T16:02:45.365913Z",
+ "iopub.status.busy": "2024-09-30T16:02:45.365555Z",
+ "iopub.status.idle": "2024-09-30T16:02:45.469196Z",
+ "shell.execute_reply": "2024-09-30T16:02:45.468591Z"
}
},
"outputs": [],
@@ -243,10 +243,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-19T15:51:24.631028Z",
- "iopub.status.busy": "2024-09-19T15:51:24.630666Z",
- "iopub.status.idle": "2024-09-19T15:51:24.633502Z",
- "shell.execute_reply": "2024-09-19T15:51:24.633044Z"
+ "iopub.execute_input": "2024-09-30T16:02:45.471212Z",
+ "iopub.status.busy": "2024-09-30T16:02:45.470867Z",
+ "iopub.status.idle": "2024-09-30T16:02:45.473981Z",
+ "shell.execute_reply": "2024-09-30T16:02:45.473487Z"
}
},
"outputs": [],
@@ -271,7 +271,7 @@
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {
- "0391a5eec1f5488297cbaee4971e82ff": {
+ "3443e47f5fb24092a971fdf626f1a765": {
"model_module": "anywidget",
"model_module_version": "~0.9.*",
"model_name": "AnyModel",
@@ -280,53 +280,7 @@
"_base_layer_last_view": "https://alaskybis.unistra.fr/DSS/DSSColor",
"_css": ".cell-output-ipywidget-background{background:transparent}.jp-OutputArea-output,.aladin-widget{background-color:transparent}.aladin-widget .aladin-measurement-div{max-height:100px}\n",
"_dom_classes": [],
- "_esm": "function _(n){n.charAt(0)===\"_\"&&(n=n.slice(1));let e=n.split(\"_\");for(let a=1;a{this.aladin.gotoRaDec(c,l),console.info(`FITS located at ra: ${c}, dec: ${l}`),URL.revokeObjectURL(o)});this.aladin.setOverlayImageLayer(d,s.name)}handleAddCatalogFromURL(e){let a=h(e.options||{});this.aladin.addCatalog(r.catalogFromURL(e.votable_URL,a))}handleAddMOCFromURL(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromURL(e.moc_URL,a))}handleAddMOCFromDict(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromJSON(e.moc_dict,a))}handleAddOverlay(e){let a=e.regions_infos,s=h(e.graphic_options||{});s.color||(s.color=\"red\");let i=r.graphicOverlay(s);this.aladin.addOverlay(i);for(let t of a){let o=t.infos;switch(t.region_type){case\"stcs\":i.addFootprints(r.footprintsFromSTCS(o.stcs,t.options));break;case\"circle\":i.add(r.circle(o.ra,o.dec,o.radius,t.options));break;case\"ellipse\":i.add(r.ellipse(o.ra,o.dec,o.a,o.b,o.theta,t.options));break;case\"line\":t.options.lineWidth=t.options.lineWidth||3,i.add(r.vector(o.ra1,o.dec1,o.ra2,o.dec2,t.options));break;case\"polygon\":i.add(r.polygon(o.vertices,t.options));break}}}handleChangeColormap(e){this.aladin.getBaseImageLayer().setColormap(e.colormap)}handleGetJPGThumbnail(){this.aladin.exportAsPNG()}handleTriggerSelection(e){let a=e.selection_type;a===\"rectangle\"?a=\"rect\":a===\"polygon\"&&(a=\"poly\"),this.aladin.select(a)}handleAddTable(e,a){let s=h(e.options||{}),i=a[0].buffer,t=new TextDecoder(\"utf-8\"),o=new Blob([t.decode(i)]),d=URL.createObjectURL(o);r.catalogFromURL(d,Object.assign(s,{onClick:\"showTable\"}),c=>{this.aladin.addCatalog(c)},!1),URL.revokeObjectURL(d)}};var u=class{constructor(e,a,s){this.aladin=e,this.aladinDiv=a,this.model=s,this.messageHandler=new p(e,s),this.currentDivNumber=parseInt(a.id.split(\"-\").pop())}isLastDiv(){if(this.currentDivNumber===g)return!0;let e=g;for(let a=e;a>=0;a--){let s=document.getElementById(`aladin-lite-div-${a}`);if(s&&s.style.display!==\"none\"){e=a;break}}return f(e),this.currentDivNumber===e}updateWCS(){this.isLastDiv()&&this.model.set(\"_wcs\",this.aladin.getViewWCS())}update2AxisFoV(){if(!this.isLastDiv())return;let e=this.aladin.getFov();this.model.set(\"_fov_xy\",{x:e[0],y:e[1]})}subscribeAll(){let e=new m,a=new m;this.aladin.on(\"positionChanged\",t=>{if(a.locked){a.unlock();return}e.lock();let o=[t.ra,t.dec];this.updateWCS(),this.model.set(\"_target\",`${o[0]} ${o[1]}`),this.model.save_changes()}),this.model.on(\"change:_target\",()=>{if(e.locked){e.unlock();return}a.lock();let t=this.model.get(\"_target\"),[o,d]=t.split(\" \");this.aladin.gotoRaDec(o,d)});let s=new m,i=new m;this.aladin.on(\"zoomChanged\",t=>{if(i.locked){i.unlock();return}s.lock(),this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_fov\",parseFloat(t.toFixed(5))),this.model.save_changes()}),this.model.on(\"change:_fov\",()=>{if(s.locked){s.unlock();return}i.lock();let t=this.model.get(\"_fov\");this.aladin.setFoV(t)}),this.model.on(\"change:_height\",()=>{let t=this.model.get(\"_height\");this.aladinDiv.style.height=`${t}px`,this.updateWCS(),this.update2AxisFoV(),this.model.save_changes()}),this.aladin.on(\"cooFrameChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"projectionChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"layerChanged\",(t,o,d)=>{o===\"base\"&&this.model.set(\"_survey_body\",t.hipsBody||\"sky\"),!(o!==\"base\"||d!==\"ADDED\")&&(this.updateWCS(),this.model.set(\"_base_layer_last_view\",t.id),this.model.save_changes())}),this.aladin.on(\"resizeChanged\",(t,o)=>{if(t===1&&o===1){this.model.set(\"_is_reduced\",!0),this.model.save_changes();return}else this.model.set(\"_is_reduced\",!1);this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_height\",o),this.model.save_changes()}),this.aladin.on(\"objectHovered\",t=>{t.data!==void 0&&this.model.send({event_type:\"object_hovered\",content:{ra:t.ra,dec:t.dec}})}),this.aladin.on(\"objectClicked\",t=>{if(t){let o={ra:t.ra,dec:t.dec};t.data!==void 0&&(o.data=t.data),this.model.set(\"clicked_object\",o),this.model.send({event_type:\"object_clicked\",content:o}),this.model.save_changes()}}),this.aladin.on(\"click\",t=>{this.model.send({event_type:\"click\",content:t})}),this.aladin.on(\"select\",t=>{let o=t.map(c=>c.map(l=>({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})));this.model.set(\"_selected_objects\",o),this.model.save_changes();let d=[];t.forEach(c=>{c.forEach(l=>{d.push({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})})}),this.model.send({event_type:\"select\",content:d})}),this.model.on(\"change:coo_frame\",()=>{this.aladin.setFrame(this.model.get(\"coo_frame\"))}),this.model.on(\"change:survey\",()=>{this.aladin.setImageSurvey(this.model.get(\"survey\"))}),this.model.on(\"change:overlay_survey\",()=>{this.aladin.setOverlayImageLayer(this.model.get(\"overlay_survey\"))}),this.model.on(\"change:overlay_survey_opacity\",()=>{this.aladin.getOverlayImageLayer().setAlpha(this.model.get(\"overlay_survey_opacity\"))}),this.eventHandlers={add_marker:this.messageHandler.handleAddMarker,change_fov:this.messageHandler.handleChangeFoV,goto_ra_dec:this.messageHandler.handleGotoRaDec,save_view_as_image:this.messageHandler.handleSaveViewAsImage,add_fits:this.messageHandler.handleAddFits,add_catalog_from_URL:this.messageHandler.handleAddCatalogFromURL,add_MOC_from_URL:this.messageHandler.handleAddMOCFromURL,add_MOC_from_dict:this.messageHandler.handleAddMOCFromDict,add_overlay:this.messageHandler.handleAddOverlay,change_colormap:this.messageHandler.handleChangeColormap,get_JPG_thumbnail:this.messageHandler.handleGetJPGThumbnail,trigger_selection:this.messageHandler.handleTriggerSelection,add_table:this.messageHandler.handleAddTable},this.model.on(\"msg:custom\",(t,o)=>{let d=t.event_name,c=this.eventHandlers[d];if(c)c.call(this,t,o);else throw new Error(`Unknown event name: ${d}`)})}unsubscribeAll(){this.model.off(\"change:_target\"),this.model.off(\"change:_fov\"),this.model.off(\"change:_height\"),this.model.off(\"change:coo_frame\"),this.model.off(\"change:survey\"),this.model.off(\"change:overlay_survey\"),this.model.off(\"change:overlay_survey_opacity\"),this.model.off(\"change:trigger_event\"),this.model.off(\"msg:custom\")}};function b(n,e){f(g+1);let a=n.get(\"_init_options\"),s={};for(let l in a)s[_(l)]=a[l];let i=document.createElement(\"div\");i.classList.add(\"aladin-widget\"),i.style.height=`${n.get(\"_height\")}px`,i.id=`aladin-lite-div-${g}`;let t=new r.aladin(i,s);e.appendChild(i);let o=n.get(\"_target\").split(\" \");t.gotoRaDec(o[0],o[1]);let d={...t.getFov()};n.set(\"_fov_xy\",{x:d[0],y:d[1]});let c={...t.getViewWCS()};return n.set(\"_wcs\",c),n.set(\"_is_loaded\",!0),n.save_changes(),{aladin:t,aladinDiv:i}}async function C({model:n}){await r.init}function k({model:n,el:e}){let{aladin:a,aladinDiv:s}=b(n,e),i=new u(a,s,n);return i.subscribeAll(),()=>{i.unsubscribeAll()}}var I={initialize:C,render:k};export{I as default};\n",
- "_fov": 1.0,
- "_fov_xy": {},
- "_height": 400,
- "_init_options": {
- "fov": 1,
- "show_context_menu": true,
- "show_coo_grid_control": true,
- "show_settings_control": true,
- "show_simbad_pointer_control": true,
- "target": "269.956288 -23.823863"
- },
- "_is_loaded": true,
- "_is_reduced": false,
- "_model_module": "anywidget",
- "_model_module_version": "~0.9.*",
- "_model_name": "AnyModel",
- "_ready": false,
- "_selected_objects": [],
- "_survey_body": "sky",
- "_target": "269.956288 -23.823863",
- "_view_count": null,
- "_view_module": "anywidget",
- "_view_module_version": "~0.9.*",
- "_view_name": "AnyView",
- "_wcs": {},
- "clicked_object": {},
- "coo_frame": "ICRS",
- "layout": "IPY_MODEL_95f686d5c7fe4e6dbc71768eb97a2eb2",
- "overlay_survey": "",
- "overlay_survey_opacity": 0.0,
- "projection": "SIN",
- "survey": "https://alaskybis.unistra.fr/DSS/DSSColor",
- "tabbable": null,
- "tooltip": null
- }
- },
- "5cc3e43f3d2f4a16a80f4d70841e9b7b": {
- "model_module": "anywidget",
- "model_module_version": "~0.9.*",
- "model_name": "AnyModel",
- "state": {
- "_anywidget_id": "ipyaladin.widget.Aladin",
- "_base_layer_last_view": "https://alaskybis.unistra.fr/DSS/DSSColor",
- "_css": ".cell-output-ipywidget-background{background:transparent}.jp-OutputArea-output,.aladin-widget{background-color:transparent}.aladin-widget .aladin-measurement-div{max-height:100px}\n",
- "_dom_classes": [],
- "_esm": "function _(n){n.charAt(0)===\"_\"&&(n=n.slice(1));let e=n.split(\"_\");for(let a=1;a{this.aladin.gotoRaDec(c,l),console.info(`FITS located at ra: ${c}, dec: ${l}`),URL.revokeObjectURL(o)});this.aladin.setOverlayImageLayer(d,s.name)}handleAddCatalogFromURL(e){let a=h(e.options||{});this.aladin.addCatalog(r.catalogFromURL(e.votable_URL,a))}handleAddMOCFromURL(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromURL(e.moc_URL,a))}handleAddMOCFromDict(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromJSON(e.moc_dict,a))}handleAddOverlay(e){let a=e.regions_infos,s=h(e.graphic_options||{});s.color||(s.color=\"red\");let i=r.graphicOverlay(s);this.aladin.addOverlay(i);for(let t of a){let o=t.infos;switch(t.region_type){case\"stcs\":i.addFootprints(r.footprintsFromSTCS(o.stcs,t.options));break;case\"circle\":i.add(r.circle(o.ra,o.dec,o.radius,t.options));break;case\"ellipse\":i.add(r.ellipse(o.ra,o.dec,o.a,o.b,o.theta,t.options));break;case\"line\":t.options.lineWidth=t.options.lineWidth||3,i.add(r.vector(o.ra1,o.dec1,o.ra2,o.dec2,t.options));break;case\"polygon\":i.add(r.polygon(o.vertices,t.options));break}}}handleChangeColormap(e){this.aladin.getBaseImageLayer().setColormap(e.colormap)}handleGetJPGThumbnail(){this.aladin.exportAsPNG()}handleTriggerSelection(e){let a=e.selection_type;a===\"rectangle\"?a=\"rect\":a===\"polygon\"&&(a=\"poly\"),this.aladin.select(a)}handleAddTable(e,a){let s=h(e.options||{}),i=a[0].buffer,t=new TextDecoder(\"utf-8\"),o=new Blob([t.decode(i)]),d=URL.createObjectURL(o);r.catalogFromURL(d,Object.assign(s,{onClick:\"showTable\"}),c=>{this.aladin.addCatalog(c)},!1),URL.revokeObjectURL(d)}};var u=class{constructor(e,a,s){this.aladin=e,this.aladinDiv=a,this.model=s,this.messageHandler=new p(e,s),this.currentDivNumber=parseInt(a.id.split(\"-\").pop())}isLastDiv(){if(this.currentDivNumber===g)return!0;let e=g;for(let a=e;a>=0;a--){let s=document.getElementById(`aladin-lite-div-${a}`);if(s&&s.style.display!==\"none\"){e=a;break}}return f(e),this.currentDivNumber===e}updateWCS(){this.isLastDiv()&&this.model.set(\"_wcs\",this.aladin.getViewWCS())}update2AxisFoV(){if(!this.isLastDiv())return;let e=this.aladin.getFov();this.model.set(\"_fov_xy\",{x:e[0],y:e[1]})}subscribeAll(){let e=new m,a=new m;this.aladin.on(\"positionChanged\",t=>{if(a.locked){a.unlock();return}e.lock();let o=[t.ra,t.dec];this.updateWCS(),this.model.set(\"_target\",`${o[0]} ${o[1]}`),this.model.save_changes()}),this.model.on(\"change:_target\",()=>{if(e.locked){e.unlock();return}a.lock();let t=this.model.get(\"_target\"),[o,d]=t.split(\" \");this.aladin.gotoRaDec(o,d)});let s=new m,i=new m;this.aladin.on(\"zoomChanged\",t=>{if(i.locked){i.unlock();return}s.lock(),this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_fov\",parseFloat(t.toFixed(5))),this.model.save_changes()}),this.model.on(\"change:_fov\",()=>{if(s.locked){s.unlock();return}i.lock();let t=this.model.get(\"_fov\");this.aladin.setFoV(t)}),this.model.on(\"change:_height\",()=>{let t=this.model.get(\"_height\");this.aladinDiv.style.height=`${t}px`,this.updateWCS(),this.update2AxisFoV(),this.model.save_changes()}),this.aladin.on(\"cooFrameChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"projectionChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"layerChanged\",(t,o,d)=>{o===\"base\"&&this.model.set(\"_survey_body\",t.hipsBody||\"sky\"),!(o!==\"base\"||d!==\"ADDED\")&&(this.updateWCS(),this.model.set(\"_base_layer_last_view\",t.id),this.model.save_changes())}),this.aladin.on(\"resizeChanged\",(t,o)=>{if(t===1&&o===1){this.model.set(\"_is_reduced\",!0),this.model.save_changes();return}else this.model.set(\"_is_reduced\",!1);this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_height\",o),this.model.save_changes()}),this.aladin.on(\"objectHovered\",t=>{t.data!==void 0&&this.model.send({event_type:\"object_hovered\",content:{ra:t.ra,dec:t.dec}})}),this.aladin.on(\"objectClicked\",t=>{if(t){let o={ra:t.ra,dec:t.dec};t.data!==void 0&&(o.data=t.data),this.model.set(\"clicked_object\",o),this.model.send({event_type:\"object_clicked\",content:o}),this.model.save_changes()}}),this.aladin.on(\"click\",t=>{this.model.send({event_type:\"click\",content:t})}),this.aladin.on(\"select\",t=>{let o=t.map(c=>c.map(l=>({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})));this.model.set(\"_selected_objects\",o),this.model.save_changes();let d=[];t.forEach(c=>{c.forEach(l=>{d.push({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})})}),this.model.send({event_type:\"select\",content:d})}),this.model.on(\"change:coo_frame\",()=>{this.aladin.setFrame(this.model.get(\"coo_frame\"))}),this.model.on(\"change:survey\",()=>{this.aladin.setImageSurvey(this.model.get(\"survey\"))}),this.model.on(\"change:overlay_survey\",()=>{this.aladin.setOverlayImageLayer(this.model.get(\"overlay_survey\"))}),this.model.on(\"change:overlay_survey_opacity\",()=>{this.aladin.getOverlayImageLayer().setAlpha(this.model.get(\"overlay_survey_opacity\"))}),this.eventHandlers={add_marker:this.messageHandler.handleAddMarker,change_fov:this.messageHandler.handleChangeFoV,goto_ra_dec:this.messageHandler.handleGotoRaDec,save_view_as_image:this.messageHandler.handleSaveViewAsImage,add_fits:this.messageHandler.handleAddFits,add_catalog_from_URL:this.messageHandler.handleAddCatalogFromURL,add_MOC_from_URL:this.messageHandler.handleAddMOCFromURL,add_MOC_from_dict:this.messageHandler.handleAddMOCFromDict,add_overlay:this.messageHandler.handleAddOverlay,change_colormap:this.messageHandler.handleChangeColormap,get_JPG_thumbnail:this.messageHandler.handleGetJPGThumbnail,trigger_selection:this.messageHandler.handleTriggerSelection,add_table:this.messageHandler.handleAddTable},this.model.on(\"msg:custom\",(t,o)=>{let d=t.event_name,c=this.eventHandlers[d];if(c)c.call(this,t,o);else throw new Error(`Unknown event name: ${d}`)})}unsubscribeAll(){this.model.off(\"change:_target\"),this.model.off(\"change:_fov\"),this.model.off(\"change:_height\"),this.model.off(\"change:coo_frame\"),this.model.off(\"change:survey\"),this.model.off(\"change:overlay_survey\"),this.model.off(\"change:overlay_survey_opacity\"),this.model.off(\"change:trigger_event\"),this.model.off(\"msg:custom\")}};function b(n,e){f(g+1);let a=n.get(\"_init_options\"),s={};for(let l in a)s[_(l)]=a[l];let i=document.createElement(\"div\");i.classList.add(\"aladin-widget\"),i.style.height=`${n.get(\"_height\")}px`,i.id=`aladin-lite-div-${g}`;let t=new r.aladin(i,s);e.appendChild(i);let o=n.get(\"_target\").split(\" \");t.gotoRaDec(o[0],o[1]);let d={...t.getFov()};n.set(\"_fov_xy\",{x:d[0],y:d[1]});let c={...t.getViewWCS()};return n.set(\"_wcs\",c),n.set(\"_is_loaded\",!0),n.save_changes(),{aladin:t,aladinDiv:i}}async function C({model:n}){await r.init}function k({model:n,el:e}){let{aladin:a,aladinDiv:s}=b(n,e),i=new u(a,s,n);return i.subscribeAll(),()=>{i.unsubscribeAll()}}var I={initialize:C,render:k};export{I as default};\n",
+ "_esm": "function v(n){n.charAt(0)===\"_\"&&(n=n.slice(1));let e=n.split(\"_\");for(let a=1;a{this.aladin.gotoRaDec(c,l),console.info(`FITS located at ra: ${c}, dec: ${l}`),URL.revokeObjectURL(o)});this.aladin.setOverlayImageLayer(d,s.name)}handleAddCatalogFromURL(e){let a=h(e.options||{});this.aladin.addCatalog(r.catalogFromURL(e.votable_URL,a))}handleAddMOCFromURL(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromURL(e.moc_URL,a))}handleAddMOCFromDict(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromJSON(e.moc_dict,a))}handleAddOverlay(e){let a=e.regions_infos,s=h(e.graphic_options||{});s.color||(s.color=\"red\");let i=r.graphicOverlay(s);this.aladin.addOverlay(i);for(let t of a){let o=t.infos;switch(t.region_type){case\"stcs\":i.addFootprints(r.footprintsFromSTCS(o.stcs,t.options));break;case\"circle\":i.add(r.circle(o.ra,o.dec,o.radius,t.options));break;case\"ellipse\":i.add(r.ellipse(o.ra,o.dec,o.a,o.b,o.theta,t.options));break;case\"line\":t.options.lineWidth=t.options.lineWidth||3,i.add(r.vector(o.ra1,o.dec1,o.ra2,o.dec2,t.options));break;case\"polygon\":i.add(r.polygon(o.vertices,t.options));break}}}handleChangeColormap(e){this.aladin.getBaseImageLayer().setColormap(e.colormap)}handleGetJPGThumbnail(){this.aladin.exportAsPNG()}handleTriggerSelection(e){let a=e.selection_type;a===\"rectangle\"?a=\"rect\":a===\"polygon\"&&(a=\"poly\"),this.aladin.select(a)}handleAddTable(e,a){let s=h(e.options||{}),i=a[0].buffer,t=new TextDecoder(\"utf-8\"),o=new Blob([t.decode(i)]),d=URL.createObjectURL(o);r.catalogFromURL(d,Object.assign(s,{onClick:\"showTable\"}),c=>{this.aladin.addCatalog(c)},!1),URL.revokeObjectURL(d)}};var u=class{constructor(e,a,s){this.aladin=e,this.aladinDiv=a,this.model=s,this.messageHandler=new p(e,s),this.currentDivNumber=parseInt(a.id.split(\"-\").pop())}isLastDiv(){if(this.currentDivNumber===g)return!0;let e=g;for(let a=e;a>=0;a--){let s=document.getElementById(`aladin-lite-div-${a}`);if(s&&s.style.display!==\"none\"){e=a;break}}return f(e),this.currentDivNumber===e}updateWCS(){this.isLastDiv()&&this.model.set(\"_wcs\",this.aladin.getViewWCS())}update2AxisFoV(){if(!this.isLastDiv())return;let e=this.aladin.getFov();this.model.set(\"_fov_xy\",{x:e[0],y:e[1]})}subscribeAll(){let e=new m,a=new m;this.aladin.on(\"positionChanged\",t=>{if(a.locked){a.unlock();return}e.lock();let o=[t.ra,t.dec];this.updateWCS(),this.model.set(\"_target\",`${o[0]} ${o[1]}`),this.model.save_changes()}),this.model.on(\"change:_target\",()=>{if(e.locked){e.unlock();return}a.lock();let t=this.model.get(\"_target\"),[o,d]=t.split(\" \");this.aladin.gotoRaDec(o,d)});let s=new m,i=new m;this.aladin.on(\"zoomChanged\",t=>{if(i.locked){i.unlock();return}s.lock(),this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_fov\",parseFloat(t.toFixed(5))),this.model.save_changes()}),this.model.on(\"change:_fov\",()=>{if(s.locked){s.unlock();return}i.lock();let t=this.model.get(\"_fov\");this.aladin.setFoV(t)}),this.model.on(\"change:_height\",()=>{_(this.model.get(\"_height\"),this.aladinDiv),this.updateWCS(),this.update2AxisFoV(),this.model.save_changes()}),this.aladin.on(\"cooFrameChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"projectionChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"layerChanged\",(t,o,d)=>{o===\"base\"&&this.model.set(\"_survey_body\",t.hipsBody||\"sky\"),!(o!==\"base\"||d!==\"ADDED\")&&(this.updateWCS(),this.model.set(\"_base_layer_last_view\",t.id),this.model.save_changes())}),this.aladin.on(\"resizeChanged\",(t,o)=>{if(t===1&&o===1){this.model.set(\"_is_reduced\",!0),this.model.save_changes();return}else this.model.set(\"_is_reduced\",!1);this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_height\",o),this.model.save_changes()}),this.aladin.on(\"objectHovered\",t=>{t.data!==void 0&&this.model.send({event_type:\"object_hovered\",content:{ra:t.ra,dec:t.dec}})}),this.aladin.on(\"objectClicked\",t=>{if(t){let o={ra:t.ra,dec:t.dec};t.data!==void 0&&(o.data=t.data),this.model.set(\"clicked_object\",o),this.model.send({event_type:\"object_clicked\",content:o}),this.model.save_changes()}}),this.aladin.on(\"click\",t=>{this.model.send({event_type:\"click\",content:t})}),this.aladin.on(\"select\",t=>{let o=t.map(c=>c.map(l=>({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})));this.model.set(\"_selected_objects\",o),this.model.save_changes();let d=[];t.forEach(c=>{c.forEach(l=>{d.push({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})})}),this.model.send({event_type:\"select\",content:d})}),this.model.on(\"change:coo_frame\",()=>{this.aladin.setFrame(this.model.get(\"coo_frame\"))}),this.model.on(\"change:survey\",()=>{this.aladin.setImageSurvey(this.model.get(\"survey\"))}),this.model.on(\"change:overlay_survey\",()=>{this.aladin.setOverlayImageLayer(this.model.get(\"overlay_survey\"))}),this.model.on(\"change:overlay_survey_opacity\",()=>{this.aladin.getOverlayImageLayer().setAlpha(this.model.get(\"overlay_survey_opacity\"))}),this.eventHandlers={add_marker:this.messageHandler.handleAddMarker,change_fov:this.messageHandler.handleChangeFoV,goto_ra_dec:this.messageHandler.handleGotoRaDec,save_view_as_image:this.messageHandler.handleSaveViewAsImage,add_fits:this.messageHandler.handleAddFits,add_catalog_from_URL:this.messageHandler.handleAddCatalogFromURL,add_MOC_from_URL:this.messageHandler.handleAddMOCFromURL,add_MOC_from_dict:this.messageHandler.handleAddMOCFromDict,add_overlay:this.messageHandler.handleAddOverlay,change_colormap:this.messageHandler.handleChangeColormap,get_JPG_thumbnail:this.messageHandler.handleGetJPGThumbnail,trigger_selection:this.messageHandler.handleTriggerSelection,add_table:this.messageHandler.handleAddTable},this.model.on(\"msg:custom\",(t,o)=>{let d=t.event_name,c=this.eventHandlers[d];if(c)c.call(this,t,o);else throw new Error(`Unknown event name: ${d}`)})}unsubscribeAll(){this.model.off(\"change:_target\"),this.model.off(\"change:_fov\"),this.model.off(\"change:_height\"),this.model.off(\"change:coo_frame\"),this.model.off(\"change:survey\"),this.model.off(\"change:overlay_survey\"),this.model.off(\"change:overlay_survey_opacity\"),this.model.off(\"change:trigger_event\"),this.model.off(\"msg:custom\")}};function C(n,e){f(g+1);let a=n.get(\"_init_options\"),s={};for(let l in a)s[v(l)]=a[l];let i=document.createElement(\"div\");i.classList.add(\"aladin-widget\"),_(n.get(\"_height\"),i),i.id=`aladin-lite-div-${g}`;let t=new r.aladin(i,s);e.appendChild(i);let o=n.get(\"_target\").split(\" \");t.gotoRaDec(o[0],o[1]);let d={...t.getFov()};n.set(\"_fov_xy\",{x:d[0],y:d[1]});let c={...t.getViewWCS()};return n.set(\"_wcs\",c),n.set(\"_is_loaded\",!0),n.save_changes(),{aladin:t,aladinDiv:i}}async function k({model:n}){await r.init}function w({model:n,el:e}){let{aladin:a,aladinDiv:s}=C(n,e),i=new u(a,s,n);return i.subscribeAll(),()=>{i.unsubscribeAll()}}var W={initialize:k,render:w};export{W as default};\n",
"_fov": 10.0,
"_fov_xy": {},
"_height": 400,
@@ -349,7 +303,7 @@
"_ready": false,
"_selected_objects": [],
"_survey_body": "sky",
- "_target": "80.89416667 -69.75611111",
+ "_target": "80.89417 -69.75611",
"_view_count": null,
"_view_module": "anywidget",
"_view_module_version": "~0.9.*",
@@ -357,7 +311,7 @@
"_wcs": {},
"clicked_object": {},
"coo_frame": "ICRS",
- "layout": "IPY_MODEL_f1e0ebfdbcdf4b968cf07b06ba86c06c",
+ "layout": "IPY_MODEL_545338ee2f6a48c98209902344bdb379",
"overlay_survey": "",
"overlay_survey_opacity": 0.0,
"projection": "SIN",
@@ -366,7 +320,7 @@
"tooltip": null
}
},
- "95f686d5c7fe4e6dbc71768eb97a2eb2": {
+ "545338ee2f6a48c98209902344bdb379": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
@@ -419,7 +373,53 @@
"width": null
}
},
- "f1e0ebfdbcdf4b968cf07b06ba86c06c": {
+ "5a5e6365165b41a4bccfeea50c27db97": {
+ "model_module": "anywidget",
+ "model_module_version": "~0.9.*",
+ "model_name": "AnyModel",
+ "state": {
+ "_anywidget_id": "ipyaladin.widget.Aladin",
+ "_base_layer_last_view": "https://alaskybis.unistra.fr/DSS/DSSColor",
+ "_css": ".cell-output-ipywidget-background{background:transparent}.jp-OutputArea-output,.aladin-widget{background-color:transparent}.aladin-widget .aladin-measurement-div{max-height:100px}\n",
+ "_dom_classes": [],
+ "_esm": "function v(n){n.charAt(0)===\"_\"&&(n=n.slice(1));let e=n.split(\"_\");for(let a=1;a{this.aladin.gotoRaDec(c,l),console.info(`FITS located at ra: ${c}, dec: ${l}`),URL.revokeObjectURL(o)});this.aladin.setOverlayImageLayer(d,s.name)}handleAddCatalogFromURL(e){let a=h(e.options||{});this.aladin.addCatalog(r.catalogFromURL(e.votable_URL,a))}handleAddMOCFromURL(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromURL(e.moc_URL,a))}handleAddMOCFromDict(e){let a=h(e.options||{});this.aladin.addMOC(r.MOCFromJSON(e.moc_dict,a))}handleAddOverlay(e){let a=e.regions_infos,s=h(e.graphic_options||{});s.color||(s.color=\"red\");let i=r.graphicOverlay(s);this.aladin.addOverlay(i);for(let t of a){let o=t.infos;switch(t.region_type){case\"stcs\":i.addFootprints(r.footprintsFromSTCS(o.stcs,t.options));break;case\"circle\":i.add(r.circle(o.ra,o.dec,o.radius,t.options));break;case\"ellipse\":i.add(r.ellipse(o.ra,o.dec,o.a,o.b,o.theta,t.options));break;case\"line\":t.options.lineWidth=t.options.lineWidth||3,i.add(r.vector(o.ra1,o.dec1,o.ra2,o.dec2,t.options));break;case\"polygon\":i.add(r.polygon(o.vertices,t.options));break}}}handleChangeColormap(e){this.aladin.getBaseImageLayer().setColormap(e.colormap)}handleGetJPGThumbnail(){this.aladin.exportAsPNG()}handleTriggerSelection(e){let a=e.selection_type;a===\"rectangle\"?a=\"rect\":a===\"polygon\"&&(a=\"poly\"),this.aladin.select(a)}handleAddTable(e,a){let s=h(e.options||{}),i=a[0].buffer,t=new TextDecoder(\"utf-8\"),o=new Blob([t.decode(i)]),d=URL.createObjectURL(o);r.catalogFromURL(d,Object.assign(s,{onClick:\"showTable\"}),c=>{this.aladin.addCatalog(c)},!1),URL.revokeObjectURL(d)}};var u=class{constructor(e,a,s){this.aladin=e,this.aladinDiv=a,this.model=s,this.messageHandler=new p(e,s),this.currentDivNumber=parseInt(a.id.split(\"-\").pop())}isLastDiv(){if(this.currentDivNumber===g)return!0;let e=g;for(let a=e;a>=0;a--){let s=document.getElementById(`aladin-lite-div-${a}`);if(s&&s.style.display!==\"none\"){e=a;break}}return f(e),this.currentDivNumber===e}updateWCS(){this.isLastDiv()&&this.model.set(\"_wcs\",this.aladin.getViewWCS())}update2AxisFoV(){if(!this.isLastDiv())return;let e=this.aladin.getFov();this.model.set(\"_fov_xy\",{x:e[0],y:e[1]})}subscribeAll(){let e=new m,a=new m;this.aladin.on(\"positionChanged\",t=>{if(a.locked){a.unlock();return}e.lock();let o=[t.ra,t.dec];this.updateWCS(),this.model.set(\"_target\",`${o[0]} ${o[1]}`),this.model.save_changes()}),this.model.on(\"change:_target\",()=>{if(e.locked){e.unlock();return}a.lock();let t=this.model.get(\"_target\"),[o,d]=t.split(\" \");this.aladin.gotoRaDec(o,d)});let s=new m,i=new m;this.aladin.on(\"zoomChanged\",t=>{if(i.locked){i.unlock();return}s.lock(),this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_fov\",parseFloat(t.toFixed(5))),this.model.save_changes()}),this.model.on(\"change:_fov\",()=>{if(s.locked){s.unlock();return}i.lock();let t=this.model.get(\"_fov\");this.aladin.setFoV(t)}),this.model.on(\"change:_height\",()=>{_(this.model.get(\"_height\"),this.aladinDiv),this.updateWCS(),this.update2AxisFoV(),this.model.save_changes()}),this.aladin.on(\"cooFrameChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"projectionChanged\",()=>{this.updateWCS(),this.model.save_changes()}),this.aladin.on(\"layerChanged\",(t,o,d)=>{o===\"base\"&&this.model.set(\"_survey_body\",t.hipsBody||\"sky\"),!(o!==\"base\"||d!==\"ADDED\")&&(this.updateWCS(),this.model.set(\"_base_layer_last_view\",t.id),this.model.save_changes())}),this.aladin.on(\"resizeChanged\",(t,o)=>{if(t===1&&o===1){this.model.set(\"_is_reduced\",!0),this.model.save_changes();return}else this.model.set(\"_is_reduced\",!1);this.updateWCS(),this.update2AxisFoV(),this.model.set(\"_height\",o),this.model.save_changes()}),this.aladin.on(\"objectHovered\",t=>{t.data!==void 0&&this.model.send({event_type:\"object_hovered\",content:{ra:t.ra,dec:t.dec}})}),this.aladin.on(\"objectClicked\",t=>{if(t){let o={ra:t.ra,dec:t.dec};t.data!==void 0&&(o.data=t.data),this.model.set(\"clicked_object\",o),this.model.send({event_type:\"object_clicked\",content:o}),this.model.save_changes()}}),this.aladin.on(\"click\",t=>{this.model.send({event_type:\"click\",content:t})}),this.aladin.on(\"select\",t=>{let o=t.map(c=>c.map(l=>({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})));this.model.set(\"_selected_objects\",o),this.model.save_changes();let d=[];t.forEach(c=>{c.forEach(l=>{d.push({ra:l.ra,dec:l.dec,data:l.data,x:l.x,y:l.y})})}),this.model.send({event_type:\"select\",content:d})}),this.model.on(\"change:coo_frame\",()=>{this.aladin.setFrame(this.model.get(\"coo_frame\"))}),this.model.on(\"change:survey\",()=>{this.aladin.setImageSurvey(this.model.get(\"survey\"))}),this.model.on(\"change:overlay_survey\",()=>{this.aladin.setOverlayImageLayer(this.model.get(\"overlay_survey\"))}),this.model.on(\"change:overlay_survey_opacity\",()=>{this.aladin.getOverlayImageLayer().setAlpha(this.model.get(\"overlay_survey_opacity\"))}),this.eventHandlers={add_marker:this.messageHandler.handleAddMarker,change_fov:this.messageHandler.handleChangeFoV,goto_ra_dec:this.messageHandler.handleGotoRaDec,save_view_as_image:this.messageHandler.handleSaveViewAsImage,add_fits:this.messageHandler.handleAddFits,add_catalog_from_URL:this.messageHandler.handleAddCatalogFromURL,add_MOC_from_URL:this.messageHandler.handleAddMOCFromURL,add_MOC_from_dict:this.messageHandler.handleAddMOCFromDict,add_overlay:this.messageHandler.handleAddOverlay,change_colormap:this.messageHandler.handleChangeColormap,get_JPG_thumbnail:this.messageHandler.handleGetJPGThumbnail,trigger_selection:this.messageHandler.handleTriggerSelection,add_table:this.messageHandler.handleAddTable},this.model.on(\"msg:custom\",(t,o)=>{let d=t.event_name,c=this.eventHandlers[d];if(c)c.call(this,t,o);else throw new Error(`Unknown event name: ${d}`)})}unsubscribeAll(){this.model.off(\"change:_target\"),this.model.off(\"change:_fov\"),this.model.off(\"change:_height\"),this.model.off(\"change:coo_frame\"),this.model.off(\"change:survey\"),this.model.off(\"change:overlay_survey\"),this.model.off(\"change:overlay_survey_opacity\"),this.model.off(\"change:trigger_event\"),this.model.off(\"msg:custom\")}};function C(n,e){f(g+1);let a=n.get(\"_init_options\"),s={};for(let l in a)s[v(l)]=a[l];let i=document.createElement(\"div\");i.classList.add(\"aladin-widget\"),_(n.get(\"_height\"),i),i.id=`aladin-lite-div-${g}`;let t=new r.aladin(i,s);e.appendChild(i);let o=n.get(\"_target\").split(\" \");t.gotoRaDec(o[0],o[1]);let d={...t.getFov()};n.set(\"_fov_xy\",{x:d[0],y:d[1]});let c={...t.getViewWCS()};return n.set(\"_wcs\",c),n.set(\"_is_loaded\",!0),n.save_changes(),{aladin:t,aladinDiv:i}}async function k({model:n}){await r.init}function w({model:n,el:e}){let{aladin:a,aladinDiv:s}=C(n,e),i=new u(a,s,n);return i.subscribeAll(),()=>{i.unsubscribeAll()}}var W={initialize:k,render:w};export{W as default};\n",
+ "_fov": 1.0,
+ "_fov_xy": {},
+ "_height": 400,
+ "_init_options": {
+ "fov": 1,
+ "show_context_menu": true,
+ "show_coo_grid_control": true,
+ "show_settings_control": true,
+ "show_simbad_pointer_control": true,
+ "target": "269.956288 -23.823863"
+ },
+ "_is_loaded": true,
+ "_is_reduced": false,
+ "_model_module": "anywidget",
+ "_model_module_version": "~0.9.*",
+ "_model_name": "AnyModel",
+ "_ready": false,
+ "_selected_objects": [],
+ "_survey_body": "sky",
+ "_target": "269.956288 -23.823863",
+ "_view_count": null,
+ "_view_module": "anywidget",
+ "_view_module_version": "~0.9.*",
+ "_view_name": "AnyView",
+ "_wcs": {},
+ "clicked_object": {},
+ "coo_frame": "ICRS",
+ "layout": "IPY_MODEL_804cd71ec7954e24b82e421c48f98b23",
+ "overlay_survey": "",
+ "overlay_survey_opacity": 0.0,
+ "projection": "SIN",
+ "survey": "https://alaskybis.unistra.fr/DSS/DSSColor",
+ "tabbable": null,
+ "tooltip": null
+ }
+ },
+ "804cd71ec7954e24b82e421c48f98b23": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
diff --git a/_collections/notebooks/04_Importing_Tables.html b/_collections/notebooks/04_Importing_Tables.html
index 1439886..5ed3e05 100644
--- a/_collections/notebooks/04_Importing_Tables.html
+++ b/_collections/notebooks/04_Importing_Tables.html
@@ -8,7 +8,7 @@
- Display tables resulting from an astroquery request — ipyaladin 0.5.0 documentation
+ Display tables resulting from an astroquery request — ipyaladin 0.5.1 documentation
@@ -39,7 +39,7 @@
-
+
@@ -494,7 +494,7 @@ From a query
Table length=64
-