First of all: thanks for the great code, it has been quite useful so far (the problem below is easily corrected after-the-fact...
In
|
# FIXME: I'm cheating if this is a 35670A measurement and |
|
# converting from the Vpk^2 (native units) to Vrms. Convert from |
|
# Vpk^2 to Vpk and then to Vrms |
|
if sdf_hdr['file_hdr']['application'] == 'HP 35670A': |
|
sdf_data = np.sqrt(sdf_data) / np.sqrt(2) |
the library converts the units of the file unconditionally if the instrument is a 35670A signal analyzer; I am unsure why it does this.
- V²/Hz is a perfectly valid measurement unit (and by the way, the better one if you need to integrate non-uniform noise on a band, giving that the square root of the integral is not the same as the integral of the square root 😉)
- in the case that the file is a transfer function from a sweep sine measurement, the result is simply completely wrong.
I suggest not doing the scaling at all (so that the data is coherent with the one exported in ASCII mode); as a second option, do the scaling only if y_is_complex is False...
If you want, I can upload files of different measurement types in ASCII and SDF for checking.
Thank you again for the software.
First of all: thanks for the great code, it has been quite useful so far (the problem below is easily corrected after-the-fact...
In
sdfascii/sdfascii.py
Lines 983 to 987 in 255b2b2
the library converts the units of the file unconditionally if the instrument is a 35670A signal analyzer; I am unsure why it does this.
I suggest not doing the scaling at all (so that the data is coherent with the one exported in ASCII mode); as a second option, do the scaling only if
y_is_complexis False...If you want, I can upload files of different measurement types in ASCII and SDF for checking.
Thank you again for the software.