#include #include #include #include #include "structs.h" int totnobj; int istrunc (char *objtype); void menu (struct inpars *input, struct fitpars *fpar, FILE *ftype, float xoffset, float yoffset, float chisq, int ndof) { int box[5]={0, 0, 0, 0, 0}, objn = 0, i, mode, itmp; struct fitpars *f; int ia[11]; float x, y, tmp; char object[8]; fprintf (ftype, "\n# Input menu file: %s\n", input->initparfile); if (chisq > 0.) fprintf (ftype, "\n# Chi^2/nu = %.3f, Chi^2 = %.3f, Ndof = %d", chisq/ndof, chisq, ndof); fprintf (ftype, "\n\n"); fprintf (ftype, "================================================================================\n"); fprintf (ftype, "# IMAGE and GALFIT CONTROL PARAMETERS\n"); fprintf (ftype, "A) %-14s # Input data image (FITS file)\n", input->data); fprintf (ftype, "B) %-14s # Output data image block\n", input->output); fprintf (ftype, "C) %-14s # Sigma image name ", input->sigma); fprintf (ftype, "(made from data if blank or \"none\") \n"); fprintf (ftype, "D) %-10s %-8s # Input PSF image and ", input->psf, input->kernel); fprintf (ftype, "(optional) diffusion kernel\n"); fprintf (ftype, "E) %-14d # PSF fine sampling factor relative to data \n", input->sampfac); fprintf (ftype, "F) %-14s # Bad pixel mask (FITS image or ASCII coord list)\n", input->badpix); fprintf (ftype, "G) %-14s # File with parameter constraints (ASCII file) \n", input->constraints); sscanf (input->imgsect, "[%d:%d,%d:%d]", &box[1], &box[2], &box[3], &box[4]); fprintf (ftype, "H) %-4d %-4d %-4d %-4d # Image region to fit (xmin xmax ymin ymax)\n", box[1], box[2], box[3], box[4]); fprintf (ftype, "I) %-6d %-6d # Size of the convolution box (x y)\n", input->convbox[1], input->convbox[2]); fprintf (ftype, "J) %-14.3f # Magnitude photometric zeropoint \n", input->magzpt); fprintf (ftype, "K) %-6.3f %-6.3f # Plate scale ", input->d[1], input->d[2]); fprintf (ftype, "(dx dy) [arcsec per pixel]\n"); fprintf (ftype, "O) %-14s # Display type (regular, curses, both)\n", input->device); fprintf (ftype, "P) %-14d # Choose: 0=optimize, 1=model, 2=imgblock, 3=subcomps\n", input->create); fprintf (ftype, "\n"); fprintf (ftype, "# INITIAL FITTING PARAMETERS\n"); fprintf (ftype, "#\n"); fprintf (ftype, "# For component type, the allowed functions are: \n"); fprintf (ftype, "# sersic, expdisk, edgedisk, devauc, king, nuker, psf, \n"); fprintf (ftype, "# gaussian, moffat, ferrer, and sky. \n"); fprintf (ftype, "# \n"); fprintf (ftype, "# Hidden parameters will only appear when they're specified:\n"); fprintf (ftype, "# Bn (n=integer, Bending Modes).\n"); fprintf (ftype, "# C0 (diskyness/boxyness), \n"); fprintf (ftype, "# Fn (n=integer, Azimuthal Fourier Modes).\n"); fprintf (ftype, "# R0-R10 (coordinate rotation, for creating spiral structures).\n"); fprintf (ftype, "# To, Ti, T0-T10 (truncation function).\n"); fprintf (ftype, "# \n"); fprintf (ftype, "# ------------------------------------------------------------------------------\n"); fprintf (ftype, "# par) par value(s) fit toggle(s) # parameter description \n"); fprintf (ftype, "# ------------------------------------------------------------------------------\n"); fprintf (ftype, "\n"); while ( fpar != NULL && strncmp (fpar->objtype, "none", 4) != 0 ) { fprintf (ftype, "# Component number: %d\n", ++objn); fpar->compnum = objn; for (i=1; i <= 10; i++) { if (fpar->ia[i] == -1) ia[i] = 0; else ia[i] = fpar->ia[i]; }; if (!istrunc (fpar->objtype)) fprintf (ftype, " 0) %-14s # Component type\n", fpar->objtype); if (strncmp (fpar->objtype, "sky", 3) != 0) { x = fpar->a[1] + xoffset; y = fpar->a[2] + yoffset; }; if (strncmp (fpar->objtype, "sersic", 6) == 0) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y\n", x, y, ia[1], ia[2]); /*------------------------------------------------------------\ | Check out whether one is trying to fit truncation, if so | | allow for only certain kinds of normalization. | \------------------------------------------------------------*/ if (fpar->normtype == 1) fprintf (ftype, " 3) %-8.4f %-5d # Central surface brghtness [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 2) fprintf (ftype, " 3) %-8.4f %-5d # Surface brightness at R_e [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 3) fprintf (ftype, " 3) %-8.4f %-5d # Surface brghtnss @ outer R_break [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 0) fprintf (ftype, " 3) %-8.4f %-5d # Integrated magnitude \n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # R_e (effective radius) [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # Sersic index n (de Vaucouleurs n=4) \n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # ----- \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "devauc", 6) == 0 ) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y\n", x, y, ia[1], ia[2]); if (fpar->normtype == 1) fprintf (ftype, " 3) %-8.4f %-5d # Central surface brghtness [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 2) fprintf (ftype, " 3) %-8.4f %-5d # Surface brightness at R_e [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 3) fprintf (ftype, " 3) %-8.4f %-5d # Surface brghtnss @ outer R_break [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 0) fprintf (ftype, " 3) %-8.4f %-5d # Integrated magnitude \n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # R_e (effective radius) [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # ----- \n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # ----- \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "nuker", 5) == 0) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y\n", x, y, ia[1], ia[2]); if (fpar->normtype >= 0 && fpar->normtype <= 2) fprintf (ftype, " 3) %-8.4f %-5d # Mu(Rb) [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 3) fprintf (ftype, " 3) %-8.4f %-5d # Surface brghtnss @ outer R_break [mag/arcsec^2]\n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # Rb [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # Alpha \n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # Beta \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # Gamma \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "king", 4) == 0) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y\n", x, y, ia[1],ia[2]); if (fpar->normtype == 1 || fpar->normtype == 0) fprintf (ftype, " 3) %-8.4f %-5d # Central surface brghtness [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 2) fprintf (ftype, " 3) %-8.4f %-5d # Surface brightness at Rc [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 3) fprintf (ftype, " 3) %-8.4f %-5d # Surface brghtnss @ outer R_break [mag/arcsec^2]\n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # Rc [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # Rt [pix]\n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # Alpha \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "expdisk", 7) == 0) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y\n", x, y, ia[1], ia[2]); if (fpar->normtype == 1) fprintf (ftype, " 3) %-8.4f %-5d # Central surface brghtness [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 2) fprintf (ftype, " 3) %-8.4f %-5d # Surface brightness at Rs [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 3) fprintf (ftype, " 3) %-8.4f %-5d # Surface brghtnss @ outer R_break [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 0) fprintf (ftype, " 3) %-8.4f %-5d # Integrated magnitude \n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # R_s (disk scale-length) [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # ----- \n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # ----- \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "gaussian", 8) == 0) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y \n", x, y, ia[1], ia[2]); if (fpar->normtype == 1) fprintf (ftype, " 3) %-8.4f %-5d # Central surface brghtness [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 2) fprintf (ftype, " 3) %-8.4f %-5d # Surface brightness at FWHM [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 3) fprintf (ftype, " 3) %-8.4f %-5d # Surface brghtnss @ outer R_break [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 0) fprintf (ftype, " 3) %-8.4f %-5d # Integrated magnitude \n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # FWHM [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # ----- \n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # ----- \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "psf", 3) == 0) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y \n", x, y, ia[1], ia[2]); fprintf (ftype, " 3) %-8.4f %-5d # Integrated magnitude \n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # ----- \n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # ----- \n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # ----- \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "moffat", 6) == 0 ) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y \n", x, y, ia[1], ia[2]); if (fpar->normtype == 1) fprintf (ftype, " 3) %-8.4f %-5d # Central surface brghtness [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 2) fprintf (ftype, " 3) %-8.4f %-5d # Surface brightness at FWHM [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 3) fprintf (ftype, " 3) %-8.4f %-5d # Surface brghtnss @ outer R_break [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 0) fprintf (ftype, " 3) %-8.4f %-5d # Integrated magnitude \n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # FWHM [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # Moffat powerlaw index \n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # ----- \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "ferrer", 6) == 0 ) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y \n", x, y, ia[1], ia[2]); if (fpar->normtype == 1 || fpar->normtype == 0) fprintf (ftype, " 3) %-8.4f %-5d # Central surface brghtness [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 2) fprintf (ftype, " 3) %-8.4f %-5d # Surface brightness at FWHM [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (fpar->normtype == 3) fprintf (ftype, " 3) %-8.4f %-5d # Surface brghtnss @ outer R_break [mag/arcsec^2]\n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # Outer truncation radius [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # Alpha (outer truncation sharpness) \n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # Beta (central slope)\n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "edgedisk", 8) == 0) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y\n", x, y, ia[1], ia[2]); fprintf (ftype, " 3) %-8.4f %-5d # Mu(0) [mag/arcsec^2]\n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # h_s (disk scale-height) [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # R_s (disk scale-length) [pix]\n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # ----- \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "isophote", 8) == 0) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y\n", x, y, ia[1], ia[2]); fprintf (ftype, " 3) %-8.4f %-5d # Average flux of ring [ADUs] \n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f --- # Isophote radius [pix]\n", fpar->a[4]); fprintf (ftype, " 5) %-8.4f --- # Isophote width [pix]\n", fpar->a[5]); fprintf (ftype, " 6) %-8.4f %-5d # Isophote gradient \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (strncmp (fpar->objtype, "sinc", 4) == 0) { fprintf (ftype, " 1) %-8.4f %-8.4f %d %d # Position x, y\n", x, y, ia[1], ia[2]); if (index(fpar->objtype, '/') != NULL) fprintf (ftype, " 3) %-8.4f %-5d # Surface brghtnss @ outer R_break [mag/arcsec^2]\n", fpar->a[3], ia[3]); else if (index(fpar->objtype, '\\') != NULL ) fprintf (ftype, " 3) %-8.4f %-5d # Central surface brghtness [mag/arcsec^2]\n", fpar->a[3], ia[3]); else fprintf (ftype, " 3) %-8.4f %-5d # Sinc Amplitude [counts] \n", fpar->a[3], ia[3]); fprintf (ftype, " 4) %-8.4f %-5d # Rs (sinc radius) [pix]\n", fpar->a[4], ia[4]); fprintf (ftype, " 5) %-8.4f %-5d # ----- \n", fpar->a[5], ia[5]); fprintf (ftype, " 6) %-8.4f %-5d # ----- \n", fpar->a[6], ia[6]); fprintf (ftype, " 7) %-8.4f %-5d # ----- \n", fpar->a[7], ia[7]); fprintf (ftype, " 8) %-8.4f %-5d # ----- \n", fpar->a[8], ia[8]); }; if (istrunc (fpar->objtype)) { fprintf (ftype, "T0) %-14s ", fpar->objtype); fprintf (ftype, "# Truncation type (radial, length, height)\n"); if (fpar->ia[1] != -1) { fprintf (ftype, "T1) %-8.4f %-8.4f %d %d # Position x, y \n", x, y, ia[1], ia[2]); }; if (index (fpar->objtype, '2') != NULL) { if (fpar->a[4] > fpar->a[5]) { tmp = fpar->a[4]; itmp = fpar->ia[4]; fpar->a[4] = fpar->a[5]; fpar->ia[4] = fpar->ia[5]; fpar->a[5] = tmp; fpar->ia[5] = itmp; }; }; fprintf (ftype, "T4) %-8.4f %-5d ", fpar->a[4], fpar->ia[4]); if (index (fpar->objtype, '2') != NULL) fprintf (ftype, "# Inner break radius (1%% or 99%%) [pixels]\n"); else fprintf (ftype, "# Break radius (99%% normal flux) [pixels]\n"); fprintf (ftype, "T5) %-8.4f %-5d ", fpar->a[5], fpar->ia[5]); if (index (fpar->objtype, '2') != NULL) fprintf (ftype, "# Outer break radius (99%% or 1%%) [pixels]\n"); else fprintf (ftype, "# Softening length (1%% normal flux) [pixels]\n"); if (fpar->ia[9] != -1) { fprintf (ftype, "T9) %-8.4f %-5d ", fpar->a[9], fpar->ia[9]); fprintf (ftype, "# Axis ratio (optional)\n"); fprintf (ftype, "T10) %-8.4f %-5d ", fpar->a[10], fpar->ia[10]); fprintf (ftype, "# Position angle (optional) [deg: Up=0, Left=90]\n"); }; }; if (strncmp (fpar->objtype, "sky", 3) == 0) { if (fabs(fpar->a[1]) < 0.1) fprintf (ftype, " 1) %-10.3e %-2d # Sky background at center of fitting region [ADUs]\n", fpar->a[1], fpar->ia[1]); else fprintf (ftype, " 1) %-8.4f %-5d # Sky background at center of fitting region [ADUs]\n", fpar->a[1], fpar->ia[1]); if (fabs(fpar->a[2]) < 0.1) fprintf (ftype, " 2) %-10.3e %-2d # dsky/dx (sky gradient in x) [ADUs/pix]\n", fpar->a[2], fpar->ia[2]); else fprintf (ftype, " 2) %-8.4f %-5d # dsky/dx (sky gradient in x) [ADUs/pix]\n", fpar->a[2], fpar->ia[2]); if (fabs(fpar->a[3]) < 0.1) fprintf (ftype, " 3) %-10.3e %-2d # dsky/dy (sky gradient in y) [ADUs/pix]\n", fpar->a[3], fpar->ia[3]); else fprintf (ftype, " 3) %-8.4f %-5d # dsky/dy (sky gradient in y) [ADUs/pix]\n", fpar->a[3], fpar->ia[3]); } else if (!istrunc (fpar->objtype)) { if (strncmp (fpar->objtype, "edgedisk", 8) == 0) fprintf (ftype, " 9) %-8.4f %-5d # ----- \n", fpar->a[9], fpar->ia[9]); else fprintf (ftype, " 9) %-8.4f %-5d # Axis ratio (b/a) \n", fpar->a[9], fpar->ia[9]); fprintf (ftype, "10) %-8.4f %-5d # Position angle (PA) [deg: Up=0, Left=90]\n", fpar->a[10], fpar->ia[10]); }; /**************\ * Truncation * \**************/ if (!istrunc (fpar->objtype)) { if (fpar->inner != NULL) { fprintf (ftype, "Ti) "); for (i=1; i <= fpar->inner[0]; i++) fprintf (ftype, "%2d ", fpar->inner[i]); for (i=1; i <= 7 - fpar->inner[0]; i++) fprintf (ftype, " "); fprintf (ftype, " # Inner truncation by component number(s)\n"); }; if (fpar->outer != NULL) { fprintf (ftype, "To) "); for (i=1; i <= fpar->outer[0]; i++) fprintf (ftype, "%2d ", fpar->outer[i]); for (i=1; i <= 7 - fpar->outer[0]; i++) fprintf (ftype, " "); fprintf (ftype, " # Outer truncation by component number(s)\n"); }; }; /*****************************\ * Higher order corrections * \*****************************/ f = fpar->high; while (f != NULL) { fpar->compnum = objn; /***************************\ * Bending mode components * \***************************/ if (strncmp (f->objtype, "bend", 4) == 0) { for (i=1; i <= f->npars; i ++) { if (!(f->a[i] == 0 && f->ia[i] == 0) && f->ia[i] != -1) { fprintf (ftype, "B%d) %-9.3e %-5d", i, f->a[i], f->ia[i]); fprintf (ftype, " # Bending mode %d amplitude\n", i); }; }; }; /**********************\ * Fourier components * \**********************/ if (strncmp (f->objtype, "four", 4) == 0) { for (i=1; i <= f->npars; i += 2) { mode = i / 2 + 1; if (!(f->a[i] == 0 && f->ia[i] == 0) && f->ia[i] != -1) { fprintf (ftype, "F%d) %-8.4f %-8.4f %d %d", mode, f->a[i], f->a[i+1], f->ia[i], f->ia[i+1]); fprintf (ftype, " # Azim. Fourier mode %d, amplitude, & phase angle\n", mode); }; }; }; /*********************************************************\ * Powerlaw - hyperbolic tangent position angle rotation * \*********************************************************/ if (strncmp (f->objtype, "power", 5) == 0) { fprintf (ftype, "\nR0) %-14s ", f->objtype); fprintf (ftype, "# PA rotation func. (power, log, none)\n"); fprintf (ftype, "R1) %-8.4f %-5d ", f->a[1], f->ia[1]); fprintf (ftype, "# Spiral inner (i.e. asymptotic) radius [pixels]\n"); fprintf (ftype, "R2) %-8.4f %-5d ", f->a[2], f->ia[2]); fprintf (ftype, "# Spiral outer (i.e. asymptotic) radius [pixels]\n"); fprintf (ftype, "R3) %-8.4f %-5d ", f->a[3], f->ia[3]); fprintf (ftype, "# Cumul. rotation out to outer radius [degrees]\n"); fprintf (ftype, "R4) %-8.4f %-5d ", f->a[4], f->ia[4]); fprintf (ftype, "# Asymptotic spiral powerlaw \n"); fprintf (ftype, "R9) %-8.4f %-5d ", f->a[9], f->ia[9]); fprintf (ftype, "# Inclination to L.o.S. [degrees]\n"); fprintf (ftype, "R10) %-8.4f %-5d ", f->a[10], f->ia[10]); fprintf (ftype, "# Sky position angle\n"); }; /****************************************************************\ * logarithmic - hyperbolic tanh spiral position angle rotation * \****************************************************************/ if (strncmp (f->objtype, "log", 3) == 0) { fprintf (ftype, "\nR0) %-14s ", f->objtype); fprintf (ftype, "# PA rotation func. (power, log, none)\n"); fprintf (ftype, "R1) %-8.4f %-5d ", f->a[1], f->ia[1]); fprintf (ftype, "# Spiral inner (i.e. asymptotic) radius [pixels]\n"); fprintf (ftype, "R2) %-8.4f %-5d ", f->a[2], f->ia[2]); fprintf (ftype, "# Spiral outer (i.e. asymptotic) radius [pixels]\n"); fprintf (ftype, "R3) %-8.4f %-5d ", f->a[3], f->ia[3]); fprintf (ftype, "# Cumul. rotation out to outer radius [degrees]\n"); fprintf (ftype, "R4) %-8.4f %-5d ", f->a[4], f->ia[4]); fprintf (ftype, "# Logarithmic winding scale radius \n"); fprintf (ftype, "R9) %-8.4f %-5d ", f->a[9], f->ia[9]); fprintf (ftype, "# Inclination to L.o.S. [degrees]\n"); fprintf (ftype, "R10) %-8.4f %-5d ", f->a[10], f->ia[10]); fprintf (ftype, "# Sky position angle\n"); }; /******************\ * Disky/boxyness * \******************/ if (strncmp (f->objtype, "C0", 2) == 0) { fprintf (ftype, "C0) %-8.4f %-5d # Diskyness(-)/Boxyness(+)\n", f->a[1], f->ia[1]); }; f = f->next; }; if (!istrunc (fpar->objtype)) fprintf (ftype, " Z) %-7d # Skip this model in output image? (yes=1, no=0)\n", fpar->outtype); fpar = fpar->next; fprintf (ftype, "\n"); }; fprintf (ftype, "================================================================================\n"); fprintf (ftype, "\n"); return; }