PixInsight Forum (historical)

Software Development => New Scripts and Modules => Topic started by: NKV on 2011 December 02 11:19:57

Title: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2011 December 02 11:19:57
Hi,
The module monitoring selected folder for new images.fit. And if one new image found the module calculate FWHM(gaussian) for all not over-burned stars, show top bright and dim stars data. And calculative average FWHM.
Current version is very simple, but in future I hope to add audible alarm, 3D field curvature and etc interactive services.

How to use: Select folder, press play, drop new image to selected folder ( usually your camera must do it )  and see Console output.
Also you can execute on View.
Note: You can close module interface and if you don't press pause button the module will continue monitoring folder and report to console.

How to install:
The module required OpenGL freeglut 1.8.1 (http://freeglut.sourceforge.net/)
1)
For Windows: Download freeglut package ( for example this one http://files.transmissionzero.co.uk/software/development/GLUT/older/freeglut-MSVC-2.8.1-1.mp.zip) , unpack it and put only \freeglut\bin\x64\freeglut.dll to PixInsight\bin folded. Note in the package there are 32 or 64 version.
For Linux: apt-get install freeglut3-dev
2) unpack StarMonitor module to PixInsight\bin folded.
3) Run PixInsight > Menu > Process > Modules > Install Modules

How to build from sources code:
1) Extract from freeglut sources "include/GL" to "PCl/include/GL"
2)build cminpack-pxi from PCL sources.
3)Makefile Generator scripts:
Windows:
extraDefinitions: CMINPACK_NO_DLL
extraLibraries: cminpack-pxi freeglut
So, in your PCLLIBDIR64 should be present file cminpack-pxi.lib and freeglut.lib
Linux:
extraLibraries: cminpack-pxi glut GLU GL

Bin for PI1.8.1083:
Linux64 (http://endor.uv.es/files/data/public/676989.php)
Win32 (http://endor.uv.es/files/data/public/9d0d26.php)
Win64 (http://endor.uv.es/files/data/public/22103f.php)

Bin for PI1.8.4.1195:
Linux64 (http://endor.uv.es/files/data/public/e6e36a.php)
Win64 (http://endor.uv.es/files/data/public/069a27.php)

Best regards,
Nikolay.

v1.0.1.0001
v1.0.2 Add File buttons, Alert command and settings.
v1.0.3 Add 3D View via OpenGL
v1.0.4 Add log and stdInput for alert command executing. build for PI1.8.1083 Linux/Win
v1.0.5 build for PI1.8.4.1195
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2011 December 02 11:21:05
.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: pfile on 2011 December 02 16:15:22
i can build this for osx if you want.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: astrospotter on 2012 January 18 23:30:07
Hello and thanks for the lead pointing to your tool that you posted as a reply to my thoughts on DynamixPSF.

Use of PixInsight as a dynamic image analysis of value in the field would be a great enhancement to the platform.
I don't even consider use of PixInsight in the field as I capture with MaximDL but this tool may just change my view on where PixInsight is of value and expand it to the field.

I am going to spout random thoughts that come to mind and consider the things below only as blue-sky ideas to assist you in your thoughts on what  you would like to do with the tool.   I think what you have already said is very exciting and would be wonderful.

Now for the 'blue sky' thoughts ...

For real field use a large quantity of raw numbers in a table is very nice for quick focus check but can be a bit  complex for weary eyed imagers who may also wish to know WHERE each line comes from so I hope your comment about thoughts on generation of a 3D picture are something you are seriously considering.  That would bring high value to use in field and at home in rating subframes prior to usage. 

Perhaps a checkbox to then show values grouping the values much like the script Aberration Spotter does may help.  This would be one more column perhaps that has a value of a 1-2 char code like   C=Center,  UC = upper center, UR=upper right, LR=lower right, LC = lower center, LL=lower left and UL=upper left.    This is really analogous to AberrationSpotter and in fact if an 'aberrationSpotter' could be run on the just generated file THEN run your tool (on the un-stretched data of course) that would be awesome.

Not sure how to present the data of  elongated FWHMx x FWHMy  along with theta in a picture but here are some blue sky thoughts.

Not sure if the platform supports this but ...   Click on a spot on your 3D curve and  several numbers like FWHMx,FWHMy and Theta show up much like the pixinsight window that comes up for zoom of an image. 

Here is a real 'wild' concept but this is after all a blue-sky thought process so application of the concepts we see in wind charts are perhaps appropriate?   A totally round symetric FWHM might be a circle with larger circles being worse FWHMx (normalized to the best and lowest FWHM as a small dot).  Then the concept of non-symetric FWHM would be shown as line segments, again fatter and thinner based on how 'wide' the elongated star is.

This is all wild stuff and a bear to code so consider all of this as wild thoughts that may be over the top but may get your thought process going in some way.

Whatever comes of it INCLUDING what you have already done I thank you for sharing this very cool idea and field tool

Mark
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: RBA on 2012 January 19 02:50:38
This module might be useful to more people if first it was implemented to work on a selectable file - ie. a file you can select by "opening" it. Then, with that functionality already there, add the "folder monitoring" functionality, either as a separate module or as an add-on.

Come to think of it, a module that does the folder monitoring and once a new file is detected, being able to execute a second module (selectable ahead of time) on the detected image file might be even better.

Just sharing a couple of ideas...
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: mmirot on 2012 January 19 06:23:17
It would be nice to have a few of these functions in the blink script/module.
It could help choose a reference frame and eliminate bad guiding etc.

Max
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Jack Harvey on 2012 January 19 06:28:34
Not sure how many but a few of us do use osx and a osx ver would be great.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: pfile on 2012 January 20 09:50:14
well, i'd need the source and i don't think Nikolay has released it..
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2012 January 22 03:38:21
Hello and thanks for your ideas. I will try to realize in near future.

About source code, sorry... i can't publish it, because Juan will kill me( I stole some codes from him ).

Best regards,
Nikolay.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: pfile on 2012 January 22 13:35:19
no problem, proprietary is proprietary.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2012 January 30 02:44:19
v 1.0.2
Add many features. See post #1

Best regards,
Nikolay.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2012 March 29 12:31:02
I got new skill. Now I can use OpenGL inside PixInsight. 8)
See screen in attachment. It's one frame from animated 3D window. The window generated in PixInsight via Delaunay triangulation and dynamically shown via OpenGL how it look from different camera positions.

If you want to see how OpenGL and PixInsight work together:
There are binaries for PI Win32 in attachment . Including FreeGlut.dll
Put it in PixInsight "bin" folder and install the module.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: RBA on 2012 March 29 12:42:32
Could you produce a Win64 module?
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2012 March 30 10:28:12
Could you produce a Win64 module?
Of course I can, but you can install PI32 on Win 64 and try it.

Anyway, I implement it into StarMonitor. Look at screen. Please wait some time while i polish new version.

Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2012 April 01 10:32:58
v1.0.3 Win32/64 released. Binaries in first post.
+ 3D View. Module draw curvature according FWHM data for all detected stars in the image.

How to install:
The module required OpenGL freeglut (http://freeglut.sourceforge.net/)
1) Download freeglut package ( for example this one http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MSVC.zip) , unpack it and put only freeglut.dll to PixInsight/Bin folded. Note in the package there are 32 or 64 version.
2) unpack StarMonitor module to PixInsight/Bin folded.
3) Run PixInsight > Menu > Process > Modules > Install Modules

How to use:
1) Try Demo mode: Push Start( Green cube in 3D show section ). It's demonstrate real time 3D Voronoi and Delaunay triangulation. :D
2) Ok, now close 3D view window and add normal astronomical file. Wait until PSF processing finished, select the file( one click on file name), and push Green cube. If your image have field curvature or field rotation, you should see problematic zones in red color.

Any questions? Any idea? Welcome!

Best regards,
Nikolay.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: gvanhau on 2012 May 16 18:50:39
Hello

I wanted to try this module, but can not install it in PixInsight.
Run PixInsight > Menu > Process > Modules > Install Modules  does not show it.

My OS is Win 7 - 64 bit
PI is 1.7.06.0793

Regards
Geert
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2012 May 17 00:01:49
I wanted to try this module, but can not install it in PixInsight.
Did you read previous post?
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: gvanhau on 2012 May 17 07:01:40
I wanted to try this module, but can not install it in PixInsight.
Did you read previous post?
Yes I did.
I instaled the freeglut DLL an the 64bit version form the #1 post in the Pi/bin directory...

Am I missing something else?

Regards
Geert
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2012 May 17 08:12:31
I instaled the freeglut DLL an the 64bit version form the #1 post in the Pi/bin directory...
You are sure about the #1 post? No freeglut.dll in the #1 post.

One again: How to install:

1) Close PixInsight
2) Download freeglut package ( for example from this page http://www.transmissionzero.co.uk/software/freeglut-devel  Click on Download freeglut 2.8.0-1 for MSVC ) , unpack it and put only freeglut.dll to PixInsight/Bin folded. Note in the package there are 32 or 64 version.
3) Download StarMonitor module from #1 post, unpack it and put StarMonitor-pxm.dll to PixInsight/Bin folded.
4) Run PixInsight > Menu > Process > Modules > Install Modules
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: gvanhau on 2012 May 17 08:48:24
Hello Nikolay

I followed exactly these steps.
The only thing I'm now not 100% shure is that I picked the 64 bit version of freeglut.dll from the zip file.
I will check this out this evening, when I return from work.

Thanks for you fast responce.

Regards
Geert
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: gvanhau on 2012 May 18 23:10:14
Confirmed, using 64 bit FreeGlut.dll works ok

Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2012 May 20 18:51:53
Good!
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: jeffweiss9 on 2012 May 31 22:33:23
Nikolay-
 I followed your instructions in #18, making sure I got the 64bit freeglut.dll, putting it with StarMonitor-pxm.dll (from StarMonitor-pxm_Win64_1.0.3.001.rar) in Program Files / PixInsight / bin.   Yet, when I run Install Modules from PI 1.7, it doesn't see any modules to install.  What am I doing wrong?
Thanks,
R/Jeff
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: georg.viehoever on 2013 December 15 09:28:24
Has this module ever found its way into the official distribution?
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Herbert_W on 2013 December 15 10:05:30
+++1 - it should be in the  official  distribution!!
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: pfile on 2013 December 15 10:10:42
yeah i mean especially since we can't build it for ourselves for non-windows platforms...

rob
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Juan Conejero on 2013 December 15 11:57:43
Hi,

This is an extremely interesting and nice project, but I cannot include a module in the official distribution if it isn't portable to all supported platforms.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: troypiggo on 2013 December 16 01:06:33
Nikolay-
 I followed your instructions in #18, making sure I got the 64bit freeglut.dll, putting it with StarMonitor-pxm.dll (from StarMonitor-pxm_Win64_1.0.3.001.rar) in Program Files / PixInsight / bin.   Yet, when I run Install Modules from PI 1.7, it doesn't see any modules to install.  What am I doing wrong?
Thanks,
R/Jeff

Same problem here.  PixInsight Core 01.08.00.1023 RC7 Ripley (x64).
In Windows Explorer I can see the files in the C:\Prog Files\PI\bin folder, but in PI->Process->Modules->Install Modules and do a search, they aren't detected.  I installed the 64 bit of freeglut.  Admittedly I used the 1.0.2 version of StarMonitor as the endor server link for 1.0.3 isn't working for me.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: troypiggo on 2013 December 17 01:59:12
Nikolay-
 I followed your instructions in #18, making sure I got the 64bit freeglut.dll, putting it with StarMonitor-pxm.dll (from StarMonitor-pxm_Win64_1.0.3.001.rar) in Program Files / PixInsight / bin.   Yet, when I run Install Modules from PI 1.7, it doesn't see any modules to install.  What am I doing wrong?
Thanks,
R/Jeff

Same problem here.  PixInsight Core 01.08.00.1023 RC7 Ripley (x64).
In Windows Explorer I can see the files in the C:\Prog Files\PI\bin folder, but in PI->Process->Modules->Install Modules and do a search, they aren't detected.  I installed the 64 bit of freeglut.  Admittedly I used the 1.0.2 version of StarMonitor as the endor server link for 1.0.3 isn't working for me.

FYI just updated to the shiny new PI 1.08.00.1071 and same issue.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Andres.Pozo on 2013 December 17 02:18:19
FYI just updated to the shiny new PI 1.08.00.1071 and same issue.
I think the problem is that you are trying to use a module compiled for a version of 2012 of PixInsight. The modules have to be recompiled for each version of PixInsight and for all the platforms.

This is perhaps the main reason that I write scripts instead of modules. Keeping current a module requires a lot of effort and IMHO only Juan can do it.
There are several interesting modules like this (SuperBias, Interchannel curves) that can not be used by most users of PI.
On the other hand, the scripts are intrinsically multiplatform and they rarely require modifications for new versions of PI.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Juan Conejero on 2013 December 17 02:36:08
Quote
The modules have to be recompiled for each version of PixInsight and for all the platforms.

That will change when we have an integrated C++ compiler in PixInsight. Open-source modules will be distributable as source; the PixInsight Core application will compile and link them automatically on the end user's machine. Hopefully this will be implemented in the second half of 2014.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Herbert_W on 2013 December 17 04:51:06
Hi,

exists an actual link for the script (win64)?
Link in message #1 doesnt work.


Thank you and best regards.
Herbert, Austria
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2014 January 29 22:16:05
v1.0.4 Add log and stdInput for alert command executing. build for PI1.8.1083 Linux/Win
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Herbert_W on 2014 January 30 06:13:13
Hi  Nikolay!

Great!!

Sorry, but the first question:

I cant install the module.
Process > Modules > Install Modules ...
Go to the folder and it comes following message:

0 additional PixInsight module(s) were found on directory:
C:\Program Files\PixInsight\bin
(Recursive search)


But  'StarMonitor-pxm.dll' is in the folder.
I startet PI (latest version) as administrator - same result:  not found.

OS: win7 64bit

What I'm doing wrong?

Thank you and best regards.

Herbert, Austria
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2014 January 30 21:09:42
I cant install the module.
See solution at page 1 of the topic.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Herbert_W on 2014 January 31 00:05:32
Hi  Nikolay!

Ok - now it works (freeglut!!)

Thank you and best regards.

Herbert, Austria
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2016 January 18 06:20:14
v1.0.5 build for PI1.8.4.1195
see post #1
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Juan Conejero on 2016 February 03 00:56:30
Hi Nikolay,

Can we have this module released officially? Can we build it on all supported platforms? I assume the only problem for this may be any Windows dependencies (your OpenGL code?).
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: avastro on 2016 February 03 01:31:44
Hi Nikolay,
Installed v1.05 in PI 1.84.1195 Win 10 x64, module works fine, very useful.
Thank you
Antoine
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: NKV on 2016 February 03 06:12:40
Hi Nikolay,

Can we have this module released officially? Can we build it on all supported platforms? I assume the only problem for this may be any Windows dependencies (your OpenGL code?).
I tested it on Win and Linux olny...
any way, github pull request sent.
Title: Re: PCL: ImageInspection > StarMonitor module
Post by: Herbert_W on 2017 August 03 22:57:49
Hi Nicolay,

StarMonitor isn't working with the last update 1.8.5.

(http://www.skypixels.at/downloads/PI_Forum/Fehlermeldung_StarMonitor_img1.JPG)

The modules have to be recompiled - is this still nesseccary?

Thank you and best regards!
Herbert, Austria