Author Topic: StarStatistics class and ReadPSF process module  (Read 32913 times)

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: StarStatistics class and ReadPSF process module
« Reply #15 on: 2010 May 06 07:17:12 »
And, Bud,

A quick Google took me to

http://www.microsoft.com/express/windows/

From which, I think, I would then be going to

http://www.microsoft.com/express/Downloads/#2010-Visual-CPP

and would be choosing to download Visual C++ 2010 Express, in English, as a free download.

That's what I'll be trying tonight, in any case, unless someone else knows otherwise, or tries it and tells me that I am wasting my time ;D

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: StarStatistics class and ReadPSF process module
« Reply #16 on: 2010 May 06 07:18:59 »
Bud: No, it won't work with it. I tried Visual C++ 2010 and the projects were not compatible. I think that a full Visual Studio 2008 will work, but have not tried (I think I can get a registered copy through the university).
Try this link: http://download.microsoft.com/download/7/3/2/73243975-91CC-4EE4-9365-2C705A410DF3/vcsetup.exe

Niall: Ubuntu is one of the more "user friendly" Linux distros. Their motto is "linux for humans" :D Somebody get used to windows should use it without any problems. Fedora is quite similar too, but I would say that Ubuntu is simpler.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline budguinn

  • PixInsight Addict
  • ***
  • Posts: 106
Re: StarStatistics class and ReadPSF process module
« Reply #18 on: 2010 May 06 07:30:11 »
Also here: http://www.microsoft.com/express/Downloads/#2008-Visual-CPP

Thanks Carlos, that is where I went....I didn't see the 2008 tab at the top of the page.

bud



Offline Mike Reid

  • Newcomer
  • Posts: 47
    • Mike's Astro
Re: StarStatistics class and ReadPSF process module
« Reply #19 on: 2010 May 06 07:59:16 »
Hi Guys,

This is a good thread.  I look forward to trying this out later this evening.  Unlike my retired chum I actually have to work for a living so unless Bud if golfing this afternoon he will have probably gotten this all worked out by the time I get around to it!

I must say as a newbie to PixInsight I am thrilled by the open platform aspects of this software.

Now I have to return to addressing 2 news bugs that have been filed against me just this morning by my paying customers.  :(

Mike

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: StarStatistics class and ReadPSF process module
« Reply #20 on: 2010 May 06 12:42:37 »
Hi everyone

I've been thinking on ways to improve the results. I guess that changing the magnitude of the errors, giving a more relative weight to pixels with higher value might be a solution. I uploaded a new StarStatistics.cpp file that incorporates that change.
Also, I can't remember if the ReadPSF process allowed to change the threshold parameter. If not, this should be another improvement in accuracy (values larger than 0, but low enough to include several "good pixels").


See the first post for the file.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Mike Reid

  • Newcomer
  • Posts: 47
    • Mike's Astro
Re: StarStatistics class and ReadPSF process module
« Reply #21 on: 2010 May 06 18:32:26 »
A little more info for first time module compilers...

I managed to track down the installation files for Visual C++ 2008 Express with google but there is another wrinkle.  I am currently running PixInsight 64-bit on my Windows 7 machine as it has the fastest CPU and most RAM.  I assume that to one must compile modules for 64-bit target to use them with the 64-bit version of PixInsight.  But Visual C++ Express edition does not support 64 bit compilation target.  You have to buy the full Monty from Micro$oft for that privilege.   There is a hack that is described here,
http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/

I probably won't try this as I own the full version of Visual Studio 2005 which I used to develop my Roll-off roof ASCOM driver a couple of years ago.  I just need to install it on my new machine.

Mike

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: StarStatistics class and ReadPSF process module
« Reply #22 on: 2010 May 06 19:00:51 »
I was afraid of that... tried installing several expansion packages to give 64bits support but neither worked. I always have linking errors at the end. I think this answers things...
Well, I'll try to install the full version, using a licence I got from the university's contract with micro$oft, and then upload the libraries for W32 and W64 (sorry, but had not entirely solved my problems with eclipse in linux... it hates me).

Back to the main topic, I'm working on a full redesign of the fitting algorithm, using the maximum likehood method (instead of the log least squares method). It seems to get superior results in terms of accuracy. Also the code may be breaked down and simplified a bit. Need to study it more to implement the code :)
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: StarStatistics class and ReadPSF process module
« Reply #23 on: 2010 May 06 23:43:47 »
Well,

From what appears to have been said, dedicating my entire evening, last night, to the download of MS Visual Studio Express 2008 and 2010 would now seem to have been a total waste of time >:(

Having paid 'over the odds' for a full-blown version of Vista64, it does seem rather pointless having to work in a 32-bit environment in order to be able to compile PCL. So, it looks like I will not be wasting any further time on this.

And then Microsnot wonder why there is such a high level of 'black-marketeering' and hacking that takes place with their products (on a matter of principle, I considered ALL Microsoft products as 'Beta' code up until the release of XP)

Well - I suppose I will get to see my sweetheart :-* more often, if I am not hard-wired to the keyboard!

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: StarStatistics class and ReadPSF process module
« Reply #24 on: 2010 May 12 21:58:16 »
Hi everybody

There is a new upload of the StarStatistics class and the ReadPSF process.

I rewrote the whole class, changing the algorithm. Now it yields much better results. Very consistent, specially the centroid coordinates. I think that the standard deviation needs a little more work, since still depends a lot of the selected parameters (threshold and radius). Anyway, it is an improvement over the previous version.

I'll upload a compiled version for Win64 tomorrow. Just have to upload the files to the ftp server, but it is too late now. :P Also I'll upload a sample image, with artificial stars and their parameters.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: StarStatistics class and ReadPSF process module
« Reply #25 on: 2010 May 12 22:06:53 »
Well, the compiled module is up... I need more time for the sample image (create the list, etc.) so this one indeed will be tomorrow :D
http://pteam.pixinsight.com/pcldev/starstatistics/ReadPSF-pxm-20100512_w64.zip
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: StarStatistics class and ReadPSF process module
« Reply #26 on: 2010 May 12 23:02:54 »
Hi,
I was able to install it and run it.

I just wonder what the x and y coordinate are?  Do I have to find a star manually and enter its coorrdinate? This seems to give some results. typically:

*** PSF results ***

Sigma...........: 3.48417
FWHM............: 8.2046
Total Flux......: -1.#IND
Peak Intensity..: -1.#IND
Center..........: 1500 , 1168
Sky Level.......: -1.#IND
*** Distribution data ***

Sigma X.........: 3.48417
Sigma Y.........: 3.48417
Correlation.....: 0
0.0270 s

-- bitli

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: StarStatistics class and ReadPSF process module
« Reply #27 on: 2010 May 13 00:00:40 »
Hi Carlos,

Same here - a painless dowload and install, and I didn't need to do anything that wasn't 'intuitive', and I didn't have to read up on the instructions of 'how to' ::)

I ran the process three or four times, tweaking the <Radius> as I went, and then finally un-ticking the <Simmetry> box (Sorry, it is actually Symmetry, if you want to correct the spelling !!)

This is the console output
Code: [Select]
ReadPSF: Processing view: r_dkflcal_16_bit_M82_IIP_Lu_600s_1_0C_0004
Writing swap files...
13.17 MB/s

*** PSF results ***

Sigma...........: 3.28131
FWHM............: 7.72689
Total Flux......: -1619.59
Peak Intensity..: -23.9404
Center..........: 419.029 , 434.927
Sky Level.......: 0.30461
*** Distribution data ***

Sigma X.........: 3.28131
Sigma Y.........: 3.28131
Correlation.....: 0
0.0460 s

ReadPSF: Processing view: r_dkflcal_16_bit_M82_IIP_Lu_600s_1_0C_0004
Writing swap files...
21.10 MB/s

*** PSF results ***

Sigma...........: 10.4815
FWHM............: 24.6821
Total Flux......: 1.434
Peak Intensity..: 0.00207741
Center..........: 419.006 , 434.985
Sky Level.......: 0.261422
*** Distribution data ***

Sigma X.........: 10.4815
Sigma Y.........: 10.4815
Correlation.....: 0
0.0470 s

ReadPSF: Processing view: r_dkflcal_16_bit_M82_IIP_Lu_600s_1_0C_0004
Writing swap files...
26.56 MB/s

*** PSF results ***

Sigma...........: 6.90163
FWHM............: 16.2521
Total Flux......: -5.34982
Peak Intensity..: -0.0178754
Center..........: 419.007 , 434.982
Sky Level.......: 0.270227
*** Distribution data ***

Sigma X.........: 6.90163
Sigma Y.........: 6.90163
Correlation.....: 0
0.0460 s

ReadPSF: Processing view: r_dkflcal_16_bit_M82_IIP_Lu_600s_1_0C_0004
Writing swap files...
7.55 MB/s

*** PSF results ***

Sigma...........: 4.55957
Sigma min axis..: 4.5181
FWHM............: 10.737
FWHM min axis...: 10.6393
Rotation Angle..: -0.801138
Total Flux......: -9.06128
Peak Intensity..: -0.0700051
Center..........: 419.007 , 434.982
Sky Level.......: 0.269997
*** Distribution data ***

Sigma X.........: 4.53823
Sigma Y.........: 4.53954
Correlation.....: -0.00913196
0.0620 s

And this was based on the following single star, whose position I determined 'by eye'

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: StarStatistics class and ReadPSF process module
« Reply #28 on: 2010 May 13 05:23:56 »
Hey guys!

Thanks for downloading and trying. It seems that the intensity and flux parameters are not working well... I'll take a look at them. Also I'm worried about the lack of consistency for the std dev calculations... it should not be that dependent on the input parameters.

A quick note about the module: yes, you have to set the initial centroid search, as close as you can (no need to be too exact, just 2-3 pixels around, depending on your search radius).

Well, I'll upload a new release today. Thanks Niall for the spelling check ;)
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: StarStatistics class and ReadPSF process module
« Reply #29 on: 2010 May 13 05:48:59 »
Hi Carlos,

For your code update, might I make a suggestion?

It would be useful to have a quick summary of the parameters actually being used - in the first few lines of the Console output. This would make the listing more 'understandable' when the user takes the time to inspect it in detail.

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC