Subframe Selector PCL Module

Cameron, finally I found a solution for me.

Uninstalling process 01.04.04.0029 version integrated on PI, and downloading and installing your 01.04.01.0001 version.
It works fine ;)

Thanks Cameron.
 

Attachments

  • subframeselector_001.png
    subframeselector_001.png
    120.8 KB · Views: 61
I have installed the latest version of PixInsight 01.08.06.1457 and like the new SFS process (Thank-you Cameron) but it is giving me different results to the SFS script that I'm used to using......

I ran the new process and got FWHM results of 7-8. Knowing I had reasonable data that would normally give lower FWHM results, I decided to run the script instead.....FWHM came out around 4-5, which from past experience is typical for good data using my setup. Tbf all the measurements are a little different. I have the System Parameters all set the same in both.

Could someone please help me understand why this is, and if it's just a case of getting used to knowing what numbers represent good data, when using the new SFS process.

I've attached screenshots of both the script and process....if any of my settings look wrong please point me in the right direction  :D :D

.....the graph stopped working but thanks to this thread a reboot of PI sorted it.  :D

Thanks in advance....
 

Attachments

  • SFS process.JPG
    SFS process.JPG
    179.8 KB · Views: 44
  • SFS script.JPG
    SFS script.JPG
    131 KB · Views: 45
Have you used the same or similar numbers under System Parameters? Those directly affect the way you see those numbers. Also, this module uses DynamicPSF to calculate the values, whereas the older script has its own methods for calculations.
 
Thanks for getting back to me. I did use the same values under system parameters so from what you're saying I would assume it's the different method for calculating values that is giving me the differences.

Would you suggest just accepting this and adjusting my approval of subframe values to adjust for this increase ?
eg. 4.5 FHWM was a good sub using the script and the new module measures the same sub a 7.9 FWHM. Maybe set my approval FWHM as 8.5 ?

 
Yes, updating it would be fine if you have tested those values and determined that in your case they are ideal numbers. If you change lenses, focal lengths, or cameras, I think it's better to look into the FWHMSigma, FWHMMedian, etc. values so that you could use the same expression for any case. That'd make the expression relative to the data-set instead of fixed values, though, so it's more like "best of this batch" and not "best ever".
 
Nice one. Thanks again. Whist it wasn't halting my processing, it was making me wonder. I can keep going forward and it looks like I've got some more learning to do......what FWHMsigma and median are. lol
 
In the original SFS, output section, there were two sets of drop down boxes: approved, rejected.  In my case where I process batch streams of 200+ images, most of the images are okay and the two or three bad ones I want moved to a "Rejected" folder.  So I leave the approved action as "None" and the rejected action as "Move".  I then end up with approved images where they were and a new folder "Rejected" containing the bad images.  This makes it a lot easier when coming back to this job later and analyzing what was wrong with the rejected images.  It also means it is easy to move the rejected images back into the main folder to rerun SFS with a different set of parameters.

Can we get this same functionality added to the new PCL SFS?

Craig
 
hi, I am using the module on 1090 subframes.
But when I get to about 800-900 frames analyzed (in the console) the PC crashes
 
cameronleger said:
Thanks Brian,
I can confirm the issue is with the Weighting Expression, not the Approval Expression, although that one can display the X for some reason.

The 'plain' variables such as FWHM and Eccentricity only represent the current subframe being measured. So, Math.min(FWHM) and Math.max(FWHM) will return the same thing as FWHM, and subtracting these values will result in 0. The 'nan' error appears when it's dividing by 0.

The simple fix here is to use the 'special' variables such as FWHMMax and FWHMMin which are calculated before each subframe and represent the global max and min of all subframe FWHMs. Here's that expression modified to work for me:

Code:
35*(1-(FWHM - FWHMMin) / (FWHMMax - FWHMMin)) + 7*(1-(Eccentricity - EccentricityMin) / (EccentricityMax - EccentricityMin)) + 18*((SNRWeight - SNRWeightMin) / (SNRWeightMax - SNRWeightMin)) + 40

That said, I will definitely look into 'nicer' or more obvious messages when 'nan's are involved, and try to make the X's work better in these cases.

Could you help me understand if is it possible to get the min or max of variables such as FWHM , Eccentricity or SNRWeight of the analysed frames?
 
pk825 said:
cameronleger said:
Thanks Brian,
I can confirm the issue is with the Weighting Expression, not the Approval Expression, although that one can display the X for some reason.

The 'plain' variables such as FWHM and Eccentricity only represent the current subframe being measured. So, Math.min(FWHM) and Math.max(FWHM) will return the same thing as FWHM, and subtracting these values will result in 0. The 'nan' error appears when it's dividing by 0.

The simple fix here is to use the 'special' variables such as FWHMMax and FWHMMin which are calculated before each subframe and represent the global max and min of all subframe FWHMs. Here's that expression modified to work for me:

Code:
35*(1-(FWHM - FWHMMin) / (FWHMMax - FWHMMin)) + 7*(1-(Eccentricity - EccentricityMin) / (EccentricityMax - EccentricityMin)) + 18*((SNRWeight - SNRWeightMin) / (SNRWeightMax - SNRWeightMin)) + 40

That said, I will definitely look into 'nicer' or more obvious messages when 'nan's are involved, and try to make the X's work better in these cases.

Could you help me understand if is it possible to get the min or max of variables such as FWHM , Eccentricity or SNRWeight of the analysed frames?

I understand how it works and I have to use variables FWHMmax e FWHMmin.
 
PepeChambo said:
Graphs not works for me in new Subframe Selector.
Some clue why?


By chance I have discovered why can't see the graphs in my PC, and other strange things related with temporaly saved paths in several PI procceses.

And is because problems wtih character codification in path strings.

As example, the browser not show my SubFrameSelector graphs because url generated is
"file:///C:/Users/Jos%FFffffc3%FFffffa9J/AppData/Local/Temp/SFS_graphs_K9D58SCHNGNY.html"

istead of
file:///C:/Users/Jos?J/AppData/Local/Temp/SFS_graphs_K9D58SCHNGNY.html"

This is because my Windows user folder name has a character with accent.

My problem is thay is not easy change it, I should create a new user in Windows and I would not like have do it.



 
I would suggest adding the option to append the calculated Fields as a custom extension for the output file name
 
Dear Cameron,
thank you one more time for remarkable SubframeSelector PCL process, it works great!

But I ran into some difficulties when I've tried to use it in scripting.

As I understand, we should run it with two iterations:
1) Run with routine property set to SubframeSelector.prototype.MeasureSubframes and get  array of results  through measurements property
2) then run with routine property set to SubframeSelector.prototype.OutputSubframes (and set approvalExpression to something like "FWHM < 3")

But no matter which approval expression is set, all frames are always outputted (i.e. rejection doesn't work)

Even if I manually save SubframeSelector process icon and then run it from my code:
Code:
SFSproc = ProcessInstance.fromIcon("test2");
SFSproc.executeGlobal();
it puts to output folder all input files (if that saved process we run manually, it works as expected, copying only approved files).

So maybe I am missing something obvious here?
 
Back
Top