define_chunks module

This script defines the coordintes of grid of subcubes

define_chunks.define_subcubes(steps, wcs, overlap, subcube_size_pix)

Return an array with the coordinates of the subcubes

Parameters
  • steps (int) – Steps to grid the cube.

  • wcs (class astropy.wcs) – wcs of the fits file

  • overlap (int) – Number of pixels overlaping between subcubes

  • subcube_size_pix (int) – Number of pixels of the side of the subcubes

Returns

coord_subcubes – Array with the coordinates of rthe subcubes

Return type

array

define_chunks.get_args()

This function parses and returns arguments passed in

define_chunks.main()

Chunk the data cube in several subcubes

define_chunks.plot_border(wcs, n_pix)

Plot boundaries of subcubes

Parameters
  • wcs (class astropy.wcs) – wcs of the fits file

  • n_pix (int) – Number of pixels of the cube side.

define_chunks.plot_grid(wcs, coord_subcubes, grid_plot, n_pix)

Plot grid of subcubes

Parameters
  • wcs (class astropy.wcs) – wcs of the fits file

  • coord_subcubes (array) – Array containing coordinates of subcubes.

  • grid_plot (str) – Path to save the grid plot

  • n_pix (int) – Number of pixels of the cube side.

define_chunks.plot_subcubes(coord_subcubes, l_s='-', color=None, l_w=1)

Plot subcubes

Parameters
  • coord_subcubes (int) – Steps to grid the cube.

  • l_s (str) – Line style. Defalult value is solid line

  • color (str) – Line color. Default value is no color.

  • l_w (float) – Line width. Default value is 1.

define_chunks.write_subcubes(steps, wcs, overlap, subcube_size_pix, coord_file)

Return coordinates of subcubes. Save file coord_file in the results folder containing the coordinates of the subcubes

Parameters
  • steps (int) – Steps to grid the cube.

  • wcs (class astropy.wcs) – wcs of the fits file

  • overlap (int) – Number of pixels overlaping between subcubes

  • subcube_size_pix (int) – Number of pixels of the side of the subcubes

Returns

Array containing coordinates of subcubes of the edges of the subcubes

Return type

coord_subcubes array