Add Inputs For Van Vleck Sampler Levels and DC Offsets To SDFITS
Currently the spectrometer software balances the spectrometer incorrectly. This may be hiding DC offsets and is possibly causing the use of invalid parameters in the current SDFITS van Vleck code. The DC offset and sampler levels can be determined from the Spectrometer duty-cycle samplers with the data going into a gbtlog file. If the DC offset and sampler levels for the 3 level case are brought to the sdfits input line then we can test if the proper values remove any apparent spectrometer data non-linearities due to any incorrect van Vleck corrections.
The spectrometer currently balances the three level samplers using the ratio of zero to non-zero counts, R = [N(+1) + N(-1) ] / N(0). The maximum quantization efficiency is reached when the sampler levels are at +/- 0.612003 * RMS where RMS is the rms value of the incoming voltages. For no DC offset we expect R=0.5405. The balancing algorithm used in the spectrometer assumes that any DC offset is zero and that Figure 2 of "Autocorrelator Sampler Level Setting and Transfer Function" by Rick Fisher, dated April 12, 2002, can be used to determine the balance point of the spectrometer. However, the spectrometer can only be balanced to within 0.5 dB and the input voltages also have a non-zero DC offset term. SDFITS then derives the sampler levels from the measured zero lag assuming that there is no DC offset. This could lead to an apparent non-linearity in the data. In order to investigate this we need to be able to specify what the sampler levels and DC offset values actually are to SDFITS and have SDFITS use these values in the van Vleck corrections.
- The
sdfits program must be able to read in DC levels and sampler levels for use in the Spectrometer Van Vleck corrections, where:
- DC levels is an array of the DC offset levels in terms of the RMS value of the incoming voltages.
- sampler levels is an array of values of the sampler levels for each Spectrometer sampler in terms of the RMS of the incoming voltages (ex: 0.6 means 0.6 * RMS). Each value specifies the absolute value of both the +1 and the -1 sampler threshold values.
- The sampler levels input for
sdfits is optional. If not included, then sampler levels are determined using the zero lag value (as is currently done in the Van Vleck corrections).
- This new input for
sdfits will only be used for the following types of data:
- Spectrometer data.
- 3-level sampling.
- Auto-correlated data.
- The
sdfits command line interface will have a new option: -vanVleck
- This new option requires a float array, with a second float array (separated by a comma) as optional. The first array are the DC levels, the second array are the sampler levels.
- If this option is used for any cases where the data is not Spectrometer, 3-level sampling, auto-correlated data, this option will simply be ignored, and a warning message will be printed.
- If the number of values passed in for both arrays are not equal to one another, or if the length of both arrays is not equal to the number of samplers for the particular scan, an exception will be raised.
An example input where all eight fast samplers are used and the dc offsets and sampler levels are specified would be
sdfits /home/gbtdata/foo -vanVleck=[0.01,0.02,0.01,0.02,-0.01,-0.02,-0.01,-0.02],[0.58,0.55,0.58,0.55,0.62,0.65,0.62,0.65]
An example input where all eight fast samplers are used and only the dc offsets are specified would be
sdfits /home/gbtdata/foo -vanVleck=[0.01,0.02,0.01,0.02,-0.01,-0.02,-0.01,-0.02]
- The options passed in from the command line interface must be passed down to the following classes in Sparrow:
- sparrow/gbt/app/sdfits/SDFITSWriter
- sparrow/gbt/api/project/src/ScanData
- sparrow/gbt/api/spectrometer/src/SpectrometerBanks
- sparrow/gbt/api/spectrometer/src/Spectrometer
- sparrow/gbt/lib/spectrometer/src/VanVleck.cpp
The VanVleck class (VanVleck.{h,cpp}) contains code to generate the correction curve approximation for the case being tested here (equi-spaced sampler levels with an optional DC offset), but that code is not currently exposed to the user. Specifically, the class has two contructors:
VanVleck(double zho, int n)
VanVleck(double xthresh, double ythresh, int n)
Where the second form is used for the cross-correlation case when the first positive thresholds for each sampler are already known. In both cases, it is assumed that the levels are equi-spaced with no DC offset (the mean of the sampler levels is 0.0). In the first form of the contructor, the zero-lag value (zho) is used to derive the first positive threshold and it is assumed that both samplers have the same threshold (auto-correlation case).
For this MR, it is necessary to get the user-supplied DC-offsets and any user-supplied first positive threshold level to the VanVleck class. A third contructor needs to be written:
VanVleck(double xthresh, double xmean, int n, int zerolags)
Where xthresh is the user-supplied first threshold value for that sampler and xmean is the user-supplied DC-offset for the same sampler. Again, n is the number of sampler levels which for this MR will always be 3. The last argument, zerolags, should be 1 if the xthresh value is to be interpreted as a zero-lag values. That option should be used when the user has only supplied DC-offsets (xmean) and not threshold levels (xthresh). In that case, the existing code that works out the first positive threshold value from the zero lag value will be used.
Bob will take care of all internal VanVleck class details, this MR only describes how those values are to be passed in to the VanVleck code. The VanVleck object is constructed in schwabVV found in Spectrometer.cpp.
What has to get done to integrate this completely into the system. This checklist must be completed before Cycle Integration Testing begins.
- System: changes affect low-level sparrow libraries, so must make sure that these changes dont affect
GFM when hte options are not passed down to the sparrow classes.
- Computing: No communication needed with computing group.
- Documentation: The
sdfits usage and wiki documentation will not mention this new option.
- Training: This is just for testing purposes at this point in time, so release only to staff astronomers (actually just ToneyMinter).
- Notification: This new option will be mentioned in the release notes.
A test data set will be obtained using the IF Rack noise source as the input signal and the 800 MHz mode of the spectrometer to measure the resulting spectra. The IF Rack attenuators will be used to change the input signal strength. The spectrometer duty_cycle samplers will be used to measure the number of positive, negative and zero counts from each sampler. These will then be used to determine the sampler levels and dc offset to be input into SDFITS to see if their values correct the apparent non-linearity of the resulting spectra.
APPROVED: I acknowledge that my request is fully contained in this MR, and if the SDD delivers exactly what I specified, I will be happy.
ACCEPTED: I acknowledge that I have validated the completed code according to the acceptance tests, and I am happy with the results.
Symbols:
- Use
%X% if MR is not complete (will display
)
- Use
%Y% if MR iscomplete (will display
)
CCC Discussion Area
-- ToneyMinter - 03 Apr 2006
Revision r1.9 - 08 May 2006 - 17:16 GMT - ToneyMinter Parents: PlanOfRecordC32006
|
Content copyright © 1999-2007 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
|
| |