Image quality fit.
Fits the point-like continuum detections with the 2D Moffat distribution integrated over the fibers of the reconstructed IFU image.
Warning
The module does run, but it is not tested. Should not be used before proper tests are implemented
Fit the image quality on the reconstructed IFU defined by the dither and IFU center files.
Parameters: | dither_file : string
ifucen_file : string
stars : None or list of 2-tuples, optional
fextract : None or list of fits files, optional
fe_prefix : string, optional
wmin, wmax : float, optional
Sampler : _BaseSampler child instance, optional
n_points : int, optional
|
---|---|
Returns: | best_fits : list of numpy arrays
|
Raises: | NotImplementedError
|
Bases: astropy.modeling.functional_models.Moffat2D
The model is the 2D Moffat distribution integrated in circles.
The integration is done in a Montecarlo like approach using the points provided by the sampler instance.
Parameters: | sampler : instance child of _BaseSampler
radius : float
amplitude : float
x_0 : float
y_0 : float
gamma : float
alpha : float
|
---|
Attributes
sampler | |
radius | |
area | (float) area of the fiber |
Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.
Evaluate the model in x and y given the parameters. Integrates the Moffat with a Montecarlo like approach using the points from the sampler. Assumes that the sampler samples the correct radius
Parameters: | x, y : array-like or numeric value
amplitude : float
x_0 : float
y_0 : float
gamma : float
alpha : float
|
---|---|
Returns: | z : array-like or numeric value
|
Compute the 2 dimensional integral of function func using a simple montecarlo-like integration.
Parameters: | func : callable
x, y : nd-arrays
area : float
args : list
kwargs : dictionary
|
---|---|
Returns: | I : float
sI : float
|
Bases: object
Sample a circle and returns the samples of a circle centered in (x, y) and with radius r.
This is the base class and doesn’t do the sampling. It provides a get_samples() that returns the list of points for a given circle center and radius.
Parameters: | n_points : int
|
---|
Notes
Private attributes _xs and _ys should be appropriately defined in the derived classes
Bases: pyhetdex.tools.astro.iq_fit._BaseSampler
Randomly sample the circle
Creates about n_points random (x, y) coordinates that sample the circle (x=0, y=0, r=1). It first creates a square with side=2*r and then removes the points outside the circle.
Parameters: | n_points : int
|
---|
Bases: pyhetdex.tools.astro.iq_fit._BaseSampler
Regular grid sample the circle
Creates about n_points (x, y) coordinates in a regular grid that samples the unit circle (x=0, y=0, r=1). It first creates a unit square (a=2) and then removes the points outside the circle. The actual number of points is going to be almost: round(sqrt(n_points * 4/pi)) ** 2
Parameters: | n_points : int
|
---|