Author Topic: PSF: Can it be estimated, measured or generated by theory ?  (Read 7023 times)

Offline Christoph Puetz

  • PixInsight Addict
  • ***
  • Posts: 150
  • Peterberg Observatory (Germany, Saarland)
    • Fotos
Hi all,

it tried a lot of deconvolution with my pictures last week.
Is it possible to measure the point spread function of a "good star" in PI
or could PSF be created by theory, if I would enter some data
as focal ration, focal length, wavelength or similar ?
In ImageJ there is a plugin that can  create a theoretical PSF image
(see http://bigwww.epfl.ch/deconvolution/?p=plugins). May be an idea ...

Would this be useful and possible to implement in PI ?

Always clear skies
Christoph


Kind regards,
      Christoph
---
ATIK 383L+, Canon EOS 450d, modified,
Canon EOS 500d, 
20" Planewave CDK, 6" APO Starfire Refractor,
Celestron 8", Skywatcher ED80,
Peterberg Observatory (www.sternwarte-peterberg.de)
PixInsight, PHD-Guiding
private URL: www.ccdsky.eu

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #1 on: 2010 August 16 10:17:49 »
Hi Christoph

A PSF may be read from a star is you assume a certain (known) distribution function. One common function is the gaussian one. I wrote the "StarStatistics" class, for the PCL that performs this job. It is also implemented in a process module (for testing purposes, nothing too fancy) as "ReadPSF". I have to recompile all the code for the current PCL/Core. Give me a pair of days, and it will be online again.


A more theorical approach, like that plugin may be performed without problems with PixelMath. If you post the function, we may be able to show you the PM expression.
Regards,

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

Offline Christoph Puetz

  • PixInsight Addict
  • ***
  • Posts: 150
  • Peterberg Observatory (Germany, Saarland)
    • Fotos
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #2 on: 2010 August 16 12:13:43 »
Carlos,

thanks for your reply. Unfortunately I do not have the function to create a PSF,
as i am not an expert in image processing mathematics (although I am a software developer).
The Source Code of the ImageJ Plugin is not available to me.
Do you know a theoretical approach for a gaussian psf ?

Indeed, the more "practical way" is surely to readout the PSF directly from an image.
I saw a quite handy implementation in "AIP for Windows" - you select one or more stars and a function computes the gaussian PSF from it.
This is a feature on my very personal "wish list" for PI. Please note the screenshot in PDF format attached to this message.

Please take your time to develop and proove your implementation of the readPSF function. Astronomers can be patient, and
development takes some time  ::)
I surely will test this and give you feedback.

Christoph



Kind regards,
      Christoph
---
ATIK 383L+, Canon EOS 450d, modified,
Canon EOS 500d, 
20" Planewave CDK, 6" APO Starfire Refractor,
Celestron 8", Skywatcher ED80,
Peterberg Observatory (www.sternwarte-peterberg.de)
PixInsight, PHD-Guiding
private URL: www.ccdsky.eu

Offline darkownt

  • PixInsight Enthusiast
  • **
  • Posts: 92
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #3 on: 2010 August 19 14:44:35 »
Hi all,

it tried a lot of deconvolution with my pictures last week.
Is it possible to measure the point spread function of a "good star" in PI
or could PSF be created by theory, if I would enter some data
as focal ration, focal length, wavelength or similar ?
In ImageJ there is a plugin that can  create a theoretical PSF image
(see http://bigwww.epfl.ch/deconvolution/?p=plugins). May be an idea ...

Would this be useful and possible to implement in PI ?

Always clear skies
Christoph





Hi Christoph:


Just to clarify there is a real PSF caused by your optics which actually can be measured.  A simulated,  parametrized, or functional approximation of the real PSF can be generated.. and that thing is sometimes called the PSF although really its just an assumed PSF used for deconvolution (generally it is your best candidate to use as a deconvolution kernal).

I can try to measure your PSF (for a specific optical configuration)  but I will need the best 16 or 32bit unprocessed linear image with no overexposure, smallest amount of noise etc. you can provide. 

Please PM if you'd like to discuss further.


cheers
Colin

Offline Christoph Puetz

  • PixInsight Addict
  • ***
  • Posts: 150
  • Peterberg Observatory (Germany, Saarland)
    • Fotos
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #4 on: 2010 August 21 03:31:38 »
"(generally it is your best candidate to use as a deconvolution kernal)."

If this is true, that the 'theoretical' PSF reveals better results in deconvolution process - I would prefer this.
A measured PSF could then be compared in order to make a statement about the circumstances of optics/weather conditions and so on ...

If I understand image basics right (i.e. by the book "Handbook of Astronomical Image Processing, p. 30) then
the diameter of a core region in a diffraction disk is:

d = 1.02 * lambda * (F/A), lambda = wavelength, F = focal length and A the Aperture of the optics.
The diameter d is to be "filled" by a Gaussian Function to get a PSF.
To get a PSF for the detector you need to know the size of one pixel. 
Am I right ?
« Last Edit: 2010 August 21 09:47:30 by cpuetz »
Kind regards,
      Christoph
---
ATIK 383L+, Canon EOS 450d, modified,
Canon EOS 500d, 
20" Planewave CDK, 6" APO Starfire Refractor,
Celestron 8", Skywatcher ED80,
Peterberg Observatory (www.sternwarte-peterberg.de)
PixInsight, PHD-Guiding
private URL: www.ccdsky.eu

Offline darkownt

  • PixInsight Enthusiast
  • **
  • Posts: 92
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #5 on: 2010 August 21 15:20:19 »
Hi Christoph:

I meant "Canditate" more as "best approximation" without the benefit of measurement.

You definitiely can make some predictions about what general functional form the PSF takes assuming perfect optics etc.  The formula you cite can calculate exactly the linear width of the central bright part of the airy disk.  The result would not tell you anything about the actual PSF but does serve as an approximation of it and yes surely, diffraction makes up quite a large portion of the PSF you would observe in a good optical system.

We should note the functional form of the Airy disc is not gaussian (I think it's a Bessel function...) so a Gaussian would only ever be an approximation.  (Note Airy Patterns have dark and light rings outside the core which cannot be corrected for with a gaussian based PSF).

That said, the formula is a good place to start, especially if you are playing with the gaussian functions in the restoration and deconvolution tools in PixInsight. 

If you want to use the formula you have quoted yes, you need to translate the physical units somehow into pixels (Eq 1.12 on page 9 is for d measured in meters).

Next you want to translate the width of the airy disc into a "close approximate" Gaussian which is expressed using the parameter "width" in the Gaussian generators.


The Wiki entry on Airy disk has a formula for Gaussian approximation of the airy disk.  That might be something to try.

PS Check out Aberrator at http://aberrator.astronomy.net/   
It's a little program that lets you create simulated airy patterns.  It's pretty interesting.
cheers
Colin


   
« Last Edit: 2010 August 21 15:36:27 by darkownt »

Offline darkownt

  • PixInsight Enthusiast
  • **
  • Posts: 92
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #6 on: 2010 August 22 17:57:49 »
On a related note:  when thinking about Airy patterns caused by essentially path length differences of the light hitting a flat CCD I asked myself... then why make them flat?

As it turns out curved CCDs have been developed?? and can be matched to the "focal surface" of an optical system in which it is installed.

I would assume the Airy pattern due to diffraction... would be quite different ?

Anyone have any experience with curved CCDs?  Not that I am ever going to use one...

cheers
Colin

Offline Christoph Puetz

  • PixInsight Addict
  • ***
  • Posts: 150
  • Peterberg Observatory (Germany, Saarland)
    • Fotos
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #7 on: 2010 August 26 09:38:05 »
Hi Colin, Harry,

first: Thanks for your hint to aberrator windows software. I will use it under wine in Linux and it works fine. So I will continue
to work with it.

I uploaded 3 pictures to Harry's Server. Hope it will be helpful for you !

Christoph
Kind regards,
      Christoph
---
ATIK 383L+, Canon EOS 450d, modified,
Canon EOS 500d, 
20" Planewave CDK, 6" APO Starfire Refractor,
Celestron 8", Skywatcher ED80,
Peterberg Observatory (www.sternwarte-peterberg.de)
PixInsight, PHD-Guiding
private URL: www.ccdsky.eu

Offline darkownt

  • PixInsight Enthusiast
  • **
  • Posts: 92
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #8 on: 2010 August 30 05:17:41 »
Thanks Christoph!  I'll let you know how it goes with the images!

Offline darkownt

  • PixInsight Enthusiast
  • **
  • Posts: 92
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #9 on: 2010 August 31 06:01:00 »
Hi Christoph:

I took a look at the photographs, unfortunately much of the information in the bright stars is lost due to overexposure.  This may be something I could try to look at as a challenge to an already perfected technique, but for development I need much better images.

cheers
Colin

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #10 on: 2010 August 31 10:45:13 »
Hi Colin

AFAIK, there is no significant change between stars of different luminance, except for the "amplitude". The profile is more or less the same. For example, if you fit a gaussian curve, the standard deviation is almost the same. So it is a experimental FWHM.
To summarize, if a star is saturated, simply ignore it, work with the others.
Regards,

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

Offline darkownt

  • PixInsight Enthusiast
  • **
  • Posts: 92
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #11 on: 2010 September 01 07:09:18 »
hey Carlos:

If I had designed my method to ignore the brightest stars I could work with the result... currently such a deviation would be a work around to my process!  My aim is to create something for calibration/measurement of an instrument and as such would work with specific images generated in a specific manner *for that purpose*.

Someday I might look into doing something more specifically directed to "difficult" or arbitrary images or using only sub parts.
 
You are very helpful with your suggestions.  Please keep up the good work!

thanks
Colin

 :D

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #12 on: 2010 September 01 07:33:50 »
To ignore those kind of stars is quite easy to implement. Simply create a threshold parameter (very close to 1), and ask if any pixel inside a square sample is greater than this value (you may use statistics to get the maximum value). If so, discard the sample star. There are so many stars in most images, that a few rejected are tolerable :D
Regards,

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

Offline Christoph Puetz

  • PixInsight Addict
  • ***
  • Posts: 150
  • Peterberg Observatory (Germany, Saarland)
    • Fotos
Re: PSF: Can it be estimated, measured or generated by theory ?
« Reply #13 on: 2010 September 01 08:04:27 »
Hi Colin,

I uploaded 4 further images. Have a look at them ! I tried to gibe you some "raw" images.
These are some that are already be processed.

Christoph
Kind regards,
      Christoph
---
ATIK 383L+, Canon EOS 450d, modified,
Canon EOS 500d, 
20" Planewave CDK, 6" APO Starfire Refractor,
Celestron 8", Skywatcher ED80,
Peterberg Observatory (www.sternwarte-peterberg.de)
PixInsight, PHD-Guiding
private URL: www.ccdsky.eu