pyhrs:docs

normalize_image

pyhrs.normalize_image(data, func_init, mask, fitter=<class 'astropy.modeling.fitting.LinearLSQFitter'>, normalize=True)[source] [edit on github]

Normalize an HRS image.

The tasks takes an image and will fit a function to the overall shape to it. The task will only fit to the illuminated orders and if an order_frame is provided it will use that to identify the areas it should fit to. Otherwise, it will filter the image such that only the maximum areas are fit.

This function will then be divided out of the image and return a normalized image if requested.

Parameters:

data: numpy.ndarray

Data to be normalized

mask: numpy.ndarray

If a numpy.ndarray, this will be used to determine areas to be used for the fit.

func_init: ~astropy.modeling.models

Function to fit to the image

fitter: ~astropy.modeling.fitting

Fitter function

normalize: boolean

If normalize is True, it will return data normalized by the function fit to it. If normalize is False, it will return an array representing the function fit to data.

Returns:

ndata: numpy.ndarray

If normalize is True, it will return data normalized by the function fit to it. If normalize is False, it will return an array representing the function fit to data.

Page Contents