An Introduction To PixInsight Scripting: the recording of the webinar


PTeam Member
Nov 2, 2016
La Palma, Canary Islands
Hi all,

I am surprised that up to now there is no reaction to the publication of the video of the webinar "An Introduction to PixInsight Scripting with PJSR" by Roberto Sartori (except the one from John Murphy, ). For me this video is an invaluable source of information. So I want to give a short review of the contents of the webinar here.

Special attention was paid to the concept of execution context (direct, global and target view context). It was made clear that a programmer has to give thought to how these different cases are handled in his script. This is important in order to be able to execute the script directly, to create an instance of the script and to execute the script on a target view.

An exemplary script (LchSaturation) was developed in the webinar step by step. Using the example of the CurvesTransformation, it was demonstrated how to use PixInsight's processes (i.e. execute external scriptable objects) in a script.

The Object Explorer, a valuable source of information for programming scripts, was extensively used to become acquainted with the available objects and their definition.

The graphical user interface was elucidated. For the script project covered in the webinar, structure tree and layout tree were shown and the realization of the GUI with the available objects in PixInsight was demonstrated. The usage of Event Handlers which play an important part in the realization of a user interface was explained.

Sometimes typos led to an error message, but this was helpful as well: it was shown how to interpret the message and correct the error. Tracking the execution of a script was realized by temporarily incorporating output of variables to the console. The audience was allowed to put interposed questions.

Throughout the development of the code, important concepts that are specific to the Javascript language were covered, e.g. inheritance, prototypes, the "this" keyword, defining functions as Arrow function expression, etc. I didn't understand all of these Javascript-specific concepts before because I am not sufficiently familiar with this language, but now I am able to specifically look up the details and I get an understanding under which conditions it is necessary to apply them. For me, the webinar is also a reason to again take an effort to learn the Javascript language in detail.

For the case of missing object definitions, the #include directive was covered which allows to import Javascript header files (JSH files) that contain PJSR definitions.

It was shown how to install a script in the PixInsight menu. Guidelines for programming scripts were given. Resources for programming scripts were compiled.

The webinar for the very first time gave me a coherent introduction to programming scripts in PixInsight. That is far more than what I (not being a programmer) could ever get from reading open source scripts. By studying script sources I mostly didn't understand why the code was programmed in that specific way, and often I didn't understand at all how it worked. I guess this has changed fundamentally after having listened to Roberto's lecture, because I now have a better understanding of the connections.

I want to say a big thank-you to Roberto Sartori for this valuable contribution that hopefully will encourage more PixInsight users to try programming a script. I would be pleased as well if it effected more frequent discussions in the forum category "PCL and PJSR Development".



New member
Jan 7, 2021
Hello Edoardo, thank you for sharing this webinar.
Roberto it was a pleasure to watch this video which contain an invaluable source of information.
  • Like
Reactions: astroedo


Jun 15, 2021
This is such a valuable resource for those of us in the foothills of understanding Pixinsight scripting - thank you.
  • Like
Reactions: astroedo