astropy:docs

DolphotParameters

class delphinus.delphinus.DolphotParameters(PSFPhot=2, FitSky=1, SkipSky=1, SkySig=2.25, SigFind=2.5, SigFindMult=0.85, SigFinal=3.0, MaxIT=25, NoiseMult=0.25, FSat=0.999, Zero=25.0, RCentroid=3, PosStep=0.6, dPosMax=3.0, RCombine=1.75, FPSF='G+L', sigPSF=10, PSFStep=0.25, MinS=1.0, MaxS=9.0, MaxE=0.5, UseWCS=0, Align=3, Rotate=1, secondPass=1, SearchMode=1, Force1=0, EPSF=1, PSFsol=0, PSFres=1, psfstars=None, psfoff=0.0, ApCor=0, SubPixel=1, FakeStars=None, FakeMatch=3.0, FakeStarPSF=0, FakePSF=1.5, RandomFake=1, xytfile=None, xytpsf=None, photsec=None)[source]

Bases: object

Handles parameters for Dolphot.

General parameters are initialzed upon instantiation, while parameters for individual images are specified in the setup_image command.

Parameters :

PSFPhot : int

Type of photometry to be run. Options are

  • 0 (aperture),
  • 1 (standard PSF-fit)
  • 2 (PSF-fit weighted for central pixels).

Option 1 is suggested for most photometric needs, but option 0 can provide superior photometry if the signal-to- noise is high and the field is uncrowded.

FitSky : int

Sky-fitting setting. Options are

  • 0 (use the sky map from calcsky)
  • 1 (fit the sky normally prior to each photometry measurement)
  • 2 (fit the sky inside the PSF region but outside the photometry aperture),
  • 3 (fit the sky within the photometry aperture as a 2-parameter PSF fit), and
  • 4 (fit the sky within the photometry aperture as a 4-parameter PSF fit).

Options 1 and 3 are the suggested settings. Option 0 should be used only if the field is very uncrowded; option 2 can be used in extremely crowded fields; option 4 can help in fields with strong background gradients (though I have yet to see this be useful).

RCentroid : int

The centroid used for obtaining initial positions of stars is a square of size 2RCentroid + 1 on each side.

SigFind : real

Sigma detection threshold. Stars above this limit will be kept in the photometry until the final output.

SigFindMult : real

Multiple for sigma detection threshold in initial finding algorithm. This should be close to one for larger PSFs, and as low as 0.75 for badly undersampled PSFs.

SigFinal : real

Sigma threshold for a star to be listed in the final photometry list. To get all stars, set SigFinal equal to SigFind.

MaxIT : int

Maximum number of photometry iterations.

FSPS : str

The functional form of the analytic PSF. Allowable options are “Gauss” (Gaussian), “Lorentz” (Lorentzian), “Lorentz2” (a squared Lorentzian), and “G+L” (sum of Gaussian and Lorentzian).

SkipSky : int

Sampling of sky annulus; set to a number higher than 1 to gain speed at the expense of precision. This is only used if FitSky is set to 1. In general, this should never be larger than the FWHM of the PSF.

SkySig : real

Sigma rejection threshold for sky fit; only used if FitSky is set to 1.

NoiseMult : real

To allow for imperfect PSFs, the noise is increased by this value times the star brightness in the pixel when computing chi values.

FSat : real

Fraction of nominal saturation for which pixesl are considered saturated.

Zero : real

Zero point for a star of brightness 1 DN per second.

PosStep : real

Typical stepsize in x and y during photometry iterations. Should be set to a factor of a few smaller than the PSF FHWM.

dPosMax : real

Maximum position change of a star during a single photometry iteration. Note that this parameter is currently ignored.

RCombine : real

Minimum separation of two stars (they will be combined if they become closer than this value). This value can generally be about 2/3 of the PSF FWHM, but no less than 1.42.

sigPSF : real

Minimum signal-to-noise for a PSF solution to be attempted on a star. Fainter detections are assigned type 2.

PSFStep : real

Typical stepsize of FWHM during photometry iterations. Setting to zero will replace PSF solution with three-state solution in which a star will be very small, fit the stellar PSF, or very large.

MinS : real

Minimum FWHM for a good star (type 1). This should be set to something like half the PSF FWHM.

MaxS : real

Maximum FWHM for a good star (type 1). This needs to be set to something larger than the FWHM of the PSF.

MaxE : real

Maximum ellipticity for a good star (type 1).

UseWCS : int

Use WCS header information for alignment? Allowed values are 0 (no), 1 (use to estimate shift, scale, and rotation), or 2 (use to estimate a full distortion solution). Note that any shifts or rotations selected by img shift and img xform are applied in addition to what is determined by the WCS solution. If reducing HST data, selecting UseWCS=1 can eliminate the need for running the fitdistort utilities. UseWCS=2 generally is not recommended for HST data since the distortion coefficients provided with DOLPHOT provide higher-order corrections than do the WCS headers.

Align : int

Align images to reference? Allowed values are 0 (no), 1 (x/y offsets only), 2 (x/y offsets plus scale difference), and 3 (x/y offsets plus distortion).

Rotate : int

Correct for rotation in alignment? Allowed values are 0 (no) and 1 (yes).

SecondPass : int

Number of additional passes when finding stars to locate stars in the wings of brighter stars. Must be a non-negative value.

SearchMode : int

Sets the minimization used to determine star positions. Allowed values are 0 (chi divided by SNR) and 1 (chi only). A value of one appear safe for all applications. A value of zero has been seen to fail if images of very different exposure times are used together.

Force1 : int

Force all objects to be of class 1 or 2? Allowed values are 0 (no) and 1 (yes). For crowded stellar fields, this should be set to 1 and the chiand sharpness values used to discard extended objects.

EPSF : int

Allow elliptical PSFs in parameter fits? Allowed values are 0 (no) and 1 (yes).

PSFsol : int

Make analytic PSF solution? Allowed values are -1 (no), 0 (constant PSF), 1 (linear PSF variation), and 2 (quadratic PSF variation).

PSFres : int

Solve for PSF residual image? Allowed values are 0 (no) and 1 (yes). Turning this feature off can create nonlinearities in the photometry unless PSFphot is also set to zero.

psfstars : str or None

Specify coordinates of PSF stars. The file must contain extension, chip, X, and Y (the first four columns of DOLPHOT output).

psfoff : real

Coordinate offset of PSF star list. Values equal the list coordinates minus the DOLPHOT coordinates, and would thus be 0.5 if using a DAOPHOT or IRAF star list.

ApCor : int

Make aperture corrections? Allowed values are 0 (no) and 1 (yes). Default aperture corrections always have the potential for error, so it is strongly recommended that you manually examine the raw output from this process.

SubPixel : int

The number of PSF calculations made per dimension per pixel. For Nyquist-sampled images, this can be set to 1, but very small PSFs require the extra precision.

FakeStars : str or None

Run DOLPHOT in artificial star mode. The FakeStars parameter is the name of the text file containing the artificial star data. The file should contain the following information for each star, one star per line: extension (0 = main image), chip (usually 1), X, Y, and the number of counts on each image. If the warmstart option is being used, one also needs to specify the recovered X, Y, and object type values before the counts. Note that photometry must be run first; the photometry list, PSFs, etc. from DOLPHOT are used as inputs in the fake star routine.

FakeMatch : real

Maximum allowable distance between input and recovered artificial star.

FakePSF : real

Approximate FWHM of the image, used to determine which of two input stars a recovered star should be matched with.

FakeStarPSF : int

Use PSF residual from initial photometry run. This should be left at zero, unless the PSF residuals are small and well-measured.

RandomFake : int

Apply Poisson noise to fake stars when adding them. This should always be used, unless running fake star tests twice (once with and once without) to quantify photometric errors from crowding and background independently of the errors due to photon noise.

xytfile : str or None

star list filename for warmstart

xytpsf : str or None

PSF solution for the reference image for difference image photomtry.

photsec : list or None

Optinally, specify a subset fo the image to be photometered (relative to first image, or referene image). Pass a list of six integer values: extension (usually 0), Z (usually 1), minimum X, minimum Y, maximum X, maximum Y.

Methods Summary

setup_image(path[, psfA, psfB, psfC, shift, ...]) Configure the fitting parameters for a single image.
write_parameters(path) Write the parameter file to path.

Methods Documentation

setup_image(path, psfA=(3, 0, 0, 0, 0, 0), psfB=(3, 0, 0, 0, 0, 0), psfC=(0, 0, 0, 0, 0, 0), shift=(0, 0), xform=(1, 0, 0), aprad=20, apsky=(30, 50), RAper=2.5, RSky=(4.0, 10.0), RChi=None, RPSF=15, ref=False)[source]

Configure the fitting parameters for a single image. This may also be the reference image if ref=True is set.

Parameters :

path : str

file path of FITS file (without the .fits suffix)

psfA : tuple

PSF XX term, length 6. Set the PSF x-FWHM and linear and quadratic variations. This value can be an initial guess that is later adjusted by DOLPHOT.

psfB : tuple

PSF YY term, length 6. Set the PSF y-FWHM and linear and quadratic variations. This value can be an initial guess that is later adjusted by DOLPHOT.

psfC : tuple

PSF XY term, length 6. Set the PSF eccentricity and linear and quadratic variations. This value can be an initial guess that is later adjusted by DOLPHOT.

shift : tuple

x,y shifts relative to reference. Set offset of image relative to reference. This value can be an initial guess that is later adjusted by DOLPHOT. Values are x and y on the image minus x and y on the reference image. Note that this parameter should not be set for the reference image.

xform : tuple

Set the scale ratio, cubic distortion, and rotation of the image relative to the reference image. This value can be an initial guess that is later ad- justed by DOLPHOT. Note that this parameter should not be set for the reference image.

aprad : real

Radius for aperture correction

apsky : tuple

Set the inner and outer radii of the annulus used for calculating sky values for aperture corrections.

raper : real

Sets the size of the aperture within which photometry will be performed. For FitSky=0 or 1, this should include most of the light of the star. For FitSky=2, 3, or 4 options, this should also include significant “sky” area outside the star.

rsky : tuple

Inner, outer radius for computing sky values, if FitSky=1 is being used. This should be outside the bulk of the light from the star. Outer radius should be sufficiently large to compute an accurate sky.

rpsf : int

Size of the PSF used for star subtraction. The rule of thumb is to make sure this is sufficiently large that significant unsubtracted star light is not seen beyond the subtracted regions in the residual image.

rchi : real

Sets the size of the aperture within which the chi value will be calculated. This is used to determine object locations. This should generally include only the peak of the stellar PSF. RChi cannot be larger than RAper. If not defined, RChi is set equal to RAper.

ref : bool

set as True if this is the reference image, False otherwise

write_parameters(path)[source]

Write the parameter file to path.

Page Contents