diff --git a/examples/10_Advanced-GUI.ipynb b/examples/10_Advanced-GUI.ipynb index 4c5dd064..8ce02836 100644 --- a/examples/10_Advanced-GUI.ipynb +++ b/examples/10_Advanced-GUI.ipynb @@ -37,6 +37,13 @@ "\n", "\n", "def on_survey_value_change(change: dict) -> None:\n", + " \"\"\"Survey change callback.\n", + "\n", + " Parameters\n", + " ----------\n", + " change : dict\n", + " The change dictionary.\n", + " \"\"\"\n", " aladin.survey = change[\"new\"]\n", "\n", "\n", @@ -64,6 +71,13 @@ "\n", "\n", "def on_survey_overlay_value_change(change: dict) -> None:\n", + " \"\"\"Survey overlay change callback.\n", + "\n", + " Parameters\n", + " ----------\n", + " change : dict\n", + " The change dictionary.\n", + " \"\"\"\n", " aladin.overlay_survey = change[\"new\"]\n", " aladin.overlay_survey_opacity = aladin.overlay_survey_opacity + 0.00000001\n", "\n", @@ -85,6 +99,13 @@ "\n", "\n", "def on_surveyoverlay_opacity_value_change(change: dict) -> None:\n", + " \"\"\"Survey overlay opacity change callback.\n", + "\n", + " Parameters\n", + " ----------\n", + " change : dict\n", + " The change dictionary.\n", + " \"\"\"\n", " aladin.overlay_survey_opacity = change[\"new\"]\n", "\n", "\n", @@ -106,6 +127,13 @@ "\n", "\n", "def on_zoom_slider_value_change(change: dict) -> None:\n", + " \"\"\"Zoom slider change callback.\n", + "\n", + " Parameters\n", + " ----------\n", + " change : dict\n", + " The change dictionary.\n", + " \"\"\"\n", " aladin.fov = 180 / change[\"new\"]\n", "\n", "\n", diff --git a/examples/3_Functions.ipynb b/examples/3_Functions.ipynb index 1db511f7..7864685c 100644 --- a/examples/3_Functions.ipynb +++ b/examples/3_Functions.ipynb @@ -80,11 +80,25 @@ "outputs": [], "source": [ "def get_object_data(data: dict) -> dict:\n", + " \"\"\"Print the clicked object data.\n", + "\n", + " Parameters\n", + " ----------\n", + " data : dict\n", + " The data of the clicked object.\n", + " \"\"\"\n", " print(\"It clicked.\")\n", " return data\n", "\n", "\n", "def get_object_ra_dec_product(data: dict) -> float:\n", + " \"\"\"Return the product of the ra and dec values of the clicked object.\n", + "\n", + " Parameters\n", + " ----------\n", + " data : dict\n", + " The data of the clicked object.\n", + " \"\"\"\n", " return data[\"ra\"] * data[\"dec\"]\n", "\n", "\n", diff --git a/examples/7_on-click-callback.ipynb b/examples/7_on-click-callback.ipynb index 6fad052d..814c7e21 100644 --- a/examples/7_on-click-callback.ipynb +++ b/examples/7_on-click-callback.ipynb @@ -38,6 +38,13 @@ "outputs": [], "source": [ "def process_result(data: dict) -> None:\n", + " \"\"\"Process the result of a click event on the Aladin widget.\n", + "\n", + " Parameters\n", + " ----------\n", + " data : dict\n", + " The data returned by the click event.\n", + " \"\"\"\n", " info.value = \"\"\n", " ra = data[\"ra\"]\n", " dec = data[\"dec\"]\n", diff --git a/examples/8_Rectangular-selection.ipynb b/examples/8_Rectangular-selection.ipynb index 62605ac4..7bff0560 100644 --- a/examples/8_Rectangular-selection.ipynb +++ b/examples/8_Rectangular-selection.ipynb @@ -34,6 +34,15 @@ "\n", "\n", "def on_button_clicked(_: any) -> None:\n", + " \"\"\"Button click event callback.\n", + "\n", + " It will trigger the rectangular selection in the Aladin widget.\n", + "\n", + " Parameters\n", + " ----------\n", + " _: any\n", + " The button widget that triggered the event.\n", + " \"\"\"\n", " aladin.rectangular_selection()\n", "\n", "\n", @@ -62,6 +71,13 @@ "\n", "\n", "def process_result(sources: dict) -> None:\n", + " \"\"\"Process the sources selected in the Aladin widget and display them in the table.\n", + "\n", + " Parameters\n", + " ----------\n", + " sources: dict\n", + " The sources selected in the Aladin widget.\n", + " \"\"\"\n", " s = '
MAIN_ID | RA | DEC |
---|