Author Topic: Javescript - Pixel intensity  (Read 4565 times)

Offline Neil

  • Newcomer
  • Posts: 21
Javescript - Pixel intensity
« on: 2015 July 13 09:21:23 »
I'm trying to write my first Pixinsight script using javascript.

The goal is the scan an image an read the pixel intensity and once a threshold is crossed copy them to a new image. I'm not to concerned with the creation of a GUI interface at the moment.

Please don't answer me with star masks etc... As this is just the first step in a number of other logical steps etc...

I just want to know how to get started and where I can find the information that I need. Please also don't point me to the PCL as I may as well just code the thing in C++ instead which I really don't want to do. I'm a lazy programming that has grown accustom to python but sadly that not available. I checked.

I don't want the answer, I.E. a completed script, just pointers to help me get started.

Thanks Neil.

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Re: Javescript - Pixel intensity
« Reply #1 on: 2015 July 13 09:57:38 »
It would seem to me that PixelMath is the tool for this job not javascript.

Offline Neil

  • Newcomer
  • Posts: 21
Re: Javescript - Pixel intensity
« Reply #2 on: 2015 July 13 12:08:25 »
I agree, however, its the next steps that make this a script rather than pixmath. although pixmath is becoming very powerful with the new editor and all.

I just need some sensible pointer to help me get started with scripting.

Looking into other peoples script just feeling like hacking not programming. The other thing that I have noticed with isn't a big shock is that the GUI code these people are writing is nearly 1/2 of the programming. I can't believe that in this day and age people are coding this manually!!!

Anyway, I'm just looking for a way into scripting.

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: Javescript - Pixel intensity
« Reply #3 on: 2015 July 14 22:13:21 »
I'm a lazy programming

Looking into other peoples script just feeling like hacking not programming.

If you want to be lazy then you'll probably have to do some hacking  ;)

IMHO, the quickest way to learn the basics of idiomatic PI scripting is to read some of the provided examples.

Cheers,
Rick.