Main#

Function to perform toy coronagraph

class main.Target#

A circular symmetric target

A circular symmetric target, which could be a dust ring, a debris disk, or ice remains

file_name#

The name of the FITS file containing the target data.

Type

str

px#

Number of pixels along the x-axis.

Type

int

py#

Number of pixels along the y-axis.

Type

int

psf_scale#

The scale of the PSF in arcseconds per pixel.

Type

float

xpix#

The x-coordinates of the pixels in arcseconds.

Type

np.ndarray

ypix#

The y-coordinates of the pixels in arcseconds.

Type

np.ndarray

pre_img#

The pre-processed image.

Type

np.ndarray

planets#

A list of the planets in the system.

Type

list

orbits#

A list of the orbits of the planets.

Type

list

planets_brightness#

A list of the brightnesses of the planets in Jy/arcsec^2.

Type

list

__init__()#

Initialize the Target object.

__init__()#

Initialization

Initializes the instance based on the target fits file

Parameters
  • file_name (str, optional) – The name of the FITS file containing the target data.

  • None (If) –

  • used. (the default file DATADIR/example.fit will be) –

  • px (int, optional) – The number of pixels in the x-direction. Defaults to 512.

  • py (int, optional) – The number of pixels in the y-direction. Defaults to 512.

__weakref__#

list of weak references to the object (if defined)

add_planet(pos, brightness, mode='moving')#

Add a planet

Add a planet to the Target object.

Parameters
  • pos (array-like) – Planet position information (depends on mode). For “moving” mode, pos = [a, e, pa, inc, t]; for “polar” mode, pos =[r, theta(in degree)]; for “cartesian” mode, pos =[x,y].

  • brightness (float) – Planet brightness in Jy.

  • mode (str) – Mode for specifying planet position coordinates (“moving”, “polar”, “cartesian”).

Returns

None

contrast(charge, order=1)#

Contrast

Find the planet brightness and background brightness in the final image.

Parameters
  • charge (int) – Charge number (for vortex coronagraph).

  • order (int) – The order number of the planet, using self.list_planets() to look up the order.

  • plot_dpi (int) – Dots per inch (DPI) for the plot.

Returns

target brightness, background brightness, background brightness (ignored dust inside IWA) in Jy.

Return type

brightness (tuple)

delete_planet(order)#

Delete planet

Deletes a planet from self.planet, self.orbit and self.planet_brightness with given order number.

Parameters

order (int) – The order number of the planet to be deleted.

Returns

None

list_planets()#

List planets

List the planets present in the Target object with their order numbers.

Returns

None

planet_move(time, order=1, mode='culmulated', plot_pos=False, plot_dpi=300)#

Planet moving

Move a planet’s position.

Parameters
  • time (float) – Time by which the planet should move.

  • order (int) – The order number of the planet.

  • mode (str) – Mode for specifying movement (“culmulated”, “specific”). The former will be added to the original time, while the latter will set up a new time regardless of the original time.

  • plot_pos (bool) – Whether to plot the new planet position on its orbit.

  • plot_dpi (int) – Dots per inch (DPI) for the plot.

Returns

None

plot_final(charge, iwa_ignore=False, add_planet=True, plot_dpi=300)#

Final image

Plots the target image after processing with the vortex coronagraph.

Parameters
  • charge (int) – Charge number (for vortex coronagraph).

  • add_planet (bool) – Whether to include planets in the plot.

  • rot_number (int) – Rotation number for creating the circular PSF.

  • plot_dpi (int) – Dots per inch (DPI) for the final plot.

Returns

*_final.png

plot_orbit(order, plot_dpi=300)#

Orbit plot

Plot the orbit of a planet.

Parameters
  • order (int) – The order number of the planet, using self.list_planets() to look up the order.

  • plot_dpi (int) – Dots per inch (DPI) for the plot.

Returns

orbit_*.png

plot_origin(plot_planets=True, plot_dpi=300, boundary=True)#

Plot original target

Plot the original image with or without planets.

Parameters
  • plot_planets (bool) – Whether to plot planets or not.

  • plot_dpi (int) – Dots per inch (DPI) for the plot.

  • boundary (bool) – Whether to show the boundary limits.

Returns

origin_*.png