Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Messier Marathon Simulation Stellarium Script

dso observing planetarium software star party
  • Please log in to reply
19 replies to this topic

#1 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • topic starter
  • Posts: 277
  • Joined: 30 Nov 2013

Posted 17 February 2019 - 08:54 AM

Hello All,

since we dont have any clear skies (for the last month or so) and wont have any until maybe June, I wrote a Stellarium script to simulate running a Messier Marathon which I would like to share with you, have you try it out and give me some feedback (like you always do undecided.gif).

The script shows how each M object would be selected based on the Messier Marathon Field Guide by Harvard Pennigton, it shows the sky and the location of the object as well as the stellarium supplied default image (in the bottom right corner)

unzip the zip file and copy the script file to the scripts folder under your Stellarium installation/distribution

 

Then you can run the script from the Stellarium GUI by going to the Configuration window then click on the scripts tab..should be the first script amessier_marathon_sim click on that and it should run.

 

stellarium_mm_screen_capture.PNG

 

There are some issues with the image files..

// NOTE: in the stellarium folder "nebula" some Messier image files have
// names like m17spano.png(for example),this script is will only find image
// files with the shortened name m17.png so to fix the issue, make a copy
// of the original file and rename it to the shortened version 

m17spano.png ->copy->paste->rename-> m17.png (do this for he dozen or so messier image files that are not named in the shortened fashion..

 

Also if you want audio sounds, unzip the sounds.zip file and place those files in the "audio" folder of stellarium

And enable the sounds by  using NotePad and changing the amessier_marathon_sim.ssc file  line 13 from..

var MM_SOUND_SUPPORTED = false;

Change it to

var MM_SOUND_SUPPORTED = true;

 

I have probably missed some details so bear with me, send me comments, good luck your so lucky to have clear skies..

Oh , the script zip file is too big for this post so I ll attach it to a second post..

 



#2 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • topic starter
  • Posts: 277
  • Joined: 30 Nov 2013

Posted 17 February 2019 - 09:00 AM

Arg...the zip files are too big,

I changed the file extension of the script file to .txt

so you can download it, save it to the scripts folder in Stelllarium and rename it back to amessier_marathon_sim.ssc

then you should be able to run it (check file permissions ..arg!)

 

The sound files are wave files and one of them is too big for our upload app so if you want sound message me privately and I can arrange to mail them to you.

The script will run without the sound files but its more fun if the rooster crows at sunup..

Attached Files


Edited by ssagerian, 17 February 2019 - 09:13 AM.


#3 DLuders

DLuders

    Gemini

  • *****
  • Posts: 3150
  • Joined: 10 Apr 2017
  • Loc: Spokane, WA

Posted 17 February 2019 - 09:19 AM

Wow, that is cool!  waytogo.gif   I downloaded your file, renamed it like you said, and ran the script within Stellarium just now.  I'll be sure to use this when the weather cooperates!  



#4 Astrolite

Astrolite

    Ranger 4

  • *****
  • Posts: 373
  • Joined: 26 Aug 2017
  • Loc: S. Central Pennsylvania

Posted 17 February 2019 - 10:34 AM

OK, I've always thought of myself as computer literate, however, can't figure this one out. I copied the file to the location specified. Right clicked and selected properties, then added .ssc to the file name. Properties still says it'a a text file, now named "amessier_marathon_sim.ssc.txt. Renaming in properties dialog box does not seem to give me the option to delete the .txt extension and replace it with the .ssc extension. When I view the file in the scripts directory it does not show a file extension, so it doesn't seem that I can just rename it there either. So how do I make this conversion?



#5 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • topic starter
  • Posts: 277
  • Joined: 30 Nov 2013

Posted 17 February 2019 - 10:40 AM

So just select it in file explorer and right click to rename, then change the file name to amessier_marathon_sim.ssc  make sure you leave out the .txt portion.



#6 Astrolite

Astrolite

    Ranger 4

  • *****
  • Posts: 373
  • Joined: 26 Aug 2017
  • Loc: S. Central Pennsylvania

Posted 17 February 2019 - 10:52 AM

As I said in my last post, when viewed in file explorer it shows as, "amessier_marathon_sim", it does not show any file extension. So when I rename it to, "amessier_marathon_sim.ssc", it remains a text file with this new name. It does not change the file type. Even deleting the entire file name and retyping it does not change the file type to a script file. I'm running Windows 10, if that makes any difference.



#7 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • topic starter
  • Posts: 277
  • Joined: 30 Nov 2013

Posted 17 February 2019 - 10:59 AM

you need to make sure that file explorer shows file extensions..

file_explorer.PNG



#8 DLuders

DLuders

    Gemini

  • *****
  • Posts: 3150
  • Joined: 10 Apr 2017
  • Loc: Spokane, WA

Posted 17 February 2019 - 11:25 AM

@ Astrolite: When I downloaded the file, I saved it on my computer Desktop as the original .TXT text file.  Once there, I renamed the .TXT extention to .SSC, then Cut/Pasted the file into the Stellarium Scripts folder, where there were many other existing .SSC script files.  I opened Stellarium, went into the Configuration Settings, then selected "Scripts", and ran that script.  smile.gif 



#9 Alexander Wolf

Alexander Wolf

    Stellarium

  • -----
  • Vendors
  • Posts: 377
  • Joined: 27 Jun 2011
  • Loc: Barnaul, Siberia, Russia

Posted 17 February 2019 - 11:51 AM

The script will never work correct on any linux and some macOS boxes. wink.gif



#10 Astrolite

Astrolite

    Ranger 4

  • *****
  • Posts: 373
  • Joined: 26 Aug 2017
  • Loc: S. Central Pennsylvania

Posted 17 February 2019 - 12:09 PM

Thank you works great, thought it would be something simple. I like your script too!



#11 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • topic starter
  • Posts: 277
  • Joined: 30 Nov 2013

Posted 18 February 2019 - 09:29 AM

The script will never work correct on any linux and some macOS boxes. wink.gif

Alexander,
I wrote the script to run on my windows machine for a presentation on messier marathons. I thought it would be good to share it with others, dimly aware that "others" might mean Mac or Linux users. I am hopeful that those users will find and fix any issues or at least report back to this thread that they encountered an issue.

Circling back to your comments, I am a little disappointed in you as a lead developer for Stellarium to provide such a comment, lacking any detail beyond, "it will never work correct". Ok, fair enough..why?  I know you would not be happy if someone posted to the Stelliarium github feedback forum that your stuff "doesnt work" without any details.
Try leading with some positive comment  and then present the issue you have. " I really like your script..blah.. did you know that your path references wont work with Mac? Here is an example of a fix I made, perhaps you can incorporate into your next release?"
Anyway, look forward to working with you, on other Stellarium related stuff.

 

SteveS



#12 Alexander Wolf

Alexander Wolf

    Stellarium

  • -----
  • Vendors
  • Posts: 377
  • Joined: 27 Jun 2011
  • Loc: Barnaul, Siberia, Russia

Posted 18 February 2019 - 10:24 AM

Ouch, sorry, but I thinked the hint was obvious - all linux file systems are case sensitive and in some cases same behaviour has HPFS+ on macOS. So, for linux M31.png and m31.png will be 2 different files. You need to use objName.toLowerCase() for  ScreenImageMgr.createScreenImage() command (for second objName!).

 

Plus you using local time for all events - it may be caused the weird marathon in other places (e.g. someone from Europe or Asia run the script). So, you need or use UTC or set the location in script.

 

Other potential problem - sounds. We compile Stellarium for Windows and macOS with media support, but I cannot garantee that in various linux distros Stellarium package with media support too. Of course I don't heard any soudns with script by obvious reasons (no media files).

 

As demonstrated the practice proposing to users open "Programs Files" directory (on Windows of course) in Explorer and renaming some file is really bad idea. Why you did not create an array with filenames for Messier objects to avoid "missing files situation" for example?

 

Yes, the script is interesting and you have good idea for it, but he needs to improvements (all software needs to improvements and Stellarium too laugh.gif ).


Edited by Alexander Wolf, 18 February 2019 - 10:25 AM.


#13 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • topic starter
  • Posts: 277
  • Joined: 30 Nov 2013

Posted 18 February 2019 - 10:51 AM

Those are all excellent observations, thanks!  My only defense wrt the renamed files was lacking time to do it right and lack of javascript knowledge. Arent there some platform introspection methods that I can use to detect what kind of platform I am running on?

I ll keep on it, I have liked very much and  played with Stellarium but never knew how powerful it can be when you learn scripting.

thanks again,

Steve



#14 Alexander Wolf

Alexander Wolf

    Stellarium

  • -----
  • Vendors
  • Posts: 377
  • Joined: 27 Jun 2011
  • Loc: Barnaul, Siberia, Russia

Posted 19 February 2019 - 12:46 AM

Arent there some platform introspection methods that I can use to detect what kind of platform I am running on?

Hmm... I fear the JavaScript doesn't have tool for check the platform. I think we may add a couple methods for scripting engine:
core.getPlatformName();
and
core.isMediaPlaybackSupported();
for check the platform and media playback support.

 

I have liked very much and  played with Stellarium but never knew how powerful it can be when you learn scripting.

Thanks!

#15 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • topic starter
  • Posts: 277
  • Joined: 30 Nov 2013

Posted 19 February 2019 - 08:39 AM

I ll try to get a beta version later this week and provide feedback. Tonight, I am giving a short presentation tonight to my local club on conducting and developing strategy's for a Messier Marathon, a key portion of my presentation uses Stellarium,  I added a final credit for your team and ask people to make a donation. Thank you! Stellarium is a fantastic tool. Keep up the good work. 

SteveS



#16 nirvanix

nirvanix

    Surveyor 1

  • -----
  • Posts: 1955
  • Joined: 07 Jun 2007
  • Loc: Medicine Hat, AB

Posted 19 February 2019 - 04:21 PM

Steve,

I downloaded it and tried it out. It's a good start! I would like to have it so that each object is seen from a zoomed-out position and then slowly zoom in so I know where to look. I think it would also help to have the constellation lines visible.

 

Regards.


  • ssagerian likes this

#17 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • topic starter
  • Posts: 277
  • Joined: 30 Nov 2013

Posted 19 February 2019 - 05:10 PM

Thanks Nirvanix, 

have you seen the original script that comes with Stellarium? It zooms into each object and then pulls back slowly.  I think it is called messier_tour. 

I wanted to see the distribution of objects and how they arrive at the meridian. Its clear from the sim that the Virgo cluster is a bottle neck and that you have to hurry thru the Sagittarius field (as the sun is not to far behind).

I ll implement the changes that Alexander suggested, and I think it would be useful to have the sim create a log file of each object's arrival time on the meridian. I also watched it to see if its the best or most efficient 

search strategy (from Harvard Penningtons original list) and I am convinced that it could be improved on, I guess we will see.

SteveS


  • nirvanix likes this

#18 nirvanix

nirvanix

    Surveyor 1

  • -----
  • Posts: 1955
  • Joined: 07 Jun 2007
  • Loc: Medicine Hat, AB

Posted 20 February 2019 - 10:41 PM

Steve, I didn't know about that canned script so thanks.

 

By the way I'm running your script on a Linux system (manjaro linux 17.0)


Edited by nirvanix, 20 February 2019 - 10:41 PM.


#19 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • topic starter
  • Posts: 277
  • Joined: 30 Nov 2013

Posted 21 February 2019 - 12:12 AM

I think that if you run my script without trying to enable the sound, it should run ok even on a linux machine (I didnt stray to far from the supported APIs) , but I agree with Alexander it will most likely crash if you enable sound. I noticed that if an image file is missing the script just quietly ignores the call to open it (probably has a try-catch block) that recovers from poor coding or reckless coders (like me). So if you see the script select the sky icon but not show a photo image, its because its missing or misnamed from what my script expects, Again Alexander is right in that people shouldnt be mucking around in the applications data files, copying and renaming them. 


  • nirvanix likes this

#20 Alexander Wolf

Alexander Wolf

    Stellarium

  • -----
  • Vendors
  • Posts: 377
  • Joined: 27 Jun 2011
  • Loc: Barnaul, Siberia, Russia

Posted 23 February 2019 - 09:50 AM

Please check Stellarium 0.18.3.16678


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics





Also tagged with one or more of these keywords: dso, observing, planetarium software, star party



Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics