Author Topic: Faster Staralignment?  (Read 5630 times)

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Faster Staralignment?
« on: 2010 July 19 12:20:43 »
Staralignment seems to take fovever.

I have rather large images 4k x4k.
 It took 1.5 hours to align 91 images on my laptop ( 64 bit 4gig ).
(I did have the files on a external usb.)

Are there some settings that I can change?

Max


Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Faster Staralignment?
« Reply #1 on: 2010 July 19 12:29:10 »
Max,

how fast is your laptop? How many cores? Is the external USB a flash drive or a hard disk? IO and CPU speed are quite important. In your shoes I'd try the following:

- copy some images to the local hard drive and see if that makes the alignment quicker (writing FITS files to flash is very slow in my experience)
- assuming we're talking windows I'd compare it against DeepSkyStacker. It probably works very differently than PI but if it can register and align images a lot quicker than PI then that's an indication that perhaps some parameters needs to be adjusted. From my own experience DSS aligns images very very quickly and StarAlignment sometimes takes a few tries to get it right, causing a delay.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Faster Staralignment?
« Reply #2 on: 2010 July 19 12:38:56 »
Hi,

Image Integration uses  a buffer per image, default 16 MB. So for your roughly 100 images, thats 1.6 GBytes. Depending on what else is running on your system, you may already run short of RAM. Try reducing the buffers to 4 MBytes or so. As a comparison: Integrating 300 images (5000x3000) took 6 hours on my 4 GB laptop running Win7-64. So similar to your speed.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: Faster Staralignment?
« Reply #3 on: 2010 July 19 12:55:43 »
It is not my fastest machinine,  I think 2 cores on the laptop. My Desktop is 6 gig and 4 cores. I do most stuff with it.

Nevertheless, Staralignment is a lot slower the other alignment processes that I have used,  Maxim etc.

I was hoping less stars than the auto( default) setting might help. ?

Perhaps a future option to just match the center of images?

Max

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: Faster Staralignment?
« Reply #4 on: 2010 July 19 13:01:45 »

- assuming we're talking windows I'd compare it against DeepSkyStacker. It probably works very differently than PI but if it can register and align images a lot quicker than PI then that's an indication that perhaps some parameters needs to be adjusted. From my own experience DSS aligns images very very quickly and StarAlignment sometimes takes a few tries to get it right, causing a delay.

I only tried DSS a few times but it was faster.  I find Staralignment does excellent registration in general but it is much slower perhaps 3x.

I was wondering if there is mimimum number of stars to try.
Max

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Faster Staralignment?
« Reply #5 on: 2010 July 19 13:12:32 »
Is your CPU pegged at or close to 100% most of the time when SA runs? If not then it could be IO is slowing you down.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Faster Staralignment?
« Reply #6 on: 2010 July 19 14:04:32 »
Some tips to speed up StarAlignment:

- Star Detection > Detection scales: Decrease the number of scales to 3.

- Star Matching > Maximum stars. By default, 2000 stars are used in SA's first try. You can decrease this parameter to something like 1000 or even 500.

- Star Matching > Triangles per star. This parameter can be reduced to something between 8 to 20. This will speed up the star matching process, but too few triangles may lead to registration failure in difficult cases.

- If your images have different scales (e.g. different focal lengths), you should disable the Star Matching > Use scale differences option, or increase Star Matching > Scale tolerance, as appropriate. This is because if you set a custom maximum number of stars, the automatic trial sequence that SA performs when registration fails is disabled, so the process will always fail if your images have different scales and this option is enabled.

- Interpolation > Registration model. Be sure to select the default Projective transformation mode.

- Some algorithms in StarAlignment are not well suited to benefit from parallel implementations, so there are sections of the code where the usage of multiple processors/cores is suboptimal. You may consider running two instances of PixInsight concurrently, each one working on one half of the images with StarAlignment. This will exploit the full throughput of your dual processor machine.

Keep in mind that StarAlignment is a high-precision, fully automatic image registration system. It is rather sophisticated and IMHO it is far beyond anything that the competition can do. There are other tools (to be precise, one tool) that can register images in marginal cases where SA fails (due to very small overlapping and other factors), but none is as accurate and rigorous as SA, as far as I know. And SA is under active development, so you can only expect it to improve.

Image registration is an extremely important step. The sophisticated routines in SA come at the cost of increased computation time, but the obtained results are well worth it. A one-point alignment routine for SA is not among my plans. You already can perform one-point alignment with DynamicAlignment, but if you really want to get the maximum out of your images, you actually don't want a one-point alignment.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Faster Staralignment?
« Reply #7 on: 2010 July 19 14:08:36 »
Is one-point alignment really what it sounds like? Match a single star and do a linear shift to match? Sounds a bit like the 1 star alignment in Nebulosity :)
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Faster Staralignment?
« Reply #8 on: 2010 July 19 14:13:14 »
Quote
Match a single star and do a linear shift to match?

Exactly. It actually can work... if there's absolutely no rotation, no differences in atmospheric refraction at all, and absolutely perfect seeing. And it provides no measurement of the quality of registration. Isn't it nice? :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Faster Staralignment?
« Reply #9 on: 2010 July 19 14:49:05 »
Ugh :)
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: Faster Staralignment?
« Reply #10 on: 2010 July 19 15:05:07 »
I will give them all a try on my fast machine for comparison. 

I am using the same FL on all my shots so it should not be too challanging. I have seen a few cases where staralignment really did much better than MaxIM's star matching.

Max

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Faster Staralignment?
« Reply #11 on: 2010 July 20 01:21:57 »
...
Image Integration uses  a buffer per image, default 16 MB. So for your roughly 100 images, thats 1.6 GBytes. Depending on what else is running on your system, you may already run short of RAM. Try reducing the buffers to 4 MBytes or so. As a comparison: Integrating 300 images (5000x3000) took 6 hours on my 4 GB laptop running Win7-64. So similar to your speed.
...

Hi,

I was thinking about the wrong tool here.

My experience with Star Alignment is that is works almost perfectly on most of my images with the defaults. 30 seconds per image or so. But Alignment can get real slow if it fails to register on the first few tries, because later tries seem to check larger numbers of variants, sometimes taking 30 minutes before succeeding or finally failing. The tips given by Juan could be helpful here.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)