Author Topic: geometry of windows reported wrong (PI 1.7.4, osx, x86-64)  (Read 4635 times)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
it seems that PI gets confused about image geometry and pixel depth when image windows have been shaded.

i have several windows on my desktop, including a PSF generated by DynamicPSF which happens to be 15x15x1. the PSF window is un-shaded. when i shade "real" image windows, for some reason while they are shaded they report to PI that their geometry is 15x15x1 rather than their true size (obviously much larger). it's not just cosmetic - pixelmath on shaded windows returns a 15x15 result in this case.

i don't know what's required to reproduce this bug, but PI is in that state right now...

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: geometry of windows reported wrong (PI 1.7.4, osx, x86-64)
« Reply #1 on: 2012 January 18 09:31:45 »
Hi Rob,

There is a bug (on all platforms) because the geometry of a shaded image is not reported correctly (instead, the geometry of the last active unshaded image is shown). This is a bug because a shaded image has not been closed (as happens with iconized images for example), so when the active workspace window is a shaded image its properties should be correctly reported. I'll fix this bug in the next version of the PI Core application.

However, I can't reproduce the second problem you report with PixelMath (which is a much bigger concern of course). This is the test I've made:

- Create an 800x800 image. Name it "A"

- Create a preview on another image.

- Apply the following PixelMath expression to the preview (with rescaling disabled): width(A)/1000

- The result is 0.8 constant pixel value in the preview, as expected.

Can you provide a more elaborate example to reproduce the PixelMath problem, or a small project file?

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

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: geometry of windows reported wrong (PI 1.7.4, osx, x86-64)
« Reply #2 on: 2012 January 20 09:49:15 »
i'll try, i have so many projects going i can't remember which one it was. but i discovered this while i had a PSF window open - the shaded input to pixelmath inherited the very small size of the PSF (apparently at random) and the pixelmath result was tiny.

although, based on what you said, i must have activated the PSF window (15x15) then activated and shaded the input to pixelmath, then executed pixelmath. or, i probably shaded the inputs to pixelmath and then for some reason activated the PSF image.

i may have modified the expression immediately before applying the pixelmath (it was a narrowband -> rgb combine, so R=ha, G=oiii, B=0.2*ha+0.8*oiii if i remember correctly.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: geometry of windows reported wrong (PI 1.7.4, osx, x86-64)
« Reply #3 on: 2012 January 20 23:13:33 »
okay, this project exhibits the bug:

http://dl.dropbox.com/u/8884840/pi_windowsize_bug.tgz

just opening the project and immediately clicking the pixelmath apply button causes the resultant window to have the geometry of the *_preview01 window.


Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: geometry of windows reported wrong (PI 1.7.4, osx, x86-64)
« Reply #4 on: 2012 January 26 17:40:43 »
hey juan, did you see my reply?

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: geometry of windows reported wrong (PI 1.7.4, osx, x86-64)
« Reply #5 on: 2012 January 30 11:51:51 »
Hi Rob,

I have downloaded and checked your project, thank you for uploading it.

There is no bug :) What you're getting with PixelMath is correct and the expected result. You are executing PixelMath in the context of the current view, which is "debayer_masterbias_50d_20110529_80f_iso1600_3_125C_Preview01" because the rest of image windows in the current workspace are shaded ('shaded' is equivalent to 'hidden' in this context). Consequently, PixelMath automatically interpolates the images being operated (subtracted in this case) to match the geometry of its target image (336x280 px).

What you want to do requires executing PixelMath either on one of the large images, or much better, in the global context. To run this PixelMath instance globally, specify the following in the Destination section of the PixelMath tool:

- Create new image: enabled
- Image width: 4770
- Image height: 3177
- RGB Color: selected
- Sample format: 32-bit floating point

Now you can run PixelMath globally, that is independently on any image, by clicking the Apply Global button or pressing F6.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: geometry of windows reported wrong (PI 1.7.4, osx, x86-64)
« Reply #6 on: 2012 January 30 19:26:21 »
i did not realize that a shaded window could not be made the current view.

from a UI standpoint it is very confusing, because if you click on the titlebar of a shaded window, it activates (turns blue). this gave me the impression that it was, well, activated, and should become the current view.

i got into this in the first place because i had a lot of windows open, and had just opened 2 more images in order to do a pixelmath RGB synthesis. i was expecting to create and destroy many trial versions of the combination and didn't want to accidentally close one of the input windows, so i shaded them and moved them aside.

so if it's not a bug, and is not a UI bug, it's at least confusing user interface / user experience :)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: geometry of windows reported wrong (PI 1.7.4, osx, x86-64)
« Reply #7 on: 2012 February 01 04:01:26 »
Quote
from a UI standpoint it is very confusing, because if you click on the titlebar of a shaded window, it activates (turns blue). this gave me the impression that it was, well, activated, and should become the current view.

This is indeed a bug and is now fixed in 1.7.5. An active shaded image window is now always reported as the active image on the whole platform. Thank you for detecting this problem.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: geometry of windows reported wrong (PI 1.7.4, osx, x86-64)
« Reply #8 on: 2012 February 01 13:05:04 »
phew, i thought i was losing my mind. i probably am anyway.