
Leaving aside the question of mismatches between an exponential modelĪnd the actual galaxy, this isn’t the best possible fit yet for our Better Fits: Telling Imfit the Truth About the Image ¶ You can use the -o commandline parameter to specify your own nameįor the outer file. Specify the output image size, or you can edit the input configurationįile so it specifies the image size there (see the main documentation).īy default, this saves the model image using the filename “model.fits” The commandline parameters -ncols and -nrows to directly “reference image” (ic3478rss_256.fits, in this case). This tells makeimage to make an image with the same dimensions as the Included in the configuration file, if you wish). Some specification for the size of the output image (this can be Program which comes with imfit it can take a best-fit parameter file You can also generate a copy of the model image using the “makeimage” Model isn’t actually a good match to the data, something we’ll try toįigure 1: log-scaled isophotes for original SDSS image (left) andīest-fitting exponential model (middle), along with linear-scaled This is a pretty good indication that the exponential Systematically bright in the center, with an oval region of negative If you look at the residual image (below, right), you can see it’s These are FITS files with the same dimensions as the data image. dat - sky = 130.14 - save - model = model. (You can specify aĭifferent name for this output file via the -save-params option.) How imfit was called and a short summary of the fit. Text file: “bestfit_parameters_imfit.dat”, which includes a record of The best-fitting parameters of the model and some crude estimates of the The end, a summary of the fit is printed (final χ2, etc.), along with Routine, which prints a minimal set of updates for each iteration. Imfit will print some preliminary information, confirming which filesĪre being used, the size of the image being fit, the image functions Some of the other examples it’s displayed on two or more lines to fit Imfit should be entered as a single line, even though in this and (Note that, as is normal for Unix-style commands, all invocations of

Use = or a space to connect an option with its argument on the Pixels in the image have slightly negative values. Sky level of 130.14 counts/pixel which was previously subtracted if weĭon’t include this, Imfit will get confused by the fact that some of the The -sky=130.14 is a note to Imfit that the image had a background To do the fit, just type (all on one line): So to start off, we’ll try fitting the image file ic3478rss_256.fits (aĢ56 x 256-pixel cutout from a DR7 SDSS r-band image of the dwarfĮlliptical galaxy IC 3478) with a simple exponential model, which isĭescribed in the configuration file config_exponential_ic3478_256.dat. Imfit requires, as a minimum, two things:Īn image in FITS format containing the data to be fit Ī configuration file describing the model you want to fit to the
Saoimage ds9 tutorial download#
If you want to download just the examples directory and its files, you Subdirectory, or copy the files there to another directory and work You can go ahead and work in the examples

Psf_moffat_51.fits – as well as some configuration files (names starting Subdirectory called “examples”, which has some images we’ll be using in In both the binary-only and source-code distributions, there is a
Saoimage ds9 tutorial code#
To get started with Imfit, you need to download the pre-compiled binaryĭistribution for your platform (Mac or Linux), or else download andĬompile the source code links to both can be found on the main imfitĬompile the source code can be found in the Imfit Parameter Uncertainties and Correlations: Bootstrap and Inspecting the Fit: Model Images and Residualsīetter Fits: Telling Imfit the Truth About theĬhi-Squared and All That: Using Different Fit Getting Started with Imfit: Tutorial ¶ Contents: ¶
