TwiceAsNice  2019-02-18
Macros | Functions | Variables
profit.c File Reference
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "define.h"
#include "globals.h"
#include "prefs.h"
#include "fits/fitscat.h"
#include "levmar/levmar.h"
#include "fft.h"
#include "fitswcs.h"
#include "check.h"
#include "pattern.h"
#include "psf.h"
#include "profit.h"
Include dependency graph for profit.c:

Macros

#define _GNU_SOURCE
 

Functions

static double prof_gammainc (double x, double a)
 
static double prof_gamma (double x)
 
static float prof_interpolate (profstruct *prof, float *posin)
 
static float interpolate_pix (float *posin, float *pix, int *naxisn, interpenum interptype)
 
static void make_kernel (float pos, float *kernel, interpenum interptype)
 
profitstructprofit_init (psfstruct *psf, unsigned int modeltype)
 
void profit_end (profitstruct *profit)
 
void profit_fit (profitstruct *profit, picstruct *field, picstruct *wfield, picstruct *dgeofield, objstruct *obj, obj2struct *obj2)
 
void profit_dfit (profitstruct *profit, profitstruct *dprofit, picstruct *field, picstruct *dfield, picstruct *wfield, picstruct *dwfield, objstruct *obj, obj2struct *obj2)
 
float profit_noisearea (profitstruct *profit)
 
void profit_fluxcor (profitstruct *profit, objstruct *obj, obj2struct *obj2)
 
float profit_minradius (profitstruct *profit, float refffac)
 
void profit_psf (profitstruct *profit)
 
int profit_minimize (profitstruct *profit, int niter)
 
void profit_printout (int n_par, float *par, int m_dat, float *fvec, void *data, int iflag, int iter, int nfev)
 
void profit_evaluate (double *dpar, double *fvec, int m, int n, void *adata)
 
float * profit_residuals (profitstruct *profit, picstruct *field, picstruct *wfield, float dynparam, float *param, float *resi)
 
float * profit_presiduals (profitstruct *profit, double *dparam, float *presi)
 
float * profit_compresi (profitstruct *profit, float dynparam, float *resi)
 
int profit_resample (profitstruct *profit, float *inpix, PIXTYPE *outpix, float factor)
 
void profit_convolve (profitstruct *profit, float *modpix)
 
void profit_makedft (profitstruct *profit)
 
int profit_copyobjpix (profitstruct *profit, picstruct *field, picstruct *wfield, picstruct *dgeofield)
 
float profit_spiralindex (profitstruct *profit)
 
void profit_moments (profitstruct *profit, obj2struct *obj2)
 
void profit_convmoments (profitstruct *profit, obj2struct *obj2)
 
void profit_surface (profitstruct *profit, obj2struct *obj2)
 
void profit_addparam (profitstruct *profit, paramenum paramindex, float **param)
 
void profit_resetparam (profitstruct *profit, paramenum paramtype)
 
void profit_resetparams (profitstruct *profit)
 
int profit_setparam (profitstruct *profit, paramenum paramtype, float param, float parammin, float parammax, parfitenum parfittype, float priorcen, float priorsig)
 
int profit_boundtounbound (profitstruct *profit, float *param, double *dparam, int index)
 
int profit_unboundtobound (profitstruct *profit, double *dparam, float *param, int index)
 
int profit_covarunboundtobound (profitstruct *profit, double *dcovar, float *covar)
 
profstructprof_init (profitstruct *profit, unsigned int modeltype)
 
void prof_end (profstruct *prof)
 
float prof_add (profitstruct *profit, profstruct *prof, int extfluxfac_flag)
 
int prof_moments (profitstruct *profit, profstruct *prof, double *jac)
 

Variables

const int interp_kernwidth [5] ={1,2,4,6,8}
 
const int flux_flag [PARAM_NPARAM]
 
int theniter
 
int the_gal
 
static picstructthe_field
 
static picstructthe_wfield
 
profitstructtheprofit
 
profitstructthedprofit
 
profitstructthepprofit
 
profitstructtheqprofit
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Function Documentation

◆ interpolate_pix()

static float interpolate_pix ( float *  posin,
float *  pix,
int *  naxisn,
interpenum  interptype 
)
static

◆ make_kernel()

void make_kernel ( float  pos,
float *  kernel,
interpenum  interptype 
)
static

◆ prof_add()

float prof_add ( profitstruct profit,
profstruct prof,
int  extfluxfac_flag 
)

prof->featpitchvar

◆ prof_end()

void prof_end ( profstruct prof)

◆ prof_gamma()

static double prof_gamma ( double  x)

◆ prof_gammainc()

static double prof_gammainc ( double  x,
double  a 
)
static

◆ prof_init()

profstruct* prof_init ( profitstruct profit,
unsigned int  modeltype 
)

◆ prof_interpolate()

static float prof_interpolate ( profstruct prof,
float *  posin 
)
static

◆ prof_moments()

int prof_moments ( profitstruct profit,
profstruct prof,
double *  jac 
)

◆ profit_addparam()

void profit_addparam ( profitstruct profit,
paramenum  paramindex,
float **  param 
)

◆ profit_boundtounbound()

int profit_boundtounbound ( profitstruct profit,
float *  param,
double *  dparam,
int  index 
)

◆ profit_compresi()

float* profit_compresi ( profitstruct profit,
float  dynparam,
float *  resi 
)

◆ profit_convmoments()

void profit_convmoments ( profitstruct profit,
obj2struct obj2 
)

◆ profit_convolve()

void profit_convolve ( profitstruct profit,
float *  modpix 
)

◆ profit_copyobjpix()

int profit_copyobjpix ( profitstruct profit,
picstruct field,
picstruct wfield,
picstruct dgeofield 
)

◆ profit_covarunboundtobound()

int profit_covarunboundtobound ( profitstruct profit,
double *  dcovar,
float *  covar 
)

◆ profit_dfit()

void profit_dfit ( profitstruct profit,
profitstruct dprofit,
picstruct field,
picstruct dfield,
picstruct wfield,
picstruct dwfield,
objstruct obj,
obj2struct obj2 
)

◆ profit_end()

void profit_end ( profitstruct profit)

◆ profit_evaluate()

void profit_evaluate ( double *  dpar,
double *  fvec,
int  m,
int  n,
void *  adata 
)

◆ profit_fit()

void profit_fit ( profitstruct profit,
picstruct field,
picstruct wfield,
picstruct dgeofield,
objstruct obj,
obj2struct obj2 
)

◆ profit_fluxcor()

void profit_fluxcor ( profitstruct profit,
objstruct obj,
obj2struct obj2 
)

◆ profit_init()

profitstruct* profit_init ( psfstruct psf,
unsigned int  modeltype 
)

◆ profit_makedft()

void profit_makedft ( profitstruct profit)

◆ profit_minimize()

int profit_minimize ( profitstruct profit,
int  niter 
)

◆ profit_minradius()

float profit_minradius ( profitstruct profit,
float  refffac 
)

◆ profit_moments()

void profit_moments ( profitstruct profit,
obj2struct obj2 
)

◆ profit_noisearea()

float profit_noisearea ( profitstruct profit)

◆ profit_presiduals()

float* profit_presiduals ( profitstruct profit,
double *  dparam,
float *  presi 
)

◆ profit_printout()

void profit_printout ( int  n_par,
float *  par,
int  m_dat,
float *  fvec,
void *  data,
int  iflag,
int  iter,
int  nfev 
)

◆ profit_psf()

void profit_psf ( profitstruct profit)

◆ profit_resample()

int profit_resample ( profitstruct profit,
float *  inpix,
PIXTYPE outpix,
float  factor 
)

◆ profit_resetparam()

void profit_resetparam ( profitstruct profit,
paramenum  paramtype 
)

◆ profit_resetparams()

void profit_resetparams ( profitstruct profit)

◆ profit_residuals()

float* profit_residuals ( profitstruct profit,
picstruct field,
picstruct wfield,
float  dynparam,
float *  param,
float *  resi 
)

◆ profit_setparam()

int profit_setparam ( profitstruct profit,
paramenum  paramtype,
float  param,
float  parammin,
float  parammax,
parfitenum  parfittype,
float  priorcen,
float  priorsig 
)

◆ profit_spiralindex()

float profit_spiralindex ( profitstruct profit)

◆ profit_surface()

void profit_surface ( profitstruct profit,
obj2struct obj2 
)

◆ profit_unboundtobound()

int profit_unboundtobound ( profitstruct profit,
double *  dparam,
float *  param,
int  index 
)

Variable Documentation

◆ flux_flag

const int flux_flag[PARAM_NPARAM]
Initial value:
= {0,
1,0,0,
1,0,0,0,0,
1,0,0,0,
1,0,0,0,0,0,0,0,
1,0,0,
1,0,0,
1,0,0
}

◆ interp_kernwidth

const int interp_kernwidth[5] ={1,2,4,6,8}

◆ the_field

picstruct* the_field
static

◆ the_gal

int the_gal

◆ the_wfield

picstruct * the_wfield
static

◆ thedprofit

profitstruct * thedprofit

◆ theniter

int theniter

◆ thepprofit

profitstruct * thepprofit

◆ theprofit

profitstruct* theprofit

◆ theqprofit

profitstruct * theqprofit