PixInsight Forum (historical)

PixInsight => Bug Reports => Topic started by: dkuchta5 on 2019 September 28 14:20:59

Title: Eccentricity = 0 in Subframe Selector
Post by: dkuchta5 on 2019 September 28 14:20:59
For the last month or two, every time I use subframe selector, the eccentricity plot and chart data are completely flat at zero.  All the other parameters look correct.  This used to work.  I'm using version 1.08.06.1475 64 bit on Mac OS X 10.14.6.  I don't think I've changed anything in my workflow or settings.  Is this a known bug? Or am I doing something wrong?
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: smccully on 2019 October 05 23:22:15
I am seeing this error for the first time, when i try to change the Weighting Algorithm i get an error "nan is not defined". While the Weight is nan for all values, and cannot be changed. Appears to have to do with Eccentricity being zero.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: smccully on 2019 October 05 23:26:39
Removing the weighting expression, will reset the values to zero and then a new expression can be used that does not make use of Eccentricity. Not sure why Eccentricity is zero though, never seen this before.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: smccully on 2019 October 19 10:23:44
Is there any insight into whats causing Eccentricity to always show as zero in SubFrameSelector?
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: pfile on 2019 October 19 10:38:15
so the thing is, no one can look into these things unless you provide some sample data. do you have a minimal set of data that causes this problem?

rob
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dkuchta5 on 2019 October 19 11:13:26
pfile: This is 100% consistent, repeatable, and works with any and all images.  There is no sample data required.

I just did some additional testing.  This appears to only be an issue in the Macintosh version.  I have the same release number installed on an older Windows laptop and there is no problem with eccentricity.  Unfortunately, that laptop runs far too slow to use Pixinsight effectively.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dkuchta5 on 2019 October 19 11:25:57
But, if you really need some images, here is a handful of images in a google drive folder:

https://drive.google.com/drive/folders/1XijAQgkRhpZTd8hFiWNHwbw_HuqCuw14?usp=sharing

-Dan
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: pfile on 2019 October 19 13:00:39
these appear to be bayered images - are you running SFS directly on these files or on debayered versions?

the new staralignment routine does PSF fitting which may not work against the bayered data.

also are you using the SFS process or script?

rob
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dkuchta5 on 2019 October 19 13:27:34
I'm running the SFS Script, and I run it directly on these subs.  Yes they are from an OSC camera so they are bayered.  Also, as mentioned, these exact same images work fine on the Windows version of PI, so I don't suspect that there's any incompatibility between the algorithms and the images ... unless, of course, the algorithms are different on the Mac.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dave_galera on 2019 October 19 13:38:58
In javascript by definition, NaN is the return value from operations which have an undefined numerical result, so it may be a javascript program error.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dkuchta5 on 2019 October 19 13:59:16
I just tried it with the Subframe selector process on the Mac, with the same images and there is no problem with eccentricity.  So it appears that the problem is limited to the SFS Script in the Mac version.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: pfile on 2019 October 19 14:09:11
it kind of doesnt make sense to run an eccentricity calculation on bayered data... the intensity of the star is not going to be consistent in adjacent pixels. what happens if you debayer the frames first?

having said that it is possible the SFS script has not been updated to work properly with the new SA process. the difference in behavior could come down to the implementation of the javascript interpreter between windows and mac. juan might be rolling in a prepackaged binary - i am not sure if it is compiled or just provided as libraries.

rob
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dkuchta5 on 2019 October 19 18:09:17
>> it kind of doesnt make sense to run an eccentricity calculation on bayered data... the intensity of the star is not going to be consistent in adjacent pixels. what happens if you debayer the frames first?

I never tried to debayer first because the docs said it could take raw images and didn't mention debayering.  What you say makes some sense, however I've been using it with bayered image for quite some time with no problem.  It has always accurately represented the elongation of stars in poorly guided images and let me cull them out.  It just started giving me all zeroes lately.

And the fact is, it still continues to work well. It works in the Mac SFS process, and on Windows it works in both the SFS process and the SFS script.  It just doesn't work on the Mac in the script.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dave_galera on 2019 October 20 03:18:21
I am seeing this error for the first time, when i try to change the Weighting Algorithm i get an error "nan is not defined". While the Weight is nan for all values, and cannot be changed. Appears to have to do with Eccentricity being zero.

If you are getting 'nan' for all values then this is possibly a program bug as per previous post.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: smccully on 2019 October 20 14:25:23
Hold on, i am using MonoChrome Images and Windows and i still see this issue.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: smccully on 2019 October 20 14:36:03
https://www.dropbox.com/s/muycy83gm1ggzik/Lum-1x-120s-29_c.xisf?dl=0

https://www.dropbox.com/s/i0ns8sogph5o7hf/Lum-1x-120s-25_c.xisf?dl=0

(https://i.imgur.com/OW1j9XX.png)

Title: Re: Eccentricity = 0 in Subframe Selector
Post by: pfile on 2019 October 20 14:56:05
that's something else then - your screenshot is of the SFS process, not the script.

anyway clearly something is wrong here - juan would have to take a look - i know that the new StarAlignment module does all sorts of stuff with PSF fitting so it could be that both the SFS script and SFS module need updates to take this into account.

rob
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: smccully on 2019 October 20 15:03:27
Yeah, this was always working and then even prior to the recent 1.8 update it stopped working. So i am not sure its actually related to the rework, though i really dont know
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dkuchta5 on 2019 October 20 18:19:47
smccully: Good to know.  I checked a friend's installation on Windows and he was getting good eccentricity numbers, and it works for me on my Windows laptop.  So I figured it was just a Mac issue.  Not so, I guess.  I wonder if it has something to do with the individual computer configuration. 

-Dan
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: smccully on 2019 October 20 21:07:53
I dont know, this was working. No idea what if anything really changed when it stopped working. But it hasn't worked since, even after reinstallation for latest version
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: Geoff on 2019 October 21 02:38:34
It’s not only eccentricity that is a problem.  An FWHM less than one arc second is not believable unless you are imaging somewhere in the high Andes.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: Juan Conejero on 2019 October 21 06:20:41
Quote
It’s not only eccentricity that is a problem.  An FWHM less than one arc second is not believable unless you are imaging somewhere in the high Andes.

I have just measured the two frames linked above with SubframeSelector, and the FWHM values reported are 3.3 and 3.6 arc seconds, respectively for the 25_c and the 29_c frames. I have used a frame scale value of 0.4"/px and a circular Gaussian PSF, just as shown on the screenshot. These FWHM values are quite correct IMO.

It is true that eccentricities are being reported as zero for both frames; I'll investigate this later. As for FWHM, something looks wrong with the measurements being shown here. Can you please upload this entire set of M33 frames?
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dkuchta5 on 2019 October 21 06:47:59
>> I dont know, this was working. No idea what if anything really changed when it stopped
>> working. But it hasn't worked since, even after reinstallation for latest version.

My experience exactly.  Installing the latest version did not change the behavior.
-Dan
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: smccully on 2019 October 21 12:15:56
Quote
It’s not only eccentricity that is a problem.  An FWHM less than one arc second is not believable unless you are imaging somewhere in the high Andes.

I have just measured the two frames linked above with SubframeSelector, and the FWHM values reported are 3.3 and 3.6 arc seconds, respectively for the 25_c and the 29_c frames. I have used a frame scale value of 0.4"/px and a circular Gaussian PSF, just as shown on the screenshot. These FWHM values are quite correct IMO.

It is true that eccentricities are being reported as zero for both frames; I'll investigate this later. As for FWHM, something looks wrong with the measurements being shown here. Can you please upload this entire set of M33 frames?

https://www.dropbox.com/sh/n6rp6090dq7k67k/AAADSR7IZI0fkdAth-ASM9aea?dl=0
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: Juan Conejero on 2019 October 22 08:10:42
Thank you for uploading the images. I have no problem at all to measure them with the current version of the SubframeSelector tool.

If you force measurements of circular PSFs, then eccentricity has to be zero. Eccentricity is defined as:

sqrt( 1 - (sy/sx)2 )

where sy and sx are the standard deviations of the fitted PSF function on the vertical and horizontal axes, respectively, and sx >= sy conventionally. In the circular case we have sx = sy, so eccentricity is equal to sqrt( 0 ) = 0. So this is the expected behavior.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: Juan Conejero on 2019 October 22 08:27:54
See the enabled Circular PSF parameter in your screenshot.
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: dkuchta5 on 2019 October 22 17:12:11
And we have a winner!   Thank you, Juan !!!

I checked in the Script under the Star Detection and Fitting panel and sure enough, the circular PSF was checked. I have no memory of changing that.  In fact I never change anything in that panel.  I wonder if the default got changed in some release?

Anyway, it works now.  Thanks again!

-Dan
Title: Re: Eccentricity = 0 in Subframe Selector
Post by: Juan Conejero on 2019 October 23 03:10:20
Quote
And we have a winner!   Thank you, Juan !!!

Now you owe me a virtual beer! ;)