Author Topic: ATrousWaveletTransform PREVIEW is very slow on Ripley Mac OS X  (Read 2257 times)

Offline james7

  • Member
  • *
  • Posts: 53
    • View Profile
The subject pretty much says it all. Under Mac OS X the realtime preview for the ATrousWaveletTransform is VERY slow under Ripley RC7 (and earlier, this is not isolated to just the RC7 release).

There appear to be two new behaviors with the preview process under Ripley when using the ATrousWaveletTransform. First, you see a dialog for several seconds that says a cache is being computed (this only happens on the first attempt at showing a preview). Then, after the cache dialog disappears there is a very long delay (twenty seconds is not unusual) during which the progress indicator on the preview window spins after which the preview finally appears. This latter delay happens each time you click the preview button in the ATrousWaveletTransform panel. It even happens when you've selected a small preview area within a larger image. Under PixInsight v1.7 I never has such long delays when using the preview function on the ATrousWaveletTransform. It almost seems as if the realtime preview is actually running the full ATrousWaveletTransform process (i.e. the preview isn't any faster than running the entire ATrousWaveletTransform process on the original image).

Mac OS X 10.6.8 (but also happens under Mac OS X 10.7)
Mac Pro (2 x 2.66GHz Xeon)
10GB DRAM

Ripley RC6 and RC7 (and possibly other Ripley releases)

Online Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6865
    • View Profile
    • http://pixinsight.com/
Re: ATrousWaveletTransform PREVIEW is very slow on Ripley Mac OS X
« Reply #1 on: 2013 April 27 04:27:40 »
ATWT real-time previews are actually much faster and accurate than previous versions. However, you have to be careful to prevent actions that invalidate the cache, such as varying the number of wavelet layers, or changing wavelet scaling functions and scaling sequences.

Quote
This latter delay happens each time you click the preview button in the ATrousWaveletTransform panel.

Don't click the Real Time Preview button on a tool window to toggle before/after results, since this forces a complete recalculation of the preview image. Click the Show transformed image button on the Real Time Preview window instead.

Take a look at this short video I've just recorded to see an example of the ATWT tool working in real-time preview mode:

http://pixinsight.com/videos/tmp/ATWT-RT.mov

Note that you can define previews and use them on the Real Time Preview window. As long as you don't change the image being previewed, ATWT's cache won't be invalidated. The same applies to the MultiscaleMedianTransform tool. I hope this helps.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline james7

  • Member
  • *
  • Posts: 53
    • View Profile
Re: ATrousWaveletTransform PREVIEW is very slow on Ripley Mac OS X
« Reply #2 on: 2013 April 27 14:24:36 »
Juan, thanks for the quick reply. However, I guess I need to more specific because the problem isn't with the toggle of the Real Time Preview button (rather than using the Show transformed image button), the issue is that the initial calculation and display of the ATrousWaveletTransform real time preview is MUCH slower under Ripley than it was under v1.7.

I'm using fairly large FITs images (16 megapixel, output from an integration) which are 581MB in size.

Before Ripley my images could be previewed using ATrousWaveletTransform in only one or two seconds (almost instantly for the smaller previews). Now under Ripley that same process is taking anywhere from 27 to 34 seconds (a least a 10x slowdown, maybe 15X). I should add that I'm using the Noise Reduction function in the transform (this may be the key to triggering the problem, if you haven't yet seen the slowdown yourself). My settings are completely default except for these changes for noise reduction:

Layer 1 Threshold 1.5, Amount 1.0, Iterations 1
Layer 2 Threshold 1.0, Amount 1.0, Iterations 1
Layer 3 Threshold 0.5, Amount 1.0, Iterations 1
Layer 4 Threshold 0.5, Amount 0.6, Iterations 1
Layer R NOT ENABLED

The preview Quality is set to Smooth (everything at the defaults).

When I look at Mac OS X's Activity Monitor while the preview is calculating I see that PixInsight is using two cores, each at 100%, so it seems to be trying to do some work (rather intensively) and I don't think it is just idle and blocked.
 
« Last Edit: 2013 April 27 14:45:52 by james7 »

Online Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6865
    • View Profile
    • http://pixinsight.com/
Re: ATrousWaveletTransform PREVIEW is very slow on Ripley Mac OS X
« Reply #3 on: 2013 April 30 08:07:15 »
Hi,

I have released an update with version 2.3.4 of the MultiscaleProcessing module. The new version includes noise reduction data in the ATWT cache, so previews and real-time previews are now much faster to test noise reduction parameters. Please let me know if this fixes this issue for you.

Note that the ATWT cache can only include data for the first noise reduction iteration. If you select two or more iterations for a wavelet layer, only the first one will be cached and the rest will have to recalculate everything.

Quote
Before Ripley my images could be previewed using ATrousWaveletTransform in only one or two seconds (almost instantly for the smaller previews).

In PixInsight 1.7.x, the ATrousWaveletTransform tool couldn't be previewed reliably. In other words, there's no guarantee that what you get on a preview with PI 1.7 for the ATWT tool is the same result that you'll get for the whole image. Usually, the differences were very significant. This has been a serious limitation, and in fact it has made partial previews and real-time previews useless for this tool in PI 1.7.

In PixInsight 1.8, the ATWT and MultiscaleMedianTransform (MMT) tools generate partial previews that are *exactly* the same that you'll get when you apply the same parameters to the whole image. To achieve this, some parts of the process have to be applied to the whole image, irrespective of the preview's geometry. This is due to the multiscale nature of the algorithms involved. To compensate this, we have implemented partial data cache structures that in fact make these tools much faster than previous versions.

Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline james7

  • Member
  • *
  • Posts: 53
    • View Profile
Re: ATrousWaveletTransform PREVIEW is very slow on Ripley Mac OS X
« Reply #4 on: 2013 April 30 23:10:06 »
Juan, I've tested with the new module and after the first calculations for the cache and the initial noise reduction preview the updates seem to run pretty quickly (only a few seconds to recalculate after a change to one of the layers). Thanks for the quick release of the updated module and for the details on what we should expect with the Ripley ATWT module.