| filterphot | stsdas.analysis.timeseries | filterphot |
filterphot -- Compute instrumental or standard magnitudes and colors.
filterphot infile1 infile2 inmask1 inmask2 outfile outmask option coeff1 coeff2 coeff3 datafill
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.
IM = -2.5 * LOG (I) + IM0
Where IM0 is the magnitude zero point constant (the coeff1 parameter) and LOG represents the common logarithm function.
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.
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).
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.
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
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.
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