Author Topic: SubframeSelector unable to measure FWHM and Eccentricity  (Read 1230 times)

Offline Nevril

  • Newcomer
  • Posts: 2
SubframeSelector unable to measure FWHM and Eccentricity
« on: 2017 November 20 01:43:35 »
Hi,

I'm having a strange behavior with the SubframeSelector and some images.

The script is unable to measure the FWHM and Eccentricity (both are set to 0).

In the console the following warning appears:
** Warning: No convergence in MRS noise evaluation routine: using k-sigma noise estimate

but I haven't received it during the Calibration process.
The stars seems to be detected although they are way more compared to those found in other frames taken with the exact same equipment (roughly 4X).

I also tried to to compute those metrics using the FWHMEccentricity script directly, and in this case it seems to be working as expected.

I've uploaded one of those frames for you to check. If you require anything else, just ask.

https://drive.google.com/open?id=1RPXdGRY-9QeidqH8Eac_3VsThg3SZWRA

Thank you,
Claudio

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: SubframeSelector unable to measure FWHM and Eccentricity
« Reply #1 on: 2017 November 20 09:13:18 »
Hello Claudio,

Sorry for your trouble. There are two problems:

- The PJSR Image.median() function returns 0. This differs from the value returned by the Statistics process. This appears to be a PJSR bug rather than a script bug. The FWHMEccentricity script does not test for zero median, hence the differing results. (This zero test is required as a legacy workaround.)

- The PJSR Image.noiseMRS() function returns the warning message. This also appears to be a PJSR issue rather than a script bug.

I will let Juan have a look, please see the following test script.

Regards,
Mike

Update: It looks like the PJSR median is an unclipped median, which explains the zero. There are too many zeros in the image for SubframeSelector to work. This may be the reason for the noise warning also. Double check your bias/dark calibration, it may be too much is being subtracted.

Code: [Select]
// Nevril bug report, Nov 20, 2017

function noiseOfImage(image) {
   for (var layer = 4; layer != 1; --layer) {
      var estimate = image.noiseMRS(layer);
      if (estimate[1] >= 0.01 * image.bounds.area) {
         return [estimate[0], estimate[1] / image.bounds.area];
      }
   }
   console.writeln("");
   console.writeln(
      "** Warning: No convergence in MRS noise evaluation routine: ",
      "using k-sigma noise estimate"
   );
   var estimate = image.noiseKSigma();
   return [estimate[0], estimate[1] / image.bounds.area];
}

var imageWindow = ImageWindow.windowById("_001_nevril_ngc2244_20171118_040622_SII_W_600_c_cc");

var median = imageWindow.mainView.image.median();

var noise = noiseOfImage(imageWindow.mainView.image);

console.writeln("median: ", median);

console.writeln("noise: ", noise);

Offline Nevril

  • Newcomer
  • Posts: 2
Re: SubframeSelector unable to measure FWHM and Eccentricity
« Reply #2 on: 2017 November 21 06:08:26 »
Hi,

I've tried increasing the number of dark frames to get a better master dark (from 6 to 12, I know they're not that many, I'll see if I can get a few more tomorrow).
To remove any variable, I've made everything from scratch using the BPP up to the Calibration point with default settings.

I don't get the warning from the SubframeSelector anymore but I still can't get any FWHM and Eccentricity.
Again this is happening only for some frames, not all of them. Equipment unchanged.

If you want me to share some uncalibrated frames and the masters, feel free to ask, no problem.

Thank you,
Claudio

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: SubframeSelector unable to measure FWHM and Eccentricity
« Reply #3 on: 2017 November 21 15:40:17 »
Hi Claudio,

In the Statistics process dialog, check the "Unclipped" option. Then look at the median of the calibrated frame that fails, I see median of zero. Too many zero pixels indicated problems with calibration. Measurements tend to fail with too many zero pixels.

Double check that the median of your uncalibrated frames is positive, and run them in the script. This should give you data.

Also check the medians of your bias master and dark master, they should both be less than the median of the uncalibrated frames.

In general, unclipped median of calibrated frames should be positive (due to the sky background).

Regards,
Mike