medcombine - ' Routines to do median combination on...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
''' Routines to do median combination on astronomical data: normmedcomb() skycormednorm() ''' import numpy as np def normmedcomb(data, region=((0, 0), (-1, -1))): """ This function does a normalized median combination of the data. The routine first divides each sheet of the data by the median of the region [y1:y2, x1:x2] in that sheet. Then it calls medcombine to median-combine the result. Parameters ---------- data: ndarray, 3D Data to combine region: tuple ((y1, x1), (y2, x2)) Y1 of normalization region (default bottom edge) X1 of normalization region (default left edge) Y2 of normalization region (default top edge) X2 of normalization region (default right edge) Returns ------- normdata: ndarray, 2D The normalized, median-combined, 2D data array. normfact: ndarray, 1D The normalization factors for each 2D input "sheet". Examples -------- >>> import medcombine as mc >>> unit = np.ones((5, 5)) >>> x = np.array([ 5. * unit, 7. * unit, 5. * unit,]) >>> mc.normmedcomb(x) (array([[ 1., 1., 1., 1.,
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

medcombine - ' Routines to do median combination on...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online