Author Topic: Subframe Selector PCL Module  (Read 39393 times)

Offline PepeChambo

  • Newcomer
  • Posts: 9
    • Cometografía
Re: Subframe Selector PCL Module
« Reply #120 on: 2019 February 15 09:43:50 »
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.
Pepe Chambó
Cometografia.es

Offline sharpie78

  • Newcomer
  • Posts: 30
Re: Subframe Selector PCL Module
« Reply #121 on: 2019 February 15 13:12:16 »
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....

Offline cameronleger

  • PTeam Member
  • Member
  • *
  • Posts: 51
    • Blog
Re: Subframe Selector PCL Module
« Reply #122 on: 2019 February 16 10:24:25 »
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.

Offline sharpie78

  • Newcomer
  • Posts: 30
Re: Subframe Selector PCL Module
« Reply #123 on: 2019 February 16 15:26:13 »
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 ?


Offline cameronleger

  • PTeam Member
  • Member
  • *
  • Posts: 51
    • Blog
Re: Subframe Selector PCL Module
« Reply #124 on: 2019 February 16 15:56:25 »
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".

Offline sharpie78

  • Newcomer
  • Posts: 30
Re: Subframe Selector PCL Module
« Reply #125 on: 2019 February 18 14:36:07 »
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

Offline dragracingdan

  • Newcomer
  • Posts: 6
Re: Subframe Selector PCL Module
« Reply #126 on: 2019 February 18 16:06:03 »
When I 'Measure' my subs, some of them have a weight of 'inf'

What's going on here?

Thanks,
Dan

Offline CraigNZ

  • PixInsight Enthusiast
  • **
  • Posts: 94
Re: Subframe Selector PCL Module
« Reply #127 on: 2019 February 25 13:12:02 »
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

Offline niccoc1603

  • Newcomer
  • Posts: 42
Re: Subframe Selector PCL Module
« Reply #128 on: 2019 March 23 14:48:44 »
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
« Last Edit: 2019 March 23 23:27:09 by niccoc1603 »

Offline pk825

  • Newcomer
  • Posts: 22
Re: Subframe Selector PCL Module
« Reply #129 on: 2019 June 04 01:51:33 »
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: [Select]
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?

Offline pk825

  • Newcomer
  • Posts: 22
Re: Subframe Selector PCL Module
« Reply #130 on: 2019 June 05 07:40:35 »
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: [Select]
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.

Offline PepeChambo

  • Newcomer
  • Posts: 9
    • Cometografía
Re: Subframe Selector PCL Module
« Reply #131 on: 2019 August 11 07:50:34 »
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.



« Last Edit: 2019 August 11 08:01:00 by PepeChambo »
Pepe Chambó
Cometografia.es

Offline niccoc1603

  • Newcomer
  • Posts: 42
Re: Subframe Selector PCL Module
« Reply #132 on: 2019 September 03 13:53:22 »
I would suggest adding the option to append the calculated Fields as a custom extension for the output file name

Offline BorisE

  • Newcomer
  • Posts: 2
Re: Subframe Selector PCL Module
« Reply #133 on: 2019 October 20 09:07:05 »
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: [Select]
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?