JC: I have been working on calculating the centroid coordinates for the detected stars in a given frame.


  • Algorithm takes list of 'Star coordinates' (max pixel value within array of pixels that constitute a star) and constructs a nxn box of same dimensions as that used for the aperture photometry about the coordinate pixel.
  • I decided that, in order to keep my algorithm well compartmentalised, I would input the x_jth and y_ith pixel into the centroid calculation using numpy.meshgrid: (eg)
  • For my algorithm, I created a meshgrid the same dimensions as the inset of the total frame being used (algorithm deals in square arrays) starting and ending at the coordinates of the inset. Ie:
  • This was done in order to return centroid coordinates relative to the original frame.


  • Here, boxlstarraybacksub is a list containing background-subtracted pixel values for all pixels inside the box (background is the median background value specific to each star). This is our (n_(i,j) - b)
  • Here, subindexlstx/subindexlsty are lists of the np.meshgrid array as discussed above.



This is how the background looks like when the background value for each pixel is calculated; it makes sense that there is a higher ADU value where the hottest stars are.


Stars found by my algorithm are 79. Frame taken with an exposure time of 90 seconds.


Selected some stars to investigate the flux as a function of radius for a circular aperture: (in this image the radius is set to 50 pixels)




Found that an optimal aperture would be with a radius of 12 pixels.


The error on the flux was calculated as error_flux = sqrt(flux).

The magnitude: m_i = -2.5 * np.log10(f)

The error in the magnitude: abs(-2.5/np.log(10)) * (error_flux/flux)



Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng Schermata_2019-02-13_alle_12.34.48.png r1 manage 71.9 K 13 Feb 2019 - 12:36 AriannaSaba  
PNGpng Schermata_2019-02-13_alle_12.35.12.png r1 manage 99.2 K 13 Feb 2019 - 12:36 AriannaSaba  
PNGpng Schermata_2019-02-13_alle_12.35.20.png r1 manage 72.8 K 13 Feb 2019 - 12:36 AriannaSaba  
PNGpng Screen_Shot_2019-02-13_at_11.29.13.png r1 manage 50.0 K 13 Feb 2019 - 12:09 JacobChambers  
PNGpng Screen_Shot_2019-02-13_at_11.44.50.png r1 manage 23.1 K 13 Feb 2019 - 12:08 JacobChambers  
PNGpng Screen_Shot_2019-02-13_at_12.13.23.png r1 manage 10.5 K 13 Feb 2019 - 12:14 JacobChambers  
PNGpng Screen_Shot_2019-02-13_at_12.16.09.png r1 manage 18.1 K 13 Feb 2019 - 12:16 JacobChambers  
PNGpng background.png r1 manage 39.3 K 13 Feb 2019 - 12:33 AriannaSaba  
PNGpng fluxes.png r1 manage 29.2 K 13 Feb 2019 - 12:33 AriannaSaba  
PNGpng fluxes_dim.png r1 manage 37.8 K 13 Feb 2019 - 12:33 AriannaSaba  
PNGpng fluxes_dim_small_radius.png r1 manage 28.7 K 13 Feb 2019 - 12:33 AriannaSaba  
PNGpng m_vs_flux.png r1 manage 21.1 K 13 Feb 2019 - 12:34 AriannaSaba  
PNGpng red_200s_view.png r1 manage 56.9 K 13 Feb 2019 - 12:09 JacobChambers  
PNGpng red_fits_grey_scale.png r1 manage 99.5 K 13 Feb 2019 - 12:34 AriannaSaba  
PNGpng stars_in_circle.png r1 manage 128.5 K 13 Feb 2019 - 12:34 AriannaSaba  
PNGpng stars_of_interest.png r1 manage 101.5 K 13 Feb 2019 - 12:34 AriannaSaba  
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions

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

Topic revision: r2 - 13 Feb 2019 - AriannaSaba

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 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