SF

Enter source finding subsystem.

I : Interrogate a position L : Locate sources N : New source list (from last Locate run) P : Plot [S|B|Psf|SD|@model] Q : Quit and return to main program SE/SH: Set/Show a parameter values ? : Write out this menu

Fit

Fit [n] position

This command fits n star models. If n is omitted, then it defaults to 1. The first position entered will define the center of the square region that extends out to +/- brad.

The result will be written to tmp.mod file.

Example:

Fit 2 C C      ! Fit two stars and use the cursor to denote the position

F1

F1 infile position

This command does the same thing as FFile but only for a single row in the file. The row selected is the one that has a position closest to the position specified.

FFile

FFile infile outfile [cols]

This fits all the objects listed in infile and writes the result of the fit to outfile.

Cols is optional and is a list of FITS columns to include in the output file. These columns can be name(s) of any column in the infile which would then be copied to the outfile (such as BMAG). Cols can also include +RA, +DEC, +XERR, +YERR which writes out additional information that FF calculates. The X,Y center from the fit is always written, but if +RA,+DEC is specified, then X,Y is converted to RA,Dec and also written to outfile. +XERR,+YERR reports how much the position changed (in pixels) from infile to outfile.

Note: if the input file is the output from a previous run, then FF will use values read from the input file to initialize the fit parameters. If FF uses initial values that it creates, then all the sources in the patch being fitted will have the same shape (sigma and rotation angle). When using values read from the file, the parameters for nearby sources are still fixed, but now at the values read from the file.

Example:

FFile a2star.fits out.fits RA(ICRS),DEC(ICRS),+XERR,+YERR

Interrogate

This will prompt you for a position and any lextrct position is accepted. This runs the source finding on a single pixel and reports the significance of a source at that location. This is useful if you know the position of a source and want to set an upper limit. (Of course it is also useful for testing.)

Locate

This will cause lextrct to check every pixel in the current bounds for sources. The current method (either Mvue or CellDetect) is used.

Cell detect is old method of source finding is only provided since it is easy to implement. In general it is not as good as newer methods and hence should be be used. For cell detect, srad is effectively the detect cell size and so the detection efficiency does depend on this value. It has been recommended using 1.8 for srad is an "optimum" value.

For Mvue all pixels out to a brad*PSF_SIG are considered. For each pixel, the fraction of the PSF (fPSF) that lies in that pixel is computed and compared to the number of counts detected. This is done via a least squares fit to a straight line where the X coordinate is fPSF and the Y coordinate is the number of counts. The slope of the line is Sest (the source estimator or the number of counts from the source). The uncertainty in the slope needs to be calculated using proper counting statistics, since the equations in Bevington do not apply.

negative_data

Since the MVUE method assumes that the variance in the data is equal to the data value, it will fail if this assumption is not met. In particular negative data values could result in imaginary errors (which would appear as NaN's). Thus the sfmvue method will refuse to run if any data values are negative.

There are two ways to deal with this:

First, if the negative values represent bad data values, then you should mark these points bad using "MBad Lower 0.0".

Second, if the image has been background subtracted such that negative values represent statistical fluctuations, then the data should be scaled. An easy way to do this is to use the IScale command. If the data minimum is -100, the quickest way to fix this is to issue the "IScale -100" to subtract a -100 from all data values. A more accurate way is to rescale the data to make the variance match the data values over as large a range as possible. For optical CCDs the value should be the numbers of electrons (from both read noise and source photons) in each pixel.

counts

The estimated number of counts for the source. Uses

counts = (csumi - csumo*icnti/icnto)/psumi

where csumX is the number of counts in region X, icntX is the number of pixels in the region, and psumX the the sum of the model PSF in region X. The region X is either i for "inner" for pixels inside srad*PSF_SIG and o for "outer" for pixels outside the inner region and inside brad*PSF_SIG.

sest

For a source located at the center, a least squares fit is done to the counts vs fPSF. With no errors (either in the counts or the PSF model) then the slope is the number of counts from the source and the intercept is the background level. Of course, there are errors and as a result the sest is only an approximation to the source rate. In general, the variable called counts provides a better estimate of the source counts and should be used instead of sest to get the source flux. Sest and counts tend to be highly correlated and gross differences suggest problems such as a nearby confusing source.

Note you can make sest is closer to counts if you set psf sig quad to 4.5e-6 for ACIS. However, the preferred value of 7.0e-6 is more optimum for source finding.

New

This produces exactly the same output as the Locate command does but does not cause the source finding algorithm to be rerun. This is useful if want to change your detection threshold.

Plot

This plots various arrays. The most common is plot with no argument which just replots the data array. I.e., you don't have to return to the LEXTRCT> prompt to replot the data. Other options are

Plot Background to plot the estimated background.

Plot Excess to plot excess map.

Plot Source to plot the estimated source counts.

Plot SDev to plot sigma (noise).

Plot SNR to plot the signal to noise ratio.

Plot @ model, an experimental really fancy way to display PLT models.

SE/SH

SF> sh Method Mvue STatis ML Brad 6.000 *PSF_SIG Srad 2.500 *PSF_SIG FRee PWN FPix 0.333 PThr 0 LMax SOR

Method can be either MVUE for minimum variance (the standard) or CD for Cell detect. Cell detect is rather primitive but easy to implement and similar to the CXC provided cell detect software.

Statistic can be either ML for Liklihood or Chi for Chi^2. The default is ML which is typically good for Chandra data with small number of counts per pixel. However, the background or source can go negative and this will prevent ML from working. For these cases try Chi^2.

Brad is the background radius measured in terms of the local value for the PSF sigma. Only pixels inside a circle defined by brad will be used in source detection.

Srad is the source radius and is not directly used by MVUE, but for cell detect is the radius considered to be dominated by source counts.

FREe can be any characters from PWN. When fitting sources using FF or F1 commands, FREe specifies how free the parameters for the central source are. If FREe contains P, the position is allowed to vary, W allows the width parameters to vary and N allows the norms to vary. Using FREe=N would be a good way to measure the count rate for a known source that is otherwise be undetected.

FPix defines the minimum acceptable fraction of pixels for source finding to consider a valid location. Pixels are excluded if they are not in the current data array (for obvious reasons!), or contain the no data value for example, marked bad with the MBad command, or have been masked in the previous source finding run.

PThr is the minimum value of the PSF that should be considered in the source region. This is typically 0 so that only Srad and Brad define the source and background regions.

LMax specifies the array to look for a local maximum. A source is defined when the SNR exceeds the specified threshold and there is a local maximum in the specified array. Since SNR is a ratio of two numbers that both increase near sources, peaks due to sources are not very sharp. By using the default Sor array to look for peaks increases the ability to resolve closely separated sources.


Return to lextrct main page.