#include #include "nrutil.h" #include "structs.h" void convolve (struct image *model, double **fftpsf, long complex_naxes[]); void copy_convregion (struct convpars *cpar, float **model, struct image convolved_img, int os); void do_conv (struct fitpars *fpar, struct image model, double **psfft, long complex_naxes[], struct derivs *df, struct derivs *cdf, struct convpars *cpar, int output) { extern struct inpars input; int i, os; os = input.sampfac; for (i=0; i <= fpar->npars; i++) { if (model.naxes[1] != 0 && model.naxes[2] != 0) { if (i == 0 || (fpar->ia[i] > 0 && !output)) { if (i > 0 || (i==0 && fpar->tr_num == 0)) { if (df->naxes[1] !=0 && df->naxes[2] !=0) { /* convolve.c takes struct image. */ model.z = cdf->dpm[i]; convolve (&model, psfft, complex_naxes); /* Charge diffusion kernel is also *\ \* applied in here. */ copy_convregion (cpar, df->dpm[i], model, os); }; }; }; }; }; }