Author Topic: Blink Module Series Analysis Report - Incorrect Statistics  (Read 3378 times)

Offline IanL

  • PixInsight Addict
  • ***
  • Posts: 116
    • The Imaging Toolbox
I'm trying to get some statistics on a bunch of images.  The only way I can find to do (some) of what I want in a batch is to use the Series Analysis Report in the Blink module (A proper batch statistics script or process would be even better so I could run all the stats available in the Statistics module across a large set of images and save the results to a file, but I don't think anything like that exists? ImageJ has some batch stats, but not all of the ones I want such as MAD).

Anyway, on running the analysis (on two example images) I get erroneous results as you can see from the screenshots. The stats in the Blink tool don't match those in the Statistics tools, e.g. the "Miniumum" in blink for image two is 0.0146944 whereas it is 0.0146955 in Statistics. In some cases the results are just plain wrong, e.g. MAD in Blink is 0.0000452 for both images one and two, whereas it should be 0.0000442 and 0.0000437 respectively.

This looks to be more than some kind of minor rounding error.  Indeed when I ran Blink across six images in a set, the first five all had MAD of 0.0000452 and the last had a MAD that was different (0.00002xx or so).  Running them individually through the Statistics tool each image has a different MAD (and one that reduces from one image to the next, which is what I was expecting to see as the result of the tests I am doing).

Does anyone know what is going on here?  Also does anyone have a batch statistics script they are willing to share? All I need is something that can accept a list of image files, and dump all the filenames plus (say) all the "Available Statistics" from the Statistics tool in to a CSV file for analysis.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Blink Module Series Analysis Report - Incorrect Statistics
« Reply #1 on: 2014 May 30 10:30:45 »
Subframe Selector (Scripts/Batchprocessing) does some of the things you would like to see, such as computing the median. Does not show Minimum, but can probably be extended to do so.

I  have no real idea if your numerical results are right or wrong. Sometimes statistics seems strange because PI ignores pixels close to zero and 1 (=no signal/saturation). Maybe thats the case here?
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline IanL

  • PixInsight Addict
  • ***
  • Posts: 116
    • The Imaging Toolbox
Re: Blink Module Series Analysis Report - Incorrect Statistics
« Reply #2 on: 2014 May 30 15:43:45 »
The Subframe Selector script does have some extra stats, but again it is a limited subset.  To be honest I find it odd that PI is so statistics oriented but lacks a simple batch statistics function rather than having to dig around in multiple tools that are primarily for other purposes. I appreciate that I could spend a few months learning the details of writing my own PI scripts. I can hack out sufficient JavaScript for my own web-based projects but I'd have to deduce the whole PI model from the limited documentation and existing scripts. I'm not so inclined to do this at the moment.

I don't believe that the inconsistent results from Blink are due to statistical quirks; when you're getting expected results from one tool and unexpected ones from another (i.e. identical figures to seven decimal places for five out of six images), it seems more like a bug in the code rather than a minor statistical anomaly.  MAD has a clear definition, so really there shouldn't be any difference between the two tools in terms of results.  I guess minor difference in other stats might be down to quirks the implementation of the algorithms, and I'd accept that small variance between MAD in different tools might be due to the same, but this just looks wrong to me, i.e. incorrectly referencing (or failing to update) a variable when creating the table of results.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Blink Module Series Analysis Report - Incorrect Statistics
« Reply #3 on: 2014 May 31 01:48:36 »
... I can hack out sufficient JavaScript for my own web-based projects but I'd have to deduce the whole PI model from the limited documentation and existing scripts. I'm not so inclined to do this at the moment.

I don't believe that the inconsistent results from Blink are due to statistical quirks; when you're getting expected results from one tool and unexpected ones from another (i.e. identical figures to seven decimal places for five out of six images), it seems more like a bug in the code rather than a minor statistical anomaly.  MAD has a clear definition, so really there shouldn't be any difference between the two tools in terms of results.  I guess minor difference in other stats might be down to quirks the implementation of the algorithms, and I'd accept that small variance between MAD in different tools might be due to the same, but this just looks wrong to me, i.e. incorrectly referencing (or failing to update) a variable when creating the table of results.
Regarding documentation: I know how you feel.
Regarding new tool: Write a wish list. Christmas is coming sooner than you think-
Regarding bug: Lets see what Juan says.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)