Miscellaneous useful auxiliary functions:
Returns a list of Imfit image-function names (e.g., [“Gaussian”, “Exponential”, etc.])
function_list – list of Imfit image-function names
list of str
Returns a dict mapping each Imfit image-function names to a list of its corresponding parameter names.
function_dict – dict where image-function names are keys and items are list of function parameter names
dict
Given a string specifying the official name of an Imfit image function (e.g., “Sersic”, “Sersic_GenEllipse”, “ExponentialDisk3D”), this returns an instance of FunctionDescription describing that function and its parameters (with values all set to 0).
func_type (string) – The function type; must be one of the recognized Imfit image-function names (E.g., “Sersic”, “BrokenExponential”, etc. Use “imfit –list-functions” on the command line to get the full list, or FunctionNames in this module.)
label (string, optional) – Custom identifying label for this instance of this function. Example: “disk”, “bulge”. Default: “” (which means no label).
func_desc – Instance of FunctionDescription
.
FunctionDescription
Read and parse an Imfit model-configuration file.
fileName (str) – Path to the model configuration file.
model (ModelDescription
) – A model description object.
See Imfit documentation for details on the format of configuration files.
Parse an Imfit model configuration from a list of strings.
lines (list of str) – String representantion of Imfit model configuration.
model – A model description object.
ModelDescription
See also
Helper function to generate PsfOversampling objects (corrects input psfImage, sets up region string, etc.).
psfImage (2-D numpy array) – the oversampled PSF image
oversampleScale (int) –
pixels per data-image pixel in one dimension (must be >= 1)
regionSpec (sequence of int) – specifies inclusive boundaries of image region to be oversampled [x1,x2,y1,y2]
psfNormalization (bool, optional) – Normalize the PSF image before using.
Default: True
.
oversampleInfo
instance of PsfOversampling class
Checks an input numpy array and, if necessary, converts it to double-precision floating point, little-endian byte order, with contiguous layout, to enable use with Imfit.
array (numpy ndarray) –
array – The input array, suitably converted
numpy ndarray