Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - robyx

Pages: [1] 2
I see, thanks a lot for the information, my intention was indeed to help the reconciliation between the two.


General / Re: Adding additional frames to an integrated image
« on: 2019 November 05 07:03:06 »
I have an integrated OIII image of 31 subframes.  I no longer have the sub frames.  I have recently taken another 40 OIII frames.  what is the best way to integrate these new frames with the original integrated image?


This is how I would do it: given the two masters M1 (the one with 31 subframes) and M2 (with 40 subfames) the most simple way is to weight the sum of the two taking into account the number of integrated frames I = (M1*31 + M2*40) / 71. This is something close (but not equal) to summing up the whole set of frames. The main difference I guess is on the rejection algorithm which performs differently between processing a population of 71 frames with respect subgrouping the frames into two sub sets of 31 and 40.

Despite this simple method I would personally prefer to take this formula: SNR( alpha * M1 + (1-alpha)*M2 ). By sampling  alpha between [0, 1] you can interpolate the SNR(alpha) function to find the minimum value of the SNR which is at least a sub-optimal value that you can get from this combination.

I hope this helps,

General / Misalignment between SubframeSelector script and process
« on: 2019 November 05 00:22:09 »
Hi all,

yesterday on a FB discussion it has been noticed that the weighting and acceptance formulas adopt different naming conventions on min/max measurement values (like FWHM minimum or maximum) between the SubframeSelector process and SubframeSelector script.

In the process you have to use FWHMMin, FWHMMax, EccentricityMin, EccentricityMax etc... while in the script you have to use FWHMMinimum, FWHMMaximum, EccentricityMinimum, EccentricityMaximum etc...

Being called with the same name I would expect them to adopt the same conventions and to digest the same formulas, which actually is not the case.

Attached you can find the two tooltips reporting the different naming convention.

Best regards,

PCL and PJSR Development / Re: Fast Fits/Xisf header reader
« on: 2019 November 02 07:24:37 »
Hi Juan, thanks for this script.

In BatchPreprocessing-helper.js there is a similar one (code is different but logic looks the same) I guess I can rely on it's well.


PCL and PJSR Development / Fast Fits/Xisf header reader
« on: 2019 November 01 18:56:27 »

is there a way with PJSR to quickly read fits header table only without loading the entire image data from a fit/xisf?
by quick I mean milliseconds (10-20 max)...


PCL and PJSR Development / Commercial script / Process
« on: 2019 November 01 18:05:40 »

does the PI licensing model allow to develop and sell JS script / Processes?


PCL and PJSR Development / PSJR Javascript formatting
« on: 2019 October 15 10:34:09 »

are the official javascript files linted? like using ESlint or other linting cli? If yes is it possible to know what you use and have the rules config file in order to maintain a consistent syntax?


PCL and PJSR Development / Disable console output of processes
« on: 2019 October 13 09:21:13 »
Hi all,

is it possible to disable the console output of a process when it is launched programmatically by a JS script? I would log only my logs but the console is flooded by the processes logs launched by my script.


PCL and PJSR Development / PJSR Parallel execution
« on: 2019 October 12 15:32:23 »
Hi all again :)

Is there the possibility to create a parallel for or a pull of threads to execute parallel operations? In my specific case I need to compute the gradient of a multivariable function which is done by computing the discrete partial difference of the cost function on each variable. This would be the perfect case to execute each computation in parallel.

Thanks in advance,

PCL and PJSR Development / Re: Run process icons programmatically
« on: 2019 October 10 15:14:53 »
Hi Juan,

thanks for your exhaustive answer, this really helps.

I've got your point about not blocking the platform's event queue, it's a common fact to be taken into account in other platforms too but I'm curious about the specific PI details on how event queue management works and maybe on multithreading (if any relevant detail worths to be explained), since I cannot find anything detailed about it.

Moreover, I guess there is nor documentation neither books specifically addressing the development with PI, correct? The pain point for me at the very beginning was to understand the basic "principles" about the main script and Dialog lifecycle, how the Parameters class works, difference between being executed in global context or on a target view etc...

It would be really worth to have a place that describes at least these fundamentals.


Hi Robyx,

1. list the set of process icons existing in the workspace

The following static function:

Array ProcessInstance.icons()

returns an array with the identifiers of all existing process icons.

2. read/update the parameters stored inside

ProcessInstance ProcessInstance.fromIcon( String iconId )

This function returns a copy of the instance being transported by a process icon with the specified identifier. Once you get the instance, you can modify it by changing its properties, just as any JavaScript object. For example:

let P = ProcessInstance.fromIcon( "Process01" );
if ( P.processId() == "ImageIntegration" )
   P.sigmaHigh = 4.2;

3. open the process dialog (like what happens by double-clicking on the icon)

void ProcessInstance.launch()

Continuing with the previous example:

let P = ProcessInstance.fromIcon( "Process01" );
if ( P.processId() == "ImageIntegration" )

A word of caution here: This should only be done from a script that does not block the platform's event queue. This is a complex topic that I can describe in depth if necessary, but let's keep things simple for now.

4. run one instance of the selected process setting the input and output images

For example, let's suppose that we have a 'Process01' icon transporting an instance of CurvesTransformation (just to put an example of a process that can be executed on views). You can execute it on the current view very easily:

ProcessInstance.fromIcon( "Process01" ).executeOn( ImageWindow.activeWindow.currentView );

I hope this helps as a starting point. Let me know if you need more information.

PCL and PJSR Development / Run process icons programmatically
« on: 2019 October 08 14:34:02 »
Hi all,

I'm wondering if PSJR allows to do the following operations programmatically:

1. list the set of process icons existing in the workspace
2. read/update the parameters stored inside
3. open the process dialog (like what happens by double-clicking on the icon)
4. run one instance of the selected process setting the input and output images

Shortly, I would script the operation of dragging a process icon on an image (or just running it if input images are more than one) and control on which target image should be the output programmatically.

Does anyone have an idea if and eventually how to do it?


General / PixelMath shared variables across instances
« on: 2019 August 22 14:31:21 »
Hi all,

I'm dealing with this problem: I have this formula


where $T is the target image and A is another image in the workspace. Actually I could refer to A using his ID but this means that I need to edit the formula anytime the ID changes so I would do something smarter to avoid this.

I would brake down the computation into two PixelMath instances X and Y such that X can be dragged on image A and it produces as output mean(A) and then Y can be dragged on any target image to compute mean(A)/$T. In this way I wouldn't need to edit the formula anymore, I would just need to drag the instance X on image A and instance Y on my target.

Let's say that the first PixelMath would look like

Code: [Select]
Calib_A_Mean = mean(A)
and the second one

Code: [Select]
being Calib_A_Mean a global shared variable initialized by X and read by Y.

My issue is that I cannot find a way to declare a symbol with this properties.
Is that feasible?
if not is there any plan to implement this kind of global scope for variables in PixelMath? in my opinion it would really open new possibilities.

Kind regards,

PCL and PJSR Development / Re: Drizzle Integration documentation
« on: 2019 August 10 12:13:15 »
Great! Thanks a lot

PCL and PJSR Development / Drizzle Integration documentation
« on: 2019 August 10 12:04:04 »
Hi all,

I would access to the Drizzle Integration PJSR class but I cannot find any documentation in the web doc at

I suppose this class is exposed, correct? Anyone has a reference?


Hi Roberto,

I have a doubt about applying this formula BEFORE the registration or AFTER the registration

Image registration necessarily interpolates pixel data to perform the image alignment task. Since interpolation acts basically as a low-pass filter, if you measure registered images — not just with the above formula; this applies to any image analysis task — you won't be evaluating the original calibrated data, but a smoothed version of them. In addition, interpolation does not work equally for all of the registered frames (for example, registration reference frames are not interpolated), and will generate different aliasing artifacts depending on specific geometric transformations (for example, aliasing can be worse for small rotation angles). For all of these reasons, registered data should never be used, in general, to perform comparative analyses, such as quality and noise evaluation. So the brief answer to your question is, in general terms, "before".

Hi Juan,

Thanks for this clarification. Here my doubt becomes even higher.

Let's assume that I'm mixing two frames A and B, being A the reference. You're saying that transformation applied to B generates B* for which the evaluation of FWHM, eccentricity and SNR, could significantly change for a set of circumstances.

Said that, since I'm going to integrate the signal in B* including the artifacts, why should I really care about B?
Calibration, Cosmetic Correction, Debayer and Registration are just preparatory steps that generates the family of images to be integrated, in each step each destination image is different from its source. I don't see anything special in registration.

Should I really weight more B* just because B was better? Intuitively I would say no, I would take into account its degradation and weight B* less exactly because of its artifacts.

That's where my confusion comes from.

Pages: [1] 2