Welcome to iraf.net Wednesday, April 24 2024 @ 08:41 PM GMT



IDENTIFY Database

IDENTIFY Database

    The IDENTIFY database specified by the parameter database is a directory of simple text files. The text files have names beginning with 'id' followed by the entry name, usually the name of the image. The database text files consist of a number of records. A record begins with a line starting with the keyword "begin". The rest of the line is the record identifier. Records read and written by identify have "identify" as the first word of the identifier. Following this is a name which may be specified following the ":read" or ":write" commands. If no name is specified then the image name is used. For 1D spectra the database entry includes the aperture number and so to read a solution from a aperture different than the current image and aperture number must be specified. For 2D/3D images the entry name has the 1D image section which is what is specified to read the entry. The lines following the record identifier contain the feature information and dispersion function coefficients.

    The dispersion function is saved in the database as a series of coefficients. The section containing the coefficients starts with the keyword "coefficients" and the number of coefficients.

    The first four coefficients define the type of function, the order or number of spline pieces, and the range of the independent variable (the line or column coordinate along the dispersion). The first coefficient is the function type code with values:

    	Code	Type
    	   1	Chebyshev polynomial
    	   2	Legendre polynomial
    	   3	Cubic spline
    	   4	Linear spline
    

    The second coefficient is the order (actually the number of terms) of the polynomial or the number of pieces in the spline.

    The next two coefficients are the range of the independent variable over which the function is defined. These values are used to normalize the input variable to the range -1 to 1 in the polynomial functions. If the independent variable is x and the normalized variable is n, then

    	n = (2 * x - (xmax + xmin)) / (xmax - xmin)
    

    where xmin and xmax are the two coefficients.

    The spline functions divide the range into the specified number of pieces. A spline coordinate s and the nearest integer below s, denoted as j, are defined by

    	s = (x - xmin) / (xmax - xmin) * npieces
    	j = integer part of s
    

    where npieces are the number of pieces.

    The remaining coefficients are those for the appropriate function. The number of coefficients is either the same as the function order for the polynomials, npieces+1 for the linear spline, or npieces + 3 for the cubic spline.

    1. Chebyshev Polynomial

    The polynomial can be expressed as the sum

    	y = sum from i=1 to order {c_i * z_i}
    

    where the the c_i are the coefficients and the z_i are defined interactively as:

    	z_1 = 1
    	z_2 = n
    	z_i = 2 * n * z_{i-1} - z_{i-2}
    

    2. Legendre Polynomial

    The polynomial can be expressed as the sum

    	y = sum from i=1 to order {c_i * z_i}
    

    where the the c_i are the coefficients and the z_i are defined interactively as:

    	z_1 = 1
    	z_2 = n
    	z_i = ((2*i-3) * n * z_{i-1} - (i-2) * z_{i-2}) / (i-1)
    

    3. Linear Spline

    The linear spline is evaluated as

    	y = c_j * a + c_{j+1} * b
    

    where j is as defined earlier and a and b are fractional difference between s and the nearest integers above and below

    	a = (j + 1) - s
    	b = s - j
    

    4. Cubic Spline

    The cubic spline is evaluated as

    	y = sum from i=0 to 3 {c_{i+j} * z_i}
    

    where j is as defined earlier. The term z_i are computed from a and b, as defined earlier, as follows

    	z_0 = a**3
    	z_1 = 1 + 3 * a * (1 + a * b)
    	z_2 = 1 + 3 * b * (1 + a * b)
    	z_3 = b**3
    


Privacy Policy
Terms of Use

User Functions

Login