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

Jocular -- Software for EAA

  • Please log in to reply
68 replies to this topic

#1 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 10:01 AM

Jocular is an open-source, cross-platform desktop software application written by Martin Meredith and designed specifically for EAA.  It has extensive features for stacking, stretching, and other image correction.  I've wanted to start using it in place of the ASIAIR Pro due to the larger feature set and the failure of the ASIAIR Pro to stack in certain situations.  Thanks to a suggestion from Clouzot, I learned there is a way to still use the ASIAIR Pro for focusing, plate solving, goto, and imaging--which it is very good at--by remotely accessing the ASIAIR Pro's filesystem.  (You can also use Sharpcap with the ASIAIR Pro this way.)  Jocular is mentioned occasionally on this forum but I haven't seen any extensive discussion.  I had my first night using it live recently and wanted to share information about the application and the results.  

 

Jocular is written in the Python programming language.  If you're at all familiar with Python, you'll find installation a snap.  It's slightly more difficult if you're not, but not much as long as you know how to use a command line.  Jocular uses a particular framework (Kivy) for its user interface, and when you open Jocular you'll immediately see it looks different than a typical desktop application.  

 

Jocular Screen Shot 2021 10 15 At 9.53.21 PM

 

Jocular has an eyepiece metaphor, and the controls are arranged around the perimeter.  It's currently showing a stack of 30 mono images from a C8, 0.63x reducer, and ASI178MM.  At the top, the number of stacked images is shown.  You can change this to show individual subs and remove them from the stack.  Next, going counter-clockwise, are controls for how the stack is processed, such as using the mean versus the median of the image values. 

 

Continuing on, we get to the crux: stretching!  No histograms here.  Instead, Jocular sets the black point. You can adjust the white point by sliding the W, but that typically isn't necessary.  You choose one of five stretching algorithms and slide the S to choose the degree of stretch.  In the screen shot, I'm using the aptly-named "hyper" stretch with somewhat less than maximum amount of stretch.  

 

Next, there is an "auto" button you can use to turn off the automatic setting of the black point, and use the B slider instead.  However, I've found Jocular does a superb job of setting the black point.  There are several buttons for displaying information, as well as sliders for the background level, noise reduction, and, most importantly, gradient removal. 

 

"Landscape" lets you take a snapshot of the current view that looks like this:

 

NGC 7479 15Oct21 21 52 36

 

I think the zoom level is based in part on the object size, but I don't know.  You can also toggle this to take a snapshot of the main window.   As you can see, the landscape view of NGC 7479 is oriented differently than the "eyepiece" view in the main window above.  The eyepiece view is correctly oriented, with North up and East to the left.  To get this orientation, you have to run Jocular's plate solving function.  Jump over to the upper right, for the "dso," "loc," and settings buttons.  After you set the size of the sensor, you identify the target DSO using the "dso" button and then run the plate solver using the "loc" button.  This rotates the view correctly.

 

It also identifies other objects in the FOV that are in catalogues you've loaded into Jocular.  In this screen capture, three PGC galaxies are shown and, using a toggle, labelled.  The brightest is mag 18.5; it's not visible in this image. Three quasars are also identified by crosshairs, not labelled.  Even if you don't use Jocular for stacking, you can use it stand-alone for annotation.  

 

I'll finish up this longish post with a fun feature:  you can create an animated GIF that shows the stacking process!  Click on the image to see it in action.

 

NGC 7479 17Oct21 08 52 22

Edited by steveincolo, 17 October 2021 - 02:39 PM.

  • Relativist, Rickster, GooglyEyes and 5 others like this

#2 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 10:04 AM

Here's a selection of galaxies I've viewed using Jocular.  C8, 0.63x reducer, ASI178MM, no filter.  3/4 moon.  Most of these the ASIAIR was unable to stack successfully.  

 

NGC 90 15Oct21 21 30 10
 
NGC 7320 15Oct21 22 42 13
 
NGC 7331 16Oct21 07 03 50
 
NGC 7479 15Oct21 21 52 36
 
NGC 7678 15Oct21 20 31 22
 
NGC 7814 15Oct21 21 41 30

 

I also tried Jocular on a reflection nebula.

 

NGC 7023 15Oct21 22 01 46

  • mklosterman1, roelb and dcweaver like this

#3 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 10:09 AM

A number of to-dos are left for me.

 

  • Get calibration frames working
  • Get OSC camera (ASI533MC) working
  • Improve file transfer

For the last, I was manually moving the files from the ASIAIR Pro to Jocular's "watched" folder.  A little tedious, so I'll write a short Python script to automate this.  

 

One other thing:  Jocular runs best on smaller FITS, 1-2 megabytes according to the documentation.  So I used a single focal reducer with the C8 and the ASI178MM, along with 2x software binning, to get a good filesize as well as a good pixel size.  It would be nicer to use a faster setup, say with stacked reducers, with no software binning.  To get the right filesize, I'll want the transfer script to also crop the FITS (sort of a poor man's ROI feature) before feeding them to Jocular.


Edited by steveincolo, 17 October 2021 - 02:34 PM.

  • geminijk and dcweaver like this

#4 GazingOli

GazingOli

    Viking 1

  • -----
  • Posts: 675
  • Joined: 13 Oct 2019
  • Loc: Stuttgart GERMANY

Posted 17 October 2021 - 10:17 AM

Hi,

 

thanks for sharing this info and your experience! Sounds interesting.

 

Maybe I give it a try, even though I am quite happy with SharpCap pro.

 

CS.Oli


  • steveincolo likes this

#5 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 10:23 AM

Hi,

 

thanks for sharing this info and your experience! Sounds interesting.

 

Maybe I give it a try, even though I am quite happy with SharpCap pro.

 

CS.Oli

Please do give it a try, Oli.  I think it works very well on small galaxies, as you can see.  Let me know if you have any difficulty installing it.  



#6 mklosterman1

mklosterman1

    Vostok 1

  • *****
  • Posts: 104
  • Joined: 04 Aug 2013
  • Loc: Rixeyville, VA

Posted 17 October 2021 - 10:30 AM

This is very interesting indeed! In particular I love the fact that it simulates eyepiece view (albeit with a superhuman eye!). Is there a way to temporarily suppress all the controls so you just have the circle with the image in it? That would be great for public outreach. Also is there a way to manually rotate the view?

 

Thanks

Mike


  • geminijk and steveincolo like this

#7 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 10:35 AM

This is very interesting indeed! In particular I love the fact that it simulates eyepiece view (albeit with a superhuman eye!). Is there a way to temporarily suppress all the controls so you just have the circle with the image in it? That would be great for public outreach. Also is there a way to manually rotate the view?

 

Thanks

Mike

Interesting idea, Mike! You can manually rotate the view using the mouse within the eyepiece, and you can zoom using the Z slider.  You can also dim the controls and turn off the status displays. 



#8 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 11:28 AM

This is very interesting indeed! In particular I love the fact that it simulates eyepiece view (albeit with a superhuman eye!). Is there a way to temporarily suppress all the controls so you just have the circle with the image in it? That would be great for public outreach. Also is there a way to manually rotate the view?

 

Thanks

Mike

You can also move the center of the view with the mouse.  So a fun thing for Spring will be taking a wider field view of part of the Virgo Cluster, annotating the galaxies, and galaxy-hopping within the view, zooming on each galaxy.  Then move to another view.  



#9 Bill Jensen

Bill Jensen

    Apollo

  • *****
  • Posts: 1,119
  • Joined: 23 Oct 2004
  • Loc: Springfield VA

Posted 17 October 2021 - 12:06 PM

Nice that it is cross platform! As a Mac user, that is certainly appreciated. 


  • steveincolo likes this

#10 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 12:07 PM

Nice that it is cross platform! As a Mac user, that is certainly appreciated. 

Likewise!



#11 alphatripleplus

alphatripleplus

    World Controller

  • *****
  • Moderators
  • Posts: 126,837
  • Joined: 09 Mar 2012
  • Loc: Georgia

Posted 17 October 2021 - 12:13 PM

Nice write up, Steve. I still have not gotten around to trying it, but Martin seems to be developing a lot of useful tools, such as the platesolving database and catalogs


  • steveincolo likes this

#12 bthrel

bthrel

    Messenger

  • *****
  • Posts: 400
  • Joined: 02 May 2020
  • Loc: Linden TN

Posted 17 October 2021 - 12:28 PM

Like it, have to running but can't seem to make it see my ZWO camera, where/how to you set that?


  • steveincolo likes this

#13 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 12:35 PM

Like it, have to running but can't seem to make it see my ZWO camera, where/how to you set that?

It only has native support for one camera currently.  You have to use other software to save ZWO camera images into Jocular’s “watched” directory.  Here’s a slightly out-of-date user guide. 



#14 bthrel

bthrel

    Messenger

  • *****
  • Posts: 400
  • Joined: 02 May 2020
  • Loc: Linden TN

Posted 17 October 2021 - 12:52 PM

It only has native support for one camera currently.  You have to use other software to save ZWO camera images into Jocular’s “watched” directory.  Here’s a slightly out-of-date user guide. 

It really looks awesome, can't wait till more cameras are supported so I can test it out.



#15 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 02:12 PM

It really looks awesome, can't wait till more cameras are supported so I can test it out.

To be clear: you can use it for live stacking with any camera right now.  I'm using it with a ZWO ASI178MM.  You just have to save your image captures, that you take using other software, in Jocular's watched directory.  What Jocular doesn't support right now is taking images with your camera.  

 

If you'd like to test it, you can just manually drop previously saved FITS files from a previous session into the watched directory.



#16 bthrel

bthrel

    Messenger

  • *****
  • Posts: 400
  • Joined: 02 May 2020
  • Loc: Linden TN

Posted 17 October 2021 - 02:21 PM

Got it, Next time out I will save some FITS files and give it a whirl. I was just excited at the possibility of a new option for us MAC users, I'll definitely be following you developments


  • steveincolo likes this

#17 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 17 October 2021 - 02:26 PM

Got it, Next time out I will save some FITS files and give it a whirl. I was just excited at the possibility of a new option for us MAC users, I'll definitely be following you developments

Great!  Let me know if you've got any questions.  Or you can post over at Stargazer's Lounge in the Jocular thread.  Martin Meredith is pretty active there. 



#18 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 19 October 2021 - 05:05 PM

With help from Martin, I have calibration files running now.  I reran a couple of my previous views using them.  They definitely improved the contrast, which is something Jocular is very good at.  As a result, I can now make out all five members of Shk 364, not bad for 8 minutes stacking under a 3/4 moon!  

 

Since this is post-processed, I'll just link to the file.  It shows another nice Jocular feature: just double-click on the eyepiece view for an inverted (i.e. black on white) view.  

 

I've also written a Python script to handle transferring files from the ASIAIR Pro to Jocular's watched directory, as well as to crop the files so I can use a faster scope setup.  Will post again when I'm able to test!


  • alphatripleplus and roelb like this

#19 Clouzot

Clouzot

    Viking 1

  • -----
  • Posts: 567
  • Joined: 09 Jul 2018
  • Loc: French Riviera

Posted 20 October 2021 - 02:30 AM

Thanks Steve for the write up. As a Mac user with no real native solution for EAA, I had been following Martin's Jocular since its very first iterations, and even considered running it on a small mount-side RPi, but quickly gave up...because of Python.

 

Python is fine by itself (as a die-hard C++ coder I don't particularly like those weakly-typed script languages, but one has to keep up with the times, I guess). But it turns out it's definitely not a turnkey platform, especially for Mac users: if you naively follow the meager installation instructions from Python.org, there are immediate conflicts between the built-in - an outdated 2.7 - Python version that comes preinstalled, and the one (3.x) that Jocular needs.

 

If anyone has step-by-step instructions about how to start from a freshly installed macOS and end up with a working Jocular instance, please shoot. Steve, I see from your screenshots that you're running macOS, so you may already know what to do?



#20 MartinMeredith

MartinMeredith

    Viking 1

  • *****
  • Posts: 724
  • Joined: 01 Feb 2015

Posted 20 October 2021 - 04:07 AM

Hi Clouzot

 

True, its not turnkey. Creating executables is a bit of a blind spot for Python at the present time. Many OSs appear to come with python 2 pre-installed (presumably legacy code used by the system since python 2 is no longer supported). Depending how python 3 was installed, this might or might not cause an issue with paths. If you find that typing python --version in a shell gives you version 2, you have to use the command python3 instead of python. This includes installation using pip, which can either be done as

 

python3 -m pip install jocular

 

or (equivalent)

 

pip3 install jocular

 

cheers

 

Martin

 

BTW this isn't really the place for such a debate smile.gif , but Python is actually not a weakly-typed language. Rather, it is a dynamically-typed language, and all objects have a clearly-defined type at all times. And I made the mistake of seeing it as only a scripting language for many years of programming and really regret the extra code verbosity, reduced productivity, and lack of functionality I put up with for all that time. It is a fully-fledged object-oriented language with the advantage of stealing a lot of great ideas from functional languages too. I guess if it were only a scripting language then it wouldn't be the first choice these days for most research work in machine learning, astrophysics, etc... e.g. this talk


  • steveincolo, Clouzot and Lastinline like this

#21 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 20 October 2021 - 07:20 AM

Thanks Steve for the write up. As a Mac user with no real native solution for EAA, I had been following Martin's Jocular since its very first iterations, and even considered running it on a small mount-side RPi, but quickly gave up...because of Python.

 

Python is fine by itself (as a die-hard C++ coder I don't particularly like those weakly-typed script languages, but one has to keep up with the times, I guess). But it turns out it's definitely not a turnkey platform, especially for Mac users: if you naively follow the meager installation instructions from Python.org, there are immediate conflicts between the built-in - an outdated 2.7 - Python version that comes preinstalled, and the one (3.x) that Jocular needs.

 

If anyone has step-by-step instructions about how to start from a freshly installed macOS and end up with a working Jocular instance, please shoot. Steve, I see from your screenshots that you're running macOS, so you may already know what to do?

Just to add a small thing to what Martin said.  I believe the .pkg installer from Python.org updates your shell startup file to add python3 and pip3 to your path.  After the pip install of Jocular, it's also in your path, so you can run Jocular from the command line:  $ jocular

 

I did successfully install Jocular on an RPi.  It ran, and it stacked, but the Kivy framework (which I had to do some manual installation for) had too many bad quirks. I've only found one slightly annoying Kivy quirk on MacOS, which is that the settings dialog doesn't act as a native, separate window.  If you close it by using the X, you're closing Jocular.  Instead, you have to use the "Close" button. 

 

While I'm at it, I want to correct an error from an earlier post.  I said Jocular was most comfortable with 1-2 megabyte files.  That should've been 1-2 megapixel images.  


Edited by steveincolo, 20 October 2021 - 07:32 AM.


#22 alphatripleplus

alphatripleplus

    World Controller

  • *****
  • Moderators
  • Posts: 126,837
  • Joined: 09 Mar 2012
  • Loc: Georgia

Posted 20 October 2021 - 07:35 AM

I have Python 3.7 installed on two old Windows machines, that I regularly use for some non-astronomical Python applications I have written.  So I should really have made an effort to use Jocular . However, I've sort of been holding off trying Jocular, as I'd prefer to have one application that will control the camera directly and live stack (I'm trying to avoid the folder monitor option). At the moment, I would still need to run SharpCap or ASILive for capture with an ASI290MM and have the files deposited in a monitor folder for Jocular to grab. My trusty LodestarX2 would have been ideal, but it has moved on.smile.gif

 

I'm wondering if Martin has an idea when Jocular might directly control other cameras.



#23 steveincolo

steveincolo

    Messenger

  • *****
  • topic starter
  • Posts: 418
  • Joined: 26 Sep 2017
  • Loc: Boulder, Colorado, US

Posted 20 October 2021 - 07:35 AM

Hi Clouzot

 

True, its not turnkey. Creating executables is a bit of a blind spot for Python at the present time. Many OSs appear to come with python 2 pre-installed (presumably legacy code used by the system since python 2 is no longer supported). Depending how python 3 was installed, this might or might not cause an issue with paths. If you find that typing python --version in a shell gives you version 2, you have to use the command python3 instead of python. This includes installation using pip, which can either be done as

 

python3 -m pip install jocular

 

or (equivalent)

 

pip3 install jocular

 

cheers

 

Martin

 

BTW this isn't really the place for such a debate smile.gif , but Python is actually not a weakly-typed language. Rather, it is a dynamically-typed language, and all objects have a clearly-defined type at all times. And I made the mistake of seeing it as only a scripting language for many years of programming and really regret the extra code verbosity, reduced productivity, and lack of functionality I put up with for all that time. It is a fully-fledged object-oriented language with the advantage of stealing a lot of great ideas from functional languages too. I guess if it were only a scripting language then it wouldn't be the first choice these days for most research work in machine learning, astrophysics, etc... e.g. this talk

 

Just to add a little testimonial:  I was able to hack a small Python script for cropping a mono FIT in about an hour, using the astropy package, and not really knowing anything about the FIT file format.  


Edited by steveincolo, 20 October 2021 - 07:36 AM.


#24 MartinMeredith

MartinMeredith

    Viking 1

  • *****
  • Posts: 724
  • Joined: 01 Feb 2015

Posted 20 October 2021 - 10:01 AM

I have Python 3.7 installed on two old Windows machines, that I regularly use for some non-astronomical Python applications I have written.  So I should really have made an effort to use Jocular . However, I've sort of been holding off trying Jocular, as I'd prefer to have one application that will control the camera directly and live stack (I'm trying to avoid the folder monitor option). At the moment, I would still need to run SharpCap or ASILive for capture with an ASI290MM and have the files deposited in a monitor folder for Jocular to grab. My trusty LodestarX2 would have been ideal, but it has moved on.smile.gif

 

I'm wondering if Martin has an idea when Jocular might directly control other cameras.

I've been working on this on and off over the summer but it is difficult to test when I only have access to one camera and one OS. I already have a pilot implementation for controlling ASI cameras natively but its a matter of tidying up the rest of the code (there have been quite a few other changes/simplifications) before I can release that for testing.

 

Supporting other cameras hasn't been a priority because it is (a) messy and (b) diverts time from doing more interesting high level stuff, and the watched folder works well enough. I don't think Steve mentioned it, but Jocular is not just for live observing. It also contains a large and extensible DSO planning tool and handles the storage, organisation and reloading of previous captures automatically. I honestly think if I'd gone down the road of supporting lots of cameras at the outset then none of this extra functionality would exist. But maybe it is time to support ASI.... Does this mean I need to add a gain control? grin.gif

 

Martin


  • alphatripleplus and steveincolo like this

#25 MartinMeredith

MartinMeredith

    Viking 1

  • *****
  • Posts: 724
  • Joined: 01 Feb 2015

Posted 20 October 2021 - 10:11 AM

Just to add a small thing to what Martin said.  I believe the .pkg installer from Python.org updates your shell startup file to add python3 and pip3 to your path.  After the pip install of Jocular, it's also in your path, so you can run Jocular from the command line:  $ jocular

 

I did successfully install Jocular on an RPi.  It ran, and it stacked, but the Kivy framework (which I had to do some manual installation for) had too many bad quirks. I've only found one slightly annoying Kivy quirk on MacOS, which is that the settings dialog doesn't act as a native, separate window.  If you close it by using the X, you're closing Jocular.  Instead, you have to use the "Close" button. 

 

While I'm at it, I want to correct an error from an earlier post.  I said Jocular was most comfortable with 1-2 megabyte files.  That should've been 1-2 megapixel images.  

Kivy tries to be a cross-platform GUI framework and is nearly there, but there are still a few oddities, its true.

 

You'll be happy to know that the in next version the config system has changed so that problem goes away.

 

The reason I've recommended smaller pixel count cameras is because Jocular supports a fairly complete 'undo' model for which it needs access to the entire stack of subs, and I wanted to keep things feasible in terms of interactivity and memory usage. Also, for those of us using mono + filters, it supports live LRGB processing in LAB space, which is quite compute intensive for large cameras.

 

At present Jocular occupies quite a small niche. Most EAAers will be better off using something else! 

 

Martin


  • steveincolo likes this


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






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics