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

Offline cameronleger

  • PTeam Member
  • Member
  • *
  • Posts: 51
    • Blog
Re: Subframe Selector PCL Module
« Reply #45 on: 2018 February 03 18:04:43 »
Hey Brian,
One of the reasons I wanted to make this as a Module was to gain Module-specific features, such as saving Process Icons and their included settings. I recommend you do that once you have the formula you want. I think I saw in your screenshots that you had tweaked other parameters too; that will of course save all of them as well.

Another thing to note about that: it will also save all loaded subframes and their measurements. I also find that really handy to go back and quickly check weights for other processes where I'd want a really good frame. I have a couple of these icons saved for different camera setups, and I keep one around in the project for the last measurements I took just in case I have to pause and come back later.

Offline paulsartory

  • Newcomer
  • Posts: 25
Re: Subframe Selector PCL Module
« Reply #46 on: 2018 February 14 21:45:35 »
Hi,

I am probably missing something really obvious here...but how do I output only the approved frames to a separate directory......after measuring the sub-frames I change to "output Sub-frames but it outputs all of them included the rejected frames?

Paul

Offline bvalente

  • Member
  • *
  • Posts: 58
Re: Subframe Selector PCL Module
« Reply #47 on: 2018 February 14 22:10:56 »
Hi Paul,

two things come to mind:

1. make sure you have rejected frames, there will be red 'x's on the output graph - this is the obvious one

2. The process window counts all frames, but actually only outputs the approved ones. This threw me too, but i checked the folder and sure enough it was only the approved frames

hth


Brian

Offline paulsartory

  • Newcomer
  • Posts: 25
Re: Subframe Selector PCL Module
« Reply #48 on: 2018 February 14 23:32:29 »
Thanks.....I guess that's the (not so obvious) thing I missed....P

Offline cfosterstars

  • Newcomer
  • Posts: 1
Re: Subframe Selector PCL Module
« Reply #49 on: 2018 August 06 16:21:20 »
For some reason all my graphs disappeared and I cant seem to get them back.

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Re: Subframe Selector PCL Module
« Reply #50 on: 2018 August 08 05:59:00 »
A possible issue with expressions for weighting:  the script allowed exponential expressions [FWHM^2, SNRWeight^(0.5)], but I can't get  those to work in the process.  Is this intentional?  I'd like to use roots in some of my weighting expressions.

Kevin

Offline cameronleger

  • PTeam Member
  • Member
  • *
  • Posts: 51
    • Blog
Re: Subframe Selector PCL Module
« Reply #51 on: 2018 August 08 07:12:26 »
@cfosterstars
Could you explain more or provide screenshots? Has a PixInsight or OS restart solved this issue?

@astrovienna
It is weird that it's accepting it; can you provide the whole expression for me? I tried what you sent like "FWHM^2" or even "2^3" and it shows the red X and didn't calculate the weights.

In any case, what you want is possible with the Math module. JavaScript doesn't have a quick symbol for powers, but the function Math.pow(base, exp) will do it. See this page for more details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Re: Subframe Selector PCL Module
« Reply #52 on: 2018 August 08 08:25:27 »
Thanks for the quick reply.  I'm not at my PI machine now, but I'm almost certain that one of the expressions I tested was simply FWHM^2, and it successfully parsed in the script.  I'm trying to use a generic approach to weighting rather than one tied to a particular data set - something like SNRWeight/(FWHM^0.5) rather than relying on the min and max of SNR and FWHM in a given data set.

From the page you pointed to, it looks like the Java expression I need would be SNRWeight/Math.pow(FWHM, 0.5).  Correct?  Sorry for asking, but me using Java scripts is like a gorilla playing with hand grenades.  :)
 
Kevin

Offline cameronleger

  • PTeam Member
  • Member
  • *
  • Posts: 51
    • Blog
Re: Subframe Selector PCL Module
« Reply #53 on: 2018 August 08 21:41:54 »
Looks like it should work to me!

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Re: Subframe Selector PCL Module
« Reply #54 on: 2018 August 09 04:48:25 »
Yes, that worked.  Thanks for writing the module.  This is a great addition to the tool set.

Kevin

Offline gnewell

  • Newcomer
  • Posts: 15
Re: Subframe Selector PCL Module
« Reply #55 on: 2018 August 20 08:51:39 »
Feature Request:

Add the ability to include FITS header keywords as columns to aid in grading.

should be part of csv export file as well.

See the Fits Keyword script for a (scripted) example.

Thanks for considering!

 

Offline bvalente

  • Member
  • *
  • Posts: 58
Re: Subframe Selector PCL Module
« Reply #56 on: 2018 August 20 09:06:36 »
gnewell

I don't know if this meets your need, but you can already add a FITS header keyword for the weighting when you output your frames. I don't think you can do more than one though


brian

Offline Lightpath

  • Newcomer
  • Posts: 38
Re: Subframe Selector PCL Module
« Reply #57 on: 2018 August 29 20:17:40 »
I'm really enjoying tinkering with this tool!  It's really well done.

My problem at the moment is that I don't have a good solid understanding of what makes a "good" sub.  Does anyone have a resource I could read that would help me come up with my own expression?

Thanks very much-

Mark.

Offline cameronleger

  • PTeam Member
  • Member
  • *
  • Posts: 51
    • Blog
Re: Subframe Selector PCL Module
« Reply #58 on: 2018 September 20 18:19:31 »
https://github.com/cameronleger/PCL/releases/tag/01.04.01.0001

All,
There is a technically significant update available, however I only have a Linux build at-the-moment so I'd appreciate any volunteers on the other builds. It was hard to notice at first since it was already much faster than the PJSR version and clearly benefited from more threads, but I have a larger machine now and it was essentially choking on the higher core counts. Turns out, there's a setting that should've increased performance considerably, but it did the opposite :tongue: If you thought it was fast before... well let's keep going :police:

Mark,
I think this would be very relative and dependent on the context, but that's OK because a lot of the parameters can be used in a relative way! It will come down to your strengths, weaknesses, and preferences. Personally, I use this expression as a start on every batch:

(FWHMSigma / -3) + (EccentricitySigma / -3) + (SNRWeightSigma / 3)

This basically says: combine the relative values of FWHMs, Eccentricities, and SNRWeights, where a lower FWHM and Eccentricity are preferred and a higher SNRWeight is preferred. Those values are scaled by 3 sigma units (the negative sign is what's making it prefer lower numbers) as nearly all of my frames are within that range. For example, if a subframe's FWHM is 3 sigmas lower than the median, it will contribute 1, whereas if it were 1 sigma higher it would contribute -0.33. Sometimes it's necessary to add a constant afterwards like 5, so that my smallest weight is above 0. I think otherwise the further processes' weighting calculations are relative so it doesn't matter if your best is 500 or 5, it compares it as a percentage of the best.

Perhaps the original documentation here, https://pixinsight.com/doc/scripts/SubframeSelector/SubframeSelector.html, or my work-in-progress updates, https://github.com/cameronleger/Reference-Documentation/blob/master/tools/SubframeSelector/SubframeSelector.pidoc, will help you start your expressions. If you don't like reading my documentation as it is in that link (and why would you?), you can download that folder and use the 'Development' -> 'Documentation Compiler' Script to view it in PixInsight. Since this is not formally included with PI, it's a little funny to use.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Subframe Selector PCL Module
« Reply #59 on: 2018 September 20 21:42:17 »
i can try to build it for OSX but i think i'm maybe behind a couple of revs on Xcode and don't have the latest PCL installed so it may take me a couple of days.

rob