Fri, 09/04/2020 - 06:11
Hi!
I belive it is easies to decribe what I want rather than pose a question:
I want to monitor about 20 stars in an easy way. My idea is to create a sort of "dashboard" where I can have lightcurves for them, automatically updated when the page refreshes.
So I am imagining that what I'd need is a link that retrievs a particular lightcurve from the LightCurve generator without the need for me to manually enter any data. And I can have one such link per star.
And then I create a web page where these lightcurves are embedded.
Is there a way to do this? Any ressources I can look at? Creating web pages and handling html-code is not a problem for me, just finding the way to retrieve the data and curve from the LightCurve generator.
Magnus
Hi Magnus
It may be possible via a REST web service but you can do this by scripting VStar. For example, assuming the following is in a file called aid_load_LC_save.js:
root = "/Users/david/tmp/"
objs = ["RS Oph", "T Pyx"]
fromJDs = [2454852, 2454852]
toJDs = [2455852, 2455852]
for (i=0;i<objs.length;i++) {
vstar.loadFromAID(objs[i], fromJDs[i], toJDs[i])
vstar.lightCurveMode()
path = root + objs[i].replace(" ", "_") + ".png"
vstar.saveLightCurve(path, 600, 400)
}
exit()
you could run the following command from a Linux/Mac shell:
./VStar.sh --script aid_load_LC_save.js
The VStar window will open, run the script, then exit. In this case, two files would be saved:
For Windows, VStar.bat could be used.
VStar's scripting API also allows phase plots, period analysis and other operations to be carried out programmatically. See also the user manual.
David