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.
// 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);