×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Re:Mosaic tool - overlap not correct on width

  • Posts: 30
  • Thank you received: 26
He's usually been pretty quick in the past, I see in DerPits thread he's mentioned he's published a fix but not had time to test it. This is good news in that the issue is on the radar and it will keep coming up as more people use kstars and want to do mosaics.

Knowing that Telescopius output a CSV table of panel coordinates I'm going to explore how I can parse this into creating job files for Ekos that I can import.

If fixing the native mosaic tool is to hard to do, having an easy way to paste the CSV output from Telescopius would be a good workaround.
3 years 8 months ago #56881

Please Log in or Create an account to join the conversation.

So turns out this was a rather simple fix after all. I first trying to introduce a new variable, but ended up just changing one line and the results appears to be consistent with Noel's results. Can you please re-compile and test again to verify?
The following user(s) said Thank You: Noel, Jim S.
3 years 8 months ago #56882

Please Log in or Create an account to join the conversation.

  • Posts: 398
  • Thank you received: 117
There's much more than 1 line of diff (see below, not including h file), but I think we're still talking about your latest code. After pull, recompile, & sim run, the results look ok (match the fragment). Still not an exhaustive test (especially near the poles), but this is likely good for on-sky test reports by users. Anything that fixes the bug is good. Cheers Doug

< pixelsPerArcmin = Options::zoomFactor() * dms::DegToRad / 60.0;
---
> pixelsPerArcminRA = (Options::zoomFactor() * dms::DegToRad / 60.0);
> pixelsPerArcminDE = Options::zoomFactor() * dms::DegToRad / 60.0;

< double fov_w = map->width() / pixelsPerArcmin;
< double fov_h = map->height() / pixelsPerArcmin;
---
> double fov_w = map->width() / pixelsPerArcminRA;
> double fov_h = map->height() / pixelsPerArcminDE;

< double x = (fov_w - targetWFOVSpin->value() * 2) / 2 * pixelsPerArcmin;
< double y = (fov_h - targetHFOVSpin->value() * 2) / 2 * pixelsPerArcmin;
< double w = targetWFOVSpin->value() * 2 * pixelsPerArcmin;
< double h = targetHFOVSpin->value() * 2 * pixelsPerArcmin;
---
> double x = (fov_w - targetWFOVSpin->value() * 2) / 2 * pixelsPerArcminRA;
> double y = (fov_h - targetHFOVSpin->value() * 2) / 2 * pixelsPerArcminDE;
> double w = targetWFOVSpin->value() * 2 * pixelsPerArcminRA;
> double h = targetHFOVSpin->value() * 2 * pixelsPerArcminDE;

< mosaicTileItem->setPos(skyMapItem->mapToScene(QPointF( mosaicWSpin->value()*cameraWFOVSpin->value()*pixelsPerArcmin / 2,
< mosaicHSpin->value()*cameraHFOVSpin->value()*pixelsPerArcmin / 2)));
---
> mosaicTileItem->setPos(skyMapItem->mapToScene(QPointF( mosaicWSpin->value()*cameraWFOVSpin->value()*pixelsPerArcminRA / 2,
> mosaicHSpin->value()*cameraHFOVSpin->value()*pixelsPerArcminDE / 2)));

< qCDebug(KSTARS_EKOS_SCHEDULER) << "Tile FOV in pixels W:" << cameraWFOVSpin->value() * pixelsPerArcmin << "H:"
< << cameraHFOVSpin->value() * pixelsPerArcmin;
---
> qCDebug(KSTARS_EKOS_SCHEDULER) << "Tile FOV in pixels W:" << cameraWFOVSpin->value() * pixelsPerArcminRA << "H:"
> << cameraHFOVSpin->value() * pixelsPerArcminDE;

< mosaicTileItem->setFOV(cameraWFOVSpin->value() * pixelsPerArcmin, cameraHFOVSpin->value() * pixelsPerArcmin);
---
> mosaicTileItem->setFOV(cameraWFOVSpin->value() * pixelsPerArcminRA, cameraHFOVSpin->value() * pixelsPerArcminDE);

< qCDebug(KSTARS_EKOS_SCHEDULER) << "Mosaic Tile W:" << mosaicTileItem->boundingRect().width() << "H:" << mosaicTileItem->boundingRect().height();
---
> qCDebug(KSTARS_EKOS_SCHEDULER) << "Mosaic Tile W:" << mosaicTileItem->boundingRect().width() << "H:" <<
> mosaicTileItem->boundingRect().height();

< qCDebug(KSTARS_EKOS_SCHEDULER) << "Tile #" << i * mosaicTileItem->getWidth() + j << "Center:" << tile->center << "Rot Center:" << tile->c
enter_rot;
---
> qCDebug(KSTARS_EKOS_SCHEDULER) << "Tile #" << i * mosaicTileItem->getWidth() + j << "Center:" << tile->center <<
> "Rot Center:" << tile->center_rot;

< //tile->skyCenter.setRA0( (center.ra0().Degrees() + (diffFromSkyMapCenter.x() / (pixelsPerArcmin * 60.0))) / 15.0);
< tile->skyCenter.setDec0( center.dec0().Degrees() + (diffFromSkyMapCenter.y() / (pixelsPerArcmin * 60.0)));
---
> tile->skyCenter.setRA0( (center.ra0().Degrees() + (diffFromSkyMapCenter.x() / (pixelsPerArcminRA * cos(
> center.dec0().radians()) * 60.0))) / 15.0);
> tile->skyCenter.setDec0( center.dec0().Degrees() + (diffFromSkyMapCenter.y() / (pixelsPerArcminDE * 60.0)));

< qCDebug(KSTARS_EKOS_SCHEDULER) << "Tile RA0:" << tile->skyCenter.ra0().toHMSString() << "DE0:" << tile->skyCenter.dec0().toDMSString();
---
> qCDebug(KSTARS_EKOS_SCHEDULER) << "Tile RA0:" << tile->skyCenter.ra0().toHMSString() << "DE0:" <<
> tile->skyCenter.dec0().toDMSString();
3 years 8 months ago #56883

Please Log in or Create an account to join the conversation.

Initially I splitted the variable to RA/DE and pushed that, then I found out it's not really necessary and just updated one line which did the actual fix. I didn't roll back the initial change as it could prove useful for something else in the future.
3 years 8 months ago #56891

Please Log in or Create an account to join the conversation.

  • Posts: 1309
  • Thank you received: 226

I haven't used it much, but I did this quick mosaic of the Pleiades some time ago as a test. Only had time for 3 out of 4 frames, not counting an unplanned frame in the center of this compilation.

It seemed OK to me at the time, maybe a little off. But it is a somewhat small FOV. If I recall I used 5% overlap.
I will add it would be nice to be able to adjust the horizontal and vertical overlap % independently. As with a 2:3 ratio there is excess overlap in the long dimension.
3 years 8 months ago #56918
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 910
  • Thank you received: 86
I actually collected another mosaic about a month ago. It looks much better in terms of overlaps (comparing to what I posted earlier in this thread).
Not sure why such a difference.
Different versions of KStars (Windows by the way)? Both mosaics were collected with nightly builds. Veil was probably an older build.

-- Max S
ZWO AM5. RST-135. AZ-GTI. HEQ5. iOptron SkyTracker.
TPO RC6. FRA400. Rokinon 135 and other lenses.
ZWO ASI2600MC. D5500 modified with UVIR clip-in filter.
ZWO ASI120MM Mini x 2. ZWO 30F4 guider. Orion 50mm guider.
ZWO EAF x 2.
Last edit: 3 years 8 months ago by maxthebuilder.
3 years 8 months ago #56920
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 26
KStars 3.4.3 Build: 2020-07-15T21:35:26Z ; Source : Nightly builds

Using the same simulation in my first post; a 2x2 mosaic of NGC5139, using SimulatorCCD, 1280x1024 5.2μ pixels with 480mm focal length.

Mosaic tool, using 0% overlap for illustrative purposes.



The RA/DEC of the 4 panel jobs generated were simulated in Stellarium configured with same focal length and sensor parameters.

Result:



Success!

I look forward to trying this 'for real' when weather clears.

Thanks for everyone that contributed an especially to Jasem for taking the time to apply this fix.
3 years 8 months ago #56929
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
Tried this with the simulators. A 2x2 mosaic of NGC188 was more or less OK but a 2x2 mosaic of Polaris had Polaris in the correct position but there is a lot or rotation between the images at different right ascensions.
NGC188


Polaris


I think Polaris is a bit too much of an edge case, doing a mosaic generator that can handle that would need a completely different way of working.

BTW these were stacked using ASTAP's Imaging Stitching mode, no pre or post processing, not even darks.
The following user(s) said Thank You: Eric
3 years 8 months ago #56933
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 398
  • Thank you received: 117
Just FYI, Jasem didn't apply the pole constraint logic portion of the fragment for the cos(dec) divisor , but the correction that was applied should be good to 89 degrees or better for all FOVs. Depending on whether other parts of the code catch/address angular wrap, any breakdown that might occur would happen at DEC +/- ~89.5 or greater (FOV < 3 degree), and ~89.84 or higher (FOV < 1 degree). This should (hopefully) satisfy pretty much everyone.

Edit: Didn't see Chris' post until right after I posted, but the "flat plane" issue might not be overcome even with a pole wrap constraint.... Interesting results. Nice to see NGC188 works!
Last edit: 3 years 8 months ago by Doug S.
3 years 8 months ago #56934

Please Log in or Create an account to join the conversation.

  • Posts: 1009
  • Thank you received: 133

An edge case yes, but the rotation is already an issue above 60-70 degrees DEC. The mosaic code assumes that the borders stay parallel, but the North direction of course rotates when you move in RA. Unfortunately this isn't solvable properly, unless you have a motorized rotator. Even computing a tiling that doesn't have holes isn't trivial under that condition....
The following user(s) said Thank You: Eric
3 years 8 months ago #57209

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0


Is there an easy way of doing this? I use telescopius for planning most of my mosaics...
3 years 3 weeks ago #68098

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
I'm posting to this thread because I am finishing a rework of the mosaic tool.

I read carefully through your reports and ideas, and I really want to thank you all for everything in this thread, that was very instructive.

I kept the Scheduler job generation the same, except for one change : I calculated the ascension of each tile based on its declination offset from the mosaic center, taking into account rotation. This results in proper RA for large mosaics. Or so I hope, because that's tricky.

I will be posting screenshots and the link to the MR on invent.kde.org. I would be grateful if someone could make a comparison with other tools, in order for me to understand if I got things right.

-Eric
The following user(s) said Thank You: Doug S
3 years 2 weeks ago #68558

Please Log in or Create an account to join the conversation.

Time to create page: 0.972 seconds