aces.misc.image_stats

Module Contents

Functions

fit_func2(p, x)

err_func2(p, x, y)

fit_g(x, y, p0[, fkey])

param x:

independent coordinate (bin centres)

find_mode(data, parameters[, diag_plot])

Estimates and returns the mode of those input data that lie within the limits set by the parameters.

shrink_mask(data[, n])

get_beam_offsets(fp_name, fp_pitch, fp_ang)

do_statistics(y, incr[, do_mask])

param y:

image masked array

image_cell_statistic(in_file, out_dir[, cellsize, ...])

Compute some statistic over square cells in an image

Attributes

__author__

funcs

aces.misc.image_stats.__author__ = 'Dave McConnell <david.mcconnell@csiro.au>'[source]
aces.misc.image_stats.fit_func2(p, x)[source]
aces.misc.image_stats.err_func2(p, x, y)[source]
aces.misc.image_stats.funcs[source]
aces.misc.image_stats.fit_g(x, y, p0, fkey='gau')[source]
Parameters:
  • x – independent coordinate (bin centres)

  • y – histogram frequencies

  • p0 – initial guess fit params

  • fkey – Selects function to fit

aces.misc.image_stats.find_mode(data, parameters, diag_plot=False)[source]

Estimates and returns the mode of those input data that lie within the limits set by the parameters. The mode is determined by fitting a guassian function to the peak of the histogram of the logarithms of the values.

Parameters:
  • data – np.array of real values

  • parameters – dictionary giving the data value bounds

  • diag_plot – used for debugging histogram analysis

Returns:

aces.misc.image_stats.shrink_mask(data, n=25)[source]
aces.misc.image_stats.get_beam_offsets(fp_name, fp_pitch, fp_ang)[source]
aces.misc.image_stats.do_statistics(y, incr, do_mask=True)[source]
Parameters:
  • y – image masked array

  • incr – pixel increment in radians

  • do_mask – if True, expand mask (shrink unmasked area)

aces.misc.image_stats.image_cell_statistic(in_file, out_dir, cellsize=100, statistic='rms', do_mask=True, replace_old=True)[source]

Compute some statistic over square cells in an image :param in_file: input image as fits file :param cellsize: cell size in pixels :param statistic: what statistic to compute. :param do_mask: Modify masked portion image to eliminate annoying edge effects, particularly in rms. :param replace_old: If True, replace previous statistics image. :return: