New Feature : Moon Mosaic Planner

All the latest news about new features and improvements to SharpCap
Post Reply
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

New Feature : Moon Mosaic Planner

#1

Post by admin »

Hi folks,

this week's SharpCap 4.1 (4.1.10476) beta update brings a substantial new feature in prototype form - a moon mosaic planning tool.

The goal of this tool is to help capture mosiac images of the moon - in particular it will help plan the layout of mosaic panels needed to ensure that the whole moon (either just the illuminated area or the whole disk) is captured.

Currently the options of what you can do for each panel are fairly limited (you can specify how many frames to capture and whether to do autoexposure for each panel or just once), but those options will expand in future. This first version is very much about testing if the software can plan and execute the correct GOTO movements to capture all the required panels. Unfortunately over the last week or so, the weather hasn't been helpful here, and when it *has* been clear the moon has either been close to the sun in the daylight sky or in areas of the sky that are out of view from my observatory, so I have only tried this in simulation so far.

You will find the tool available in the Sequencer menu. It only becomes available if you have a camera open in live mode and a GOTO mount connected to SharpCap - both are necessary for the tool to work.
c1.JPG
c1.JPG (19.07 KiB) Viewed 9627 times
Once launched, the tool will show an image of the current phase of the moon - this is an 'average moon' image that does not include the effects of the moon's wobble (libration), so it will not exactly match the moon as seen in the sky, but the shape of the illuminated area will be correct.
c2.JPG
c2.JPG (77.9 KiB) Viewed 9627 times
Before getting started, you need to get the moon in view - use the 'GOTO Moon' button for this which will move your mount to center on the current position of the moon. If you already have the moon in view, no need for this.

Alignment

The real first step is to help SharpCap work out the orientation of the moon relative to the camera view and also the scale of the camera view. There are two ways to do this :

1) Plate solving - if you already have a plate solving application installed and set up to work with SharpCap **AND** it can work down to the small field of view that will be associated with capturing a mosaic, then select the 'Plate Solving' radio button. This will show a 'Plate Solve Nearby' button that will move the mount 3 degrees away from the moon, set a 4s exposure and then try to plate solve. If it succeeds then it will move back to the moon and the view of the moon will update to match the view in the telescope (orientation, etc).

2) If plate solving is not an option, then you need to use manual alignment, as follows

a) Check the focal length and the pixel size for the camera are correct. SharpCap will use the focal length from your ASCOM driver if possible and will also automatically set the pixel size if it is known for your camera. Settings these correctly means that the size of each panel of the mosaic can be worked out

b) Use the orientation dial to rotate the moon shown in SharpCap to match the orientation of the moon as seen through the telescope. For crescent/half/gibbous moons then the shape of the illuminated area will guide you. At the full moon you will need to rely on the features on the disk.

c) Use the 'Flip North/South' checkbox if the features of the moon appear the wrong way round after adjusting the rotation. I think this is likely to be necessary if you have a secondary mirror or diagonal mirror in the imaging system.

d) Click on the moon image in SharpCap in the location that matches the current center of the field of view of the camera. This helps SharpCap account for any errors in the mount pointing when planning and executing the mosaic. At this point a single red frame will appear over the moon, which should match your field-of-view, like this
c3.JPG
c3.JPG (78.49 KiB) Viewed 9627 times
Some things to note for the manual alignment:

* You can adjust the focal length, rotation and placing of the field of view rectangle if it doesn't seem quite right
* Since the view is of an 'average moon', aim to base where you click on where it is relative to the illuminated area of the moon, not on surface features
* If you are unsure about whether you have the 'flip N/S' option right, aim for a point along the moon's equator for the center of view/click on point - that makes the N/S option redundant.

Once your alignment is correct, click the 'Done' button.

Panel Plan Options

Once you have completed either manual or plate solving based alignment, SharpCap will show an overlay on the image of all the planned mosaic panels, like this
c4.JPG
c4.JPG (44.81 KiB) Viewed 9627 times
There are some options that you can adjust to fine tune this process

* Turn 'Whole Disk' on or off - when on, SharpCap will plan to photograph the whole disk rather than just the illuminated area
* Adjust the overlap between panels (measured in pixels). This is the minimum overlaps that SharpCap will allow between neighbouring panels - sometimes SharpCap will use a parger overlap if it does not increase the number of panels needed
* Adjust the 'safety margin' around the edge of the moon - increasing this makes SharpCap include a larger area in the mosaic to help guard against any missing areas. If you look closely you will see an halo around the edge of the illuminated area above - this indicates the area covred due to the margin of 50 pixels. If you increase the margin, this halo will become wider and the panels will be adjusted to cover it.

Note that the current way that the panels are planned is probably not always 'optimal' - I intend to do more work on this aspect later to try to ensure that the minimum number of panels are used, but wanted to put out something now that would allow the other parts of this tool to be tested and get feedback.

Mosaic Capture Settings

Once you are happy with the panel plan, you can move on to adjusting the mosaic capture settings. These are quite limited at the moment - just the ability to adjust

* The number of frames to capture for each panel and
* Whether to perform autoexposure once, for each panel or not at all.

Again, this is deliberate at this stage to try to get something simple but testable available - I would be interested to hear what other options might be desireable here. I should also point out that the current way that these options are available at the bottom of the planning window is not likely to continue - I am expecting to have a separate window to specify these in a manner similar to the deep sky sequence planner.

The only thing left at this point is to press the 'Run' button and see if the mosaic capture actually does what it is supposed to do!

Some final things to note:


* The inclusion of the 'Phase' adjustment to work through the moon's phases is incorrect - that was supposed to be something for me to test with and not available in the uploaded version. I will remove that for the next update.

* It's currently deliberate that you cannot adjust the camera controls or access the menus when using this tool. I would like to allow that in future, but it opens a lot of extra complexity (what if someone changes the ROI or binning while the planner is active? What if they close the camera?). All of that complexity would need more code to make sure it is dealt with in a sensible way, and for now I have decided that not allowing that to happen is the best way forward.

* In the future I plan to extend this to Solar mosaics too - that requires a new alignment approach, since neither plate solving or the manual alignment will work - I have a plan for that when we get that far.

* The current code does not optimize the order in which the mosaic panels are captured - I do want to do this in future to try to limit the effects of backlash in the mount movement (most movements should try to be in the same direction as the mount tracks, longer pauses should be included after RA movements that got 'backwards', etc)

* If anyone tests from the Southern hemisphere, let me know what I've got wrong from your point of view... :)

As always, feedback welcome. As this is the first version, there may be a lot of 'I got this far and then it didn't work', but that's valueable too :)

cheers,

Robin
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New Feature : Moon Mosaic Planner

#2

Post by admin »

Well, I wonder if anyone else has tried this yet? I was lucky enough to get some clear sky on Saturday night and was able to try it out. Actually, it came fairly close to working properly, which was very encouraging. I have made some improvements in 4.1.10520 which should make it work even better

The issues I noted were

* When the GOTO movement in RA between two panels was in the +ve direction, it exposes you to any RA backlash as the tracking movement resumes after the GOTO movement is complete. For me, this is a drift of the image over about 10 to 15 seconds before the backlash is taken up. Unless you set a long settle time for the mount then this drift will get captured in the video for the next panel. The new version makes the GOTO in a two part manner - initially moving to a point about 5 minutes of arc offset in the +RA direction, before moving back to the correct position. This should elminate the drift by taking up the RA backlash in the second movement, but untested on real hardware yet.

* Placing the field of view rectangle on the moon image in 'Manual' mode was fiddly, since it would only update position on mouse clicks. I have now changed that so that it will move if you hold the mouse down and move the mouse, which makes placing it easier.

* Picking the right point for the rectangle in manual alignment can be tricky - best to pick a point on the edge of the moon. The new version automatically scales the view to 'auto fit' and shows the cross reticule to help with this when you use manual alignment mode

* The plate solving alignment mode works, but it is *hard* to get plate solving to work correctly when the FOV is small compared to the moon. The best bet is to do a plate solve manually near the moon before selecting the mosaic planning wizard. I found that I needed at least 10s exposure, decent gain, 16 bit mode, sidereal rather than lunar tracking and other tweaks to get it to work. For now I have disabled the 'plate solve nearby' button as it didn't do all of those things and I haven't had a chance yet to improve it.

* It would be good to be able to use the mount movement control and adjust gain/exposure while planning the mosaic, particularly in the manual alignment stage. I am going to try to sort that out this week, but for now I have added an 'Auto Expose' button that should set gain/exposure fairly correctly for the moon if it is in view.

Anyway, if you were planning to try this out, do make sure you try the latest version as it *should* be better than 4.1.10478. The forecast here is for a clear spell this evening, so I will try testing again if the clear sky holds late enough for the moon to be in a usable position.

cheers,

Robin
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: New Feature : Moon Mosaic Planner

#3

Post by Jean-Francois »

Robin,

I will try it ... as soon as the weather will be clear ... and the moon is visible (and not too late).

For the GOTO ... some mounts have an automatic reduction of the backlash for improving the pointing accuracy (in RA and DEC).
They move to a point "before" and "below" the wanted coordinates and then move slowly to the coordinate each time from the "same side".
The SkyWatcher SynScan Pro software does this way. Other mounts will do the same.
Now I guess it is necessary that SharpCap knows if the mounts do it itself for each GOTO.
If is the case, it is better that SharpCap does not repeat the same procedure.

Regards,
Jean-Francois
User avatar
Menno555
Posts: 1060
Joined: Mon Apr 20, 2020 2:19 pm
Location: The Netherlands
Contact:

Re: New Feature : Moon Mosaic Planner

#4

Post by Menno555 »

Not tried it yet Robin.
Simply too cloudy and the times that it is clear, I focus on a project I have with some people here.
But I'm going to try for sure.
About the backlash: with my Ioptron mount that's minimal. Maybe because it has a belt drive? Also I don't use guiding.

Menno
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New Feature : Moon Mosaic Planner

#5

Post by admin »

Hi folks,

good to hear that you are going to give it a go. I had another session yesterday evening and found that the two stage GOTO works to prevent the drift (unfortunately there is no way for SharpCap to ask the ASCOM mount driver if it approaches from a consistent direction, so I may have to make this an option in the end... For now SharpCap just does it).

I found some small gremlins in the code that plans and displays the panel grid - these are now fixed in my code, but not in the current online version. The issues are

* The overlay boxes are drawn to a scale about 4% larger than they should be - the center points are also scaled by an additional 4%
* The layout planning code was giving too much margin at the bottom and the left and not enough at the top or the right, which could have led to missed areas

Using the current version, I would suggest a generous setting for both the overlap and the margin to counteract the above issues. It's also important to get the rotation of the moon accurate to within better than 10 degrees - otherwise there could be gaps between panels even with an overlap set to 10% of the frame width/height due to the frames actually being captured being rotated compared to the ones that are expected. Plate solving based alignment will not suffer from this, but manual alignment can. I have yet another alignment idea that should avoid this pitfall.

I do have a video recording of it in action - will try to post it later.

cheers,

Robin
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New Feature : Moon Mosaic Planner

#6

Post by admin »

Here's a video showing the tool in action. Unfortunately we had thin cloud running through at the time, so the actual videos were not really that good, but you can see how it works



I had to deliberately set my camera into ROI mode, otherwise it would have just managed to squeeze the whole visible part into 1 panel, which isn't very interesting...

cheers,

Robin
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: New Feature : Moon Mosaic Planner

#7

Post by Jean-Francois »

Hello Robin,

I tested now 3 times ... and 3 crashes.
I used my desktop computer in the room with the ASCOM Telescope Simulator.

First try with Prism (for pointing near the moon) and the SkySimulator for an image with some stars.
Second time with the same software.
The third time without Prism, but with the SkySimulator.

In your video, the last 2 films have very small part of the moon.
It could be better to have the region with more surface of the moon.
If 2 rows do not cover the moon, then use 3 rows and "recenter" the 3 rows with more overlapping.

Regards,
Jean-Francois
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New Feature : Moon Mosaic Planner

#8

Post by admin »

Hi Jean-Francois,

no bug reports uploaded for the latest version, so it would be good if you could share the logs so I could investigate what is causing the crash.

Currently the horizontal panel layout will increase overlay if there is surplus space, but not vertically. I think I have worked out a simpler algorithm to layout the panels, which would make it easier to do this sort of thing in future... The current algorithm is a bit complex and prone to breaking if you try to tweak it.

cheers,

Robin
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: New Feature : Moon Mosaic Planner

#9

Post by Jean-Francois »

Hello Robin,

Here the logs ...
Log_2023-05-02T19_08_44-13180.log
(116.94 KiB) Downloaded 164 times
Log_2023-05-02T19_20_17-6184.log
(116.19 KiB) Downloaded 156 times
Log_2023-05-02T19_24_58-14044.log
(103.91 KiB) Downloaded 138 times

Jean-Francois
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New Feature : Moon Mosaic Planner

#10

Post by admin »

Hi,

Ok, I see - my code was generating RA values above 24 due to not wrapping back to zero when 24 was reached. Some mounts cope with it, looks like yours doesn't like it. Anyway, It's a two line fix, so sorted for next update.

cheers,

Robin
Post Reply