]> Merge multiple SD structures

Merge Multiple SD Structures

mergeSD() merges multiple SD structures into a single combined SD structure. The measurement lists are concatenated in the order passed to the function (i.e., SD1.MeasList then SD2.MeasList and so on). As part of the merge, duplicate SD field entries are removed and the contents of the field are sorted according to their numerical value. Thus, while the order of measurements in the measurement list does not change, the individual values inside the measurement list may.

Function Summary

Syntax: SD = mergeSD(SD1, SD2, ...);
Inputs: SD1, SD2, ... The SD structures to be merged
Outputs: SD A single SD structure with all the information in the original set of structures.

Detailed Descriptions

mergeSD() has problems with SD.SrcAmp and SD.DetAmp since there is no obvious way to decide which value is the correct one to use. For now, it's best if SD.SrcAmp and SD.DetAmp is deleted from all the SD structures before calling mergeSD().