STScI Logo

filterphot stsdas.analysis.timeseries


NAME · USAGE · DESCRIPTION · PARAMETERS · EXAMPLES · BUGS · REFERENCES
SEE_ALSO

NAME

filterphot -- Compute instrumental or standard magnitudes and colors.

USAGE

filterphot infile1 infile2 inmask1 inmask2 outfile outmask option coeff1 coeff2 coeff3 datafill

DESCRIPTION

This task computes the instrumental magnitudes and the colors of objects from their intensities and can also used to transform these magnitudes and colors to standard photometric systems. Four methods are available, and the user selects the operation to be performed; these operations are described below.

Instrumental magnitudes can be computed from intensity measurements.
The instrumental magnitude (IM) is calculated from the instrumental intensity (I) according to the following formula:

IM = -2.5 * LOG (I) + IM0

Where IM0 is the magnitude zero point constant (the coeff1 parameter) and LOG represents the common logarithm function.

Instrumental colors can be computed from two intensity measurements.
The instrumental color (IC) is calculated from the instrumental intensity measurements (I1) and (I2) obtained through different filters according to the following formula:

IC = -2.5 * LOG (I1 / I2) + IC0

Where IC0 is the color zero point constant (the coeff1 parameter) and LOG represents the common logarithm function.

Instrumental magnitudes can be transformed to a standard photometric system. The standardized magnitude (SM) is calculated from the instrumental magnitude (IM) and an appropriate (i.e., standard) color (C') according to the formula:

SM = a + b * IM + c * C'

where a, b and c are magnitude transformation constants (i.e., a = coeff1, b = coeff2, and c = coeff3; see parameters below).

Instrumental colors can be transformed to a standard photometric
system. The standardized color (SC) is calculated from the instrumental colors (IC) and (optionally) a certain apropriate color (C') based on the formula:

SC = r + s * IC + t * C'

where r, s and t color transformation constants (i.e., r = coeff1, s = coeff2, and t = coeff3).

This procedure assumes that the input measurements are calibrated count rates. Sometimes, the transformation of magnitudes or colors to a standard photometric system requires a formula more complicated than those which have been implemented. Multiple invocations of this procedure can be used to effect the transformation. For example, in the Stromgren uvby system, the metallicity index m1 is defined as m1 = (v-b) - (b-y). In order to get m1, we need to run this task three times: first to get the (instrumental) colors (v-b) and (b-y) separately from the observed intensities (option = instcol), then to recalculate m1 (instrumental) from (v-b) and (b-y) using option = instcol.

The following table summarizes how the input and output files are related to the operation option:

(Option)  Output file  Input file 1   	    Input file 2         coeff
--------  -----------  ------------         ------------         -----
(instmag) Inst. mag    Inst.intens (or mag) none           	  1 
(instcol) Inst. colors Inst.intens (or mag) Inst.intens (or mag)  1
(stdmag)  Std. mag     Inst.insten (or mag) Inst.colors   	  3
(stdcol)  Std. colors  Inst.colors   	    Inst.colors   	  3

Note that the second input file is not required if the third magnitude/color transformation constant is zero (0.0). Thus the relevant equations for each case would be:

Option    Equation
-------   -----------------------------------------------------------
instmag   Output = -2.5 * log(Input1) + coeff1 	
					if input's BUNIT is not 'MAG'
	  OR     = input1 + coeff1	if input's BUNIT is 'MAG'

instcol   Output = -2.5 * [log(Input1) - log(Input2)] + coeff1	
					if inputs' BUNITs are not 'MAG'
	  OR 	 = input1 - input2 + coeff1	
					if inputs' BUNITs are 'MAG'

stdmag    Output = coeff1 + coeff2*Input1 + coeff3*Input2
					if input1's BUNIT is 'MAG'
	  OR	 = coeff1 + coeff2*[-2.5*log(Input1)] + coeff3*Input2
					if input1's BUNIT is not 'MAG'

stdcol    Output = coeff1 + coeff2*Input1 + coeff3*Input2

Note: The BUNIT in infile2 must be contain the value "MAG" if the option parameter is set to either "stdmag" or "stdcol" and the BUNIT in infile1 must be set to "MAG" if option = stdcol. The character string in BUNIT is always treated as "MAG" even if, for example, it contains "MAG**2"--the file is treated as magnitude measurements rather than intensities.

PARAMETERS

infile= "" [string]
Name of the first input data file (templates are allowed).
infile= "" [string]
Name of the second input data file (templates are allowed).
inmask= "" [string]
Name of the first input mask file (optional).
inmask= "" [string]
Name of the second input mask file (optional).
outfile = "" [string]
Name of the output data file (this can be a template if multiple files are being processed).
outmask = "" [string]
Name of the output mask file. There will always be an output mask file for each corresponding output data file.
option = "" [string, allowed values = instmag | instcol |
stdmag | stdcol]

Operation to be performed (as described in the following chart, and in more detail above).

Value      Operation
---------------------------------------------------------------
instmag    Compute Instrumental Magnitudes
instcol    Compute Instrumental Colors
stdmag     Transform Instrumental Magnitudes to standard system
stdcol     Transform Instrumental Colors to standard system
coeff= 0. [real]
First transformation coefficient.

Notice that only transformation to standard magnitudes or colors ("stdmag", "stdcol") requires 3 constants, while instrumental options ("instmag" and "instcol") require only one constant (i.e., coeff1). Note that coeff1 always corresponds to the offset (zero point) term, while for the "stdmag" and "stdcol" options, coeff2 is the factor multiplying the first file and coeff3 is the factor multiplying the second file.

coeff= 0. [real]
Second transformation coefficient (see description of coeff1).
coeff= 0. [real]
Third transformation coefficient (see description of coeff1).
datafill = 1. [real]
Fill value for bad data in the output data file.

EXAMPLES

1. Calculate instrument magnitudes from the input file infile1.c0h and put the results in im.hhh and its data quality file immask.hhh. Use -10. as the magnitude zero point:


ti> filterphot infile1.c0h "" "" "" im.hhh immask.hhh "instmag" -10.

2. Calculate instrument colors from the input files b.hhh and v.hhh. The output file is bminusv.hhh and its data quality file is bminusvmask.hhh. Use 0.2 as the color zero point:


ti> filterphot b.hhh v.hhh "" "" b-v.hhh b-vmask.hhh "instcol" 0.2

BUGS

REFERENCES

SEE ALSO


Source Code · Package Help · Search Form · STSDAS