Telescope Pupils

Pupil Maps

Functions for the creation of pupil maps and masks.

aotools.functions.pupil.circle(radius, size, circle_centre=(0, 0), origin='middle')[source]

Create a 2-D array: elements equal 1 within a circle and 0 outside.

The default centre of the coordinate system is in the middle of the array: circle_centre=(0,0), origin=”middle” This means: if size is odd : the centre is in the middle of the central pixel if size is even : centre is in the corner where the central 4 pixels meet

origin = “corner” is used e.g. by psfAnalysis:radialAvg()

Examples:

circle(1,5) circle(0,5) circle(2,5) circle(0,4) circle(0.8,4) circle(2,4)
  00000       00000       00100       0000        0000          0110
  00100       00000       01110       0000        0110          1111
  01110       00100       11111       0000        0110          1111
  00100       00000       01110       0000        0000          0110
  00000       00000       00100

circle(1,5,(0.5,0.5))   circle(1,4,(0.5,0.5))
   .-->+
   |  00000               0000
   |  00000               0010
  +V  00110               0111
      00110               0010
      00000
Parameters:
  • radius (float) – radius of the circle
  • size (int) – size of the 2-D array in which the circle lies
  • circle_centre (tuple) – coords of the centre of the circle
  • origin (str) – where is the origin of the coordinate system in which circle_centre is given; allowed values: {“middle”, “corner”}
Returns:

the circle array

Return type:

ndarray (float64)