;+ ; Procedure: ; thm_get_fbk_cal_pars ; ; Purpose: ; Given the signal source, and begin and end of the time interval, ; return the filter bank RAW->PHYS transformation parameters. ; ; Calling Sequence: ; thm_get_fbk_cal_pars, tbeg, tend, fb_sel, cal_pars=cal_pars ; Arguements: ; tbeg, tend DOUBLE, time in seconds since THEMIS epoch. ; fb_sel INT, FilterBank source selection indicator. ; cal_pars STRUCT, see Notes below for elements. ; ; ; Notes: ; -- use of TBEG and TEND for time-dependent calibration parameters is not currently implemented! ; -- E-field gains and units are for voltages, not fields, since we have not deployed yet! ; -- Elements of cal_pars are as follows: ; gain, FLOAT, gain of source channel at 0 dB response in (phys unit)/ADC. ; freq_resp FLOAT[ 6], effective attenuation factor for source channel for each ; of the six FilterBank channels. ; ; $LastChangedBy: pcruce $ ; $LastChangedDate: 2007-07-11 15:37:09 -0700 (Wed, 11 Jul 2007) $ ; $LastChangedRevision: 1074 $ ; $URL $ ;- pro thm_get_fbk_cal_pars, tbeg, tend, fb_sel, cal_pars=cal_pars ; attenuation factors from Flight model measurements plus modeling; ; JWB, UCBSSL, 1 Feb 2007. cal_par_time = '2002-01-01/00:00:00' units_scm = 'nT' units_edc = 'mV/m' ; <--- NOTE that E-field units are Volts!!! units_eac = 'mV/m' ; <--- NOTE that E-field units are Volts!!! ;now they're in mV/m.... units_v = 'V' scm_resp = [ 25.0, 5.6, 1.8, 1.0, 1.4, 3.6] spb_resp = [ 1.0, 1.0, 1.0, 1.2, 1.6, 1.7] axb_resp = [ 1.0, 1.0, 1.0, 1.2, 2.0, 2.5] eac_resp = [ 3.2, 1.8, 1.0, 1.0, 1.0, 1.0] adc_factor = 1.0/float( 2L^16 - 1L) gain_v = 2.0*105.2*adc_factor gain_edc = 2.0*15.0*adc_factor gain_eac = 2.0*2.54*adc_factor gain_scm = 2.0*5.0*adc_factor case 1 of (fb_sel ge 0) and (fb_sel le 3): begin ; SPB V channels. gain = gain_v freq_resp = spb_resp units = units_v end (fb_sel ge 4) and (fb_sel le 5): begin ; AXB V channels. gain = gain_v freq_resp = axb_resp units = units_v end (fb_sel ge 6) and (fb_sel le 7): begin ; SPB EDC channels. gain = gain_edc freq_resp = spb_resp units = units_edc end (fb_sel eq 8): begin ; AXB EDC channels. gain = gain_edc freq_resp = axb_resp units = units_edc end (fb_sel ge 9) and (fb_sel le 11): begin ; SCM channels. gain = gain_scm freq_resp = scm_resp units = units_scm end (fb_sel ge 12) and (fb_sel le 13): begin ; SPB EAC channels. gain = gain_eac freq_resp = spb_resp*eac_resp units = units_eac end (fb_sel eq 14): begin ; SPB EAC channels. gain = gain_eac freq_resp = axb_resp*eac_resp units = units_eac end else: begin ; invalid source selection. gain = !values.f_nan freq_resp = !values.f_nan*fltarr( 6) units = 'undef' end endcase cal_pars = { $ cal_par_time:cal_par_time, $ gain:gain, freq_resp:freq_resp, units:units $ } return end