Mode vs. Median Background

  • The problem with using the mode is that if a number does not appear more than once then the mode just takes the first number in the list.
  • Therefore, a median seems more practical.
  • Below is the mode and median background for splitting of 30x30 and 15x15:

mode_30.png median_30.png
mode_15.png median_15.png
  • Because of the reason outlined above we shall use median instead of mode.

Generated star field

  • From simple curve_fit fitting we sampled the parameters $a$, $\rho$, $\sigma_x$ and $\sigma_y$ for the Gaussian for each randomly positioned star:
  \begin{equation} f(x,y,\mu_x,\mu_y,\sigma_x,\sigma_y,\rho,a,d) = \frac{a}{2\pi\sigma_x\sigma_y\sqrt{(1-\rho^2)}} exp\Bigg\{-\frac{1}{2(1-\rho^2)}\Bigg[\bigg(\frac{x-\mu_x}{\sigma_x}\bigg)^2 + \bigg(\frac{y-\mu_y}{\sigma_y}\bigg)^2 -2\rho\bigg(\frac{x-\mu_x}{\sigma_x}\bigg)\bigg(\frac{y-\mu_y}{\sigma_y}\bigg)\Bigg]\Bigg\}  \end{equation}
  • Generated 50 stars.
  • For each randomly generated star position, a Gaussian was generated with the given centers and randomly choisen parameters from fitting images of Location 1 in focus filter (exposure time: 10 seconds).
  • The resulting Gaussian for one star was calculated over the entire image. This was done for all the stars.
  • Each pixel was then treated such that its pixel value up to this point was taken as the mean of a Poissonian distribution. A random Poissonian variables was then generated with that mean and this was set as the pixel value for each given pixels.
  • The resulting field and its background:

log_gen_field.png

bg.png
  • When run through our floodfill algorithm and it found 47 stars. Following stars were found:
removed_due_to_shape.png
  • It removed well shaped stars but left some stars that resemble galaxies. Must fix this.
  • Width ratios shown below and calculated using:
 \begin{equation} \sigma_x = \sqrt{\frac{\sum_{i = 1}^N (x_i - x_{\rm center})^2 p_i}{\sum_{i=1}^N p_i}}\end{equation}  \begin{equation} \sigma_y = \sqrt{\frac{\sum_{i = 1}^N (y_i - y_{\rm center})^2p_i}{\sum_{i=1}^N p_i}}\end{equation}  <br />

histogram_width_ratios.png

  • The distances between found centers and generated centers is shown below:
distance_fixed.png
  • Largest distance is due to the following star:
distance_star.png
  • Disrepancy is due to neighbouring star.

Skeweness of data

  • Last week we saw that the brightest star appeared to be skewed and was not fitted properly.
  • Fitted:
  \begin{equation} f(x,y,\mu_x,\mu_y,\sigma_x,\sigma_y,\rho,a,d) = \frac{a}{2\pi\sigma_x\sigma_y\sqrt{(1-\rho^2)}} exp\Bigg\{-\frac{1}{2(1-\rho^2)}\Bigg[\bigg(\frac{x-\mu_x}{\sigma_x}\bigg)^2 + \bigg(\frac{y-\mu_y}{\sigma_y}\bigg)^2 -2\rho\bigg(\frac{x-\mu_x}{\sigma_x}\bigg)\bigg(\frac{y-\mu_y}{\sigma_y}\bigg)\Bigg]\Bigg\}  \end{equation}  <br />
  • Below are shown brightest stars in one of the Location 1 images:
all.png
118_219.png 276_306.png
663_42.png 664_369.png
723_479.png 746_164.png
1178_776.png 1226_746.png
1273_587.png  
  • Here is a zoomed in brightest star in the image just for reference:
zoomed_in_star.png

Maximum Likelihood fitting

  • The predicted pixel value for a pixel is the following:
  \begin{equation} \nu_{ij} = n_{\rm{tot}} \int \int_{ij} f(x,y,\vec{\theta}) dx dy  \end{equation}  <br />
  • where $i,j$ is pixel coordinates, $f(x,y,\vec{\theta})$ is the Gaussian, $n_{tot}$ is the total number of pixel values.
  • However, no integration was perfomed, the Gaussian was just calculated over the pixel.
  • The maximum likelihood (Poissonian):
  \begin{equation} \sum^{N, M}_{i,j} [ n_{ij} \ln{\nu_{ij}} - \nu_{ij} ]  \end{equation}  <br />
  • where $N, M$ are the maximum number of $i,j$ pixels, $n_{ij}$ is the data pixel value for individual pixel.
  • The fitting done using it:
unfixed_best.png

-- ElenaCukanovaite - 20 Jan 2016

Topic attachments
I Attachment Action Size Date Who Comment
PNGpng 1178_776.png manage 106.8 K 21 Jan 2016 - 19:05 ElenaCukanovaite  
PNGpng 118_219.png manage 106.6 K 21 Jan 2016 - 19:00 ElenaCukanovaite  
PNGpng 1226_746.png manage 101.7 K 21 Jan 2016 - 19:05 ElenaCukanovaite  
PNGpng 1273_587.png manage 104.3 K 21 Jan 2016 - 19:05 ElenaCukanovaite  
PNGpng 276_306.png manage 117.0 K 21 Jan 2016 - 19:00 ElenaCukanovaite  
PNGpng 663_42.png manage 104.8 K 21 Jan 2016 - 19:02 ElenaCukanovaite  
PNGpng 664_369.png manage 100.0 K 21 Jan 2016 - 19:02 ElenaCukanovaite  
PNGpng 723_479.png manage 100.2 K 21 Jan 2016 - 19:04 ElenaCukanovaite  
PNGpng 746_164.png manage 108.5 K 21 Jan 2016 - 19:04 ElenaCukanovaite  
PNGpng all.png manage 801.2 K 21 Jan 2016 - 18:58 ElenaCukanovaite  
PNGpng bg.png manage 50.4 K 21 Jan 2016 - 23:28 ElenaCukanovaite  
PNGpng distance.png manage 32.2 K 21 Jan 2016 - 23:35 ElenaCukanovaite  
PNGpng distance_fixed.png manage 32.2 K 21 Jan 2016 - 23:37 ElenaCukanovaite  
PNGpng distance_star.png manage 52.7 K 21 Jan 2016 - 23:35 ElenaCukanovaite  
PNGpng fixed_center.png manage 89.0 K 22 Jan 2016 - 00:11 ElenaCukanovaite  
PNGpng generated_field.png manage 42.5 K 21 Jan 2016 - 23:26 ElenaCukanovaite  
PNGpng histogram_width_ratios.png manage 27.0 K 21 Jan 2016 - 23:32 ElenaCukanovaite  
PNGpng log_gen_field.png manage 62.7 K 21 Jan 2016 - 23:26 ElenaCukanovaite  
PNGpng median_15.png manage 47.5 K 20 Jan 2016 - 23:22 ElenaCukanovaite  
PNGpng median_30.png manage 47.7 K 20 Jan 2016 - 23:22 ElenaCukanovaite  
PNGpng mode_15.png manage 47.9 K 20 Jan 2016 - 23:22 ElenaCukanovaite  
PNGpng mode_30.png manage 50.1 K 20 Jan 2016 - 23:22 ElenaCukanovaite  
PNGpng removed_due_to_shape.png manage 51.5 K 21 Jan 2016 - 23:30 ElenaCukanovaite  
PNGpng unfixed_best.png manage 88.6 K 22 Jan 2016 - 00:19 ElenaCukanovaite  
PNGpng zoomed_in_star.png manage 85.5 K 21 Jan 2016 - 19:09 ElenaCukanovaite  

Physics WebpagesRHUL WebpagesCampus Connect • Royal Holloway, University of London, Egham, Surrey TW20 0EX; Tel/Fax +44 (0)1784 434455/437520

Topic revision: r5 - 22 Jan 2016 - ElenaCukanovaite

 
This site is powered by the TWiki collaboration platformCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback