Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make HipsMgr visible to/part of the scripting API #3613

Open
Starvexx opened this issue Jan 29, 2024 · 3 comments
Open

Make HipsMgr visible to/part of the scripting API #3613

Starvexx opened this issue Jan 29, 2024 · 3 comments
Labels
enhancement Improve existing functionality state: in progress The problem is in process of solution...
Projects

Comments

@Starvexx
Copy link

I have recently started to write scripts to generate a brief Stellarium show as part of the outreach module for the research project I am working on. In the first stage of our outreach module, we created HiPS surveys that are hosted on our project's Homepage, available through aladin light and also importable to aladin Desktop. The next stage of the outreach module includes, as mentioned above, the creation of a brief Stellarium show featuring our image material. Since Stellarium can render Healpix surveys, the easiest way would be to load these HiPS surveys into Stellarium and toggle the HiPS layers when needed. However, the HipsMgr class is not accessible through the scripting language, hence I am unable to toggle the HiPS Sky images from inside the script.

Suggested solution: Make the HipsMgr accessible through the scripting API so that the HiPS layer could be turned on and off, e.g. as follows:

HipsMgr.setFlagShow(true); // Turn HiPS layers on.
core.wait(10); // Wait 10 seconds for the viewer to appreciate the wonderful image in the HiPS surveys.
HipsMgr.setFlagShow(false); // Turn HiPS layers off.

Another quality of life improvement by making the HipsMgr part of the scripting API would be to easily import Healpix surveys into Stellarium via the scripting interface, e.g. something similar to what follows:

HipsMgr.getSurveyByUrl(id="OrionA", url="https://nemesis.univie.ac.at/wp-content/hips_surveys/NEMESIS-Orion_A_full_png-i124"); // Load new HiPS survey and assign ID
HipsMgr.setVisible(id="OrionA", true); // make the survey visible
core.wait(10); // Let the viewer appreciate the beautiful images.
HipsMgr.setVisible(id="OrionA", false); // Hide the survey
HipsMgr.removeSurvey(id="OrionA"); // remove the survey
Copy link

Thanks for adding your first issue to Stellarium. If you have questions, please do not hesitate to contact us.

@alex-w alex-w added this to Needs triage in Scripting via automation Jan 30, 2024
@alex-w alex-w added the enhancement Improve existing functionality label Jan 30, 2024
Copy link

Hello @Starvexx!

Thank you for suggesting this enhancement.

@alex-w
Copy link
Member

alex-w commented Feb 3, 2024

Hello @Starvexx!

Please check the fresh version (development snapshot) of Stellarium:
https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

@alex-w alex-w moved this from Needs triage to In progress in Scripting Feb 3, 2024
@alex-w alex-w added the state: in progress The problem is in process of solution... label Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality state: in progress The problem is in process of solution...
Projects
Scripting
  
In progress
Development

No branches or pull requests

2 participants