Author Topic: StarGenerator Runtime explodes  (Read 3779 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
StarGenerator Runtime explodes
« on: 2009 December 24 04:59:51 »
Hi,

I tried to create a star field with the star generator, and I basically canceled the process after 2 days of runtime. Apparently, there is some issue in the algorithm that lets runtimes explode. Experiments were performed on a 3 GB Vista system with the latest PI version. The task manager never went beyond  1.5GBytes of used RAM, so memory shortage is not an issue here. I experimented with different sensor width/heights, and expected runtimes linear in the number of pixels (basically increasing by 4x in the table below). Here is what I found:

sensor widthsensor heightelapsed runtime (sec)
50025623
1000 500183
200010002692
40002000did not terminate within 2 days

It appears that progress becomes slower and slower over time. Rebooting Vista or restarting PI does not help.

Used Star Mask Settings:
Catalog: PPMX.bin
Right Ascention: 19 7 59
Declination: 1 21 55
Epoch: 2000 1  1
Focal Length: 25
Pixel Size: 5.6
Limit Mag.: 12
Star FWHM: 10
NonLinear: Checked
Nonlinear Target 0.05


Attached below is the log from the command line

Thanks,
Georg

Initializing PixInsight...
...
PixInsight Core 01.05.09.0561 (x86)
Copyright (C) 2003-2009 Pleiades Astrophoto
----------------------------------------------------------------------
Welcome to PixInsight. Started 2009 Dez 24 12:06:41 J2455190.00465 UTC

* Parallel processing enabled: Using 2 logical processors.
* PSM AutoSave enabled. Auto-save period: 30 seconds.

...

StarGenerator: Global context

Mercator Cylindrical Projection
Projection center ....... ?=286.99583 ?=+1.36528
Field of view ........... H=6.41043 V=3.28467
Right ascension range ... ?E=283.78570 ?W=290.20597
Declination range ....... ?S=-0.27818 ?N=+3.00761

Searching stars...
19873 stars found
Star FWHM: 10.00 arcsec, 0.216 px
Rendering stars: 100%
10237 stars in projection
23.384 s

StarGenerator: Global context

Mercator Cylindrical Projection
Projection center ....... ?=286.99583 ?=+1.36528
Field of view ........... H=12.78099 V=6.41043
Right ascension range ... ?E=280.57595 ?W=293.41572
Declination range ....... ?S=-1.84422 ?N=+4.57049

Searching stars...
43738 stars found
Star FWHM: 10.00 arcsec, 0.216 px
Rendering stars: 100%
37191 stars in projection
183.394 s

StarGenerator: Global context

Mercator Cylindrical Projection
Projection center ....... ?=286.99583 ?=+1.36528
Field of view ........... H=25.25167 V=12.78099
Right ascension range ... ?E=274.16751 ?W=299.82415
Declination range ....... ?S=-5.04223 ?N=+7.75577

Searching stars...
142370 stars found
Star FWHM: 10.00 arcsec, 0.217 px
Rendering stars: 100%
128157 stars in projection
2697.362 s

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

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: StarGenerator Runtime explodes
« Reply #1 on: 2009 December 24 08:36:08 »
Hi Georg,

OK, my fist thought was that you were being 'over enthusiastic' when you specified a focal length of only 25mm.

With 500 x 256 pixels, you end up with a FOV of 6.7 x 3.5 degrees - and that is quite a lot of sky. When I run SG on my machine for that pixel size, I get the following
Mercator Cylindrical Projection
Projection center ....... ?=286.99583 ?=+1.36528
Field of view ........... H=6.41043 V=3.28467
Right ascension range ... ?E=283.78570 ?W=290.20597
Declination range ....... ?S=-0.27818 ?N=+3.00761

Searching stars...
19873 stars found
Star FWHM: 10.00 arcsec, 0.216 px
Rendering stars: 100%
10237 stars in projection
12.849 s


Nearly twenty THOUSAND stars - but a run-time of only 13 sec, compared to your 23 sec!

Pushing up to your 1000x500 pixel sensor size, my run-time went up to 45sec, even though I re-ran SG three times whilst observing the effect of modifying the FWHM parameter from 10 down to 2.


When I ran with 2000 x 1000 pixels, my run-time went up to 198 seconds

But, that is still a ridiculous number of stars. 150 THOUSAND  :surprised:. Why not just cut back on the limiting magnitude? Do you really need that many stars - in a field of view THAT size (27deg x 17deg)?

Obviously it may be my machine that is giving me the advantage - 64-bit Vista on a quad-core machine with 8Gb RAM. But I still can't see the need for a star-generated image with more star positions indicated than a decent PC had memory to hold not so many years ago  ;D

I feel that SG is running OK - perhaps we need to impose the pixel police on you  :police: :police: :police:

Cheers,

Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: StarGenerator Runtime explodes
« Reply #2 on: 2009 December 24 10:49:00 »
Oh, Pixel Police got me... :(

Limiting Magnitude to 9 indeed speeds up things quite a bit, with a usable result. Thanks for the hint!

Nevertheless, I think PI should not come to a halt, and show this non-linear behaviour for rendering. Especially since it is not memory (as far as I can judge from looking at the task manager) that is the problem here.

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

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: StarGenerator Runtime explodes
« Reply #3 on: 2009 December 26 07:14:10 »
Hi,

maybe it would be a good idea to provide a parameter like "desired number of stars" instead of "limiting magnitude". It should be easy for the Star Generator to translate between these, and for the purpose of mosaic fitting the number of stars is probably a more natural parameter then a limiting magnitude.

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

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: StarGenerator Runtime explodes
« Reply #4 on: 2009 December 26 07:20:25 »
Good idea Georg! It's odd that SG struggles like this. Cartes du Ciel will render many many thousands of stars in seconds when forced to do so and it's not a zippy application and certainly not multi threaded. I understand the effort goes up quadratically with the size of the field but I can't think of anything complicated that's going on. Perhaps the projection aspect gets more and more complicated as the field of view increases?
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: StarGenerator Runtime explodes
« Reply #5 on: 2010 January 03 09:51:58 »
I agree, limiting the number of stars seems a good idea. I'll try to implement it in the next version.

Anyway I'll revise the star plotting routines to see where the bottleneck is. Thanks for detecting this problem.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/