Function Eint_ledDir - Energy Integration of Lev-3 LED Direction Spectra TM-formats: f30, f40, f50
function Eint_LedDir__1_3, inpChannels,
intPeriodCounts,
EILD_CHS_ALL = allChs,
EILD_CHS_P = pChs,
EILD_CHS_HE = heChs,
EILD_INFO = info,
EILD_JUSTINFO = justinfo,
EILD_NOI = noinit,
_REF_EXTRA = relyparams
Version 1.3
Calling sequences:
data = Eint_leddir__1_3(inpChannels,intPeriodCounts)
data = Eint_leddir_l3f30(inpChannels,intPeriodCounts)
data = Eint_leddir_l3f40(inpChannels,intPeriodCounts)
data = Eint_leddir_l3f50(inpChannels,intPeriodCounts)
data = Eint_leddir(inpChannels,intPeriodCounts)
Input parameters:
inpChannels Vector of level-3 LED direction spectra records of type 'TledDirSpectra_a'
intPeriodCounts Either:
a) a vector containing the number of time integrated measurement periods in each
input channel record. Because of lost measurement frames the exact numbers
usually vary from record to record.
b) a scalar value (typically 1), indicating the number of periods in each record.
The parameter will be expanded to a vector with this value at each element.
This option is provided mainly for cases where no time integration has been
done so each record represents exactly one integration period.
Returns:
Vector of level-3 LED direction spectra records of a custom type.
Keyword parameters:
EILD_CHS_ALL allChs
Default is to return only the common channels of the LED-I (thin) and LED-II (thick) detectors,
discarding the 'LED-I only' low energy channels (for both p and He4). In case the keyword
'EILD_CHS_ALL' is set all the channels are returned.
NOTE: if either of the 'EILD_CHS_P' or 'EILD_CHS_HE' keywords are set they take precedence
over 'EILD_CHS_ALL' for that isotope. So if both are set then 'EILD_CHS_ALL' is ignored
alltogether.
EILD_CHS_P pChs
Channel selector for the protons. Three forms are recognized:
1) Negative scalar or an array with negative first element, results in no proton data in the
return structure.
2) Integer array with dimension n_pCh, the elements give the minimum energy indices of the input
record for each of the n_pCh output channels. The maximum indices are taken to be one less
than 'next' minimum index. The last channel is assumed to extend to the highest input energy
(last maximum index = 15 for protons).
There is no limit to the number of output bins, the number is deduced from the total number
of elements in the vector.
NOTE: The successive values of the input array are assumed to be in a monotonously increasing
order and fall within the index range of the input channels (range = [0,15] for protons).
Failing this will produce an error.
3) Matrix ([n_pCh,2]) gives the minimum and maximum energy index of the input record for each
output energy bin. Number of the output bins is n_pCh. Second index is the min/max (0=min,1=max)
LED direction energy index in the input record. There is no limit to the number of output
bins, the number is deduced from the total number of elements in the matrix.
NOTE: The corresponding index pairs are assumed to fullfill requirement: min <= max, and
fall within the index range of the input channels (range = [0,15] for protons).
Failing this will produce an error.
EILD_CHS_HE heChs
Channel selector for the he4. Three forms are recognized:
1) Negative scalar or an array with negative first element, results in no helium data in the
return structure.
2) Integer array with dimension n_heCh, the elements give the minimum energy indices of the input
record for each of the n_heCh output channels. The maximum indices are taken to be one less
than 'next' minimum index. The last channel is assumed to extend to the highest input energy
(last maximum index = 7 for he4).
There is no limit to the number of output bins, the number is deduced from the total number
of elements in the vector.
NOTE: The successive values of the input array are assumed to be in a monotonously increasing
order and fall within the index range of the input channels (range = [0,7] for he4).
Failing this will produce an error.
3) Matrix ([n_heCh,2]) gives the minimum and maximum energy index of the input record for each
output energy bin. Number of the output bins is n_heCh. Second index is the min/max (0=min,1=max)
LED direction energy index in the input record. There is no limit to the number of output
bins, the number is deduced from the total number of elements in the matrix.
NOTE: The corresponding index pairs are assumed to fullfill requirement: min <= max, and
fall within the index range of the input channels (range = [0,7] for he4).
Failing this will produce an error.
EILD_INFO info
Returns a structured variable containing information about the selected energy bins.
EILD_JUSTINFO justinfo
If set the program returns the info-structure instead of the regular array of integration result
structures.
EILD_NOI noinit
If set the initialization section is skipped. This will speed up the execution
if the function is being called several times with same control parameter set
(the parameters are stored in a common block between successive calls).
NOTE: In the current version the channel selections are identical between the D1-detectors. There is no
way to i.e., have output channel 0 for D11 to combine level-3 channels 0, 1 and 2 while at the same
have the output channel 0 for D12 combine D12 level-3 channels 6 and 7.
Version history:
1.3 - 2007-05-23 (ER)
Added handling of a scalar form of input parameter 'intPeriodCounts'.
1.2 - 2007-02-21 (ER)
Added the LED D1-direction fields in the information record.
1.1 - 2007-02-14 (ER)
Several modifications:
1) Uses new verion of the LED dir spectra parameter reader 'read_lev3_ledDirSpectraPara.1.1.pro'
that returns an updated format of the parameter record.
2) More options for the channel selection keywords.
3) Changed default action. Now returns just the common channels of the LED-I and LED-II detectors.
4) Added keyword 'EILD_CHS_ALL'.
1.0 - 2007-01-30 (ER)
Original version based on onboard spectra energy intregration filter Eint.1.10 (and/or Eint.3.10).