HK Variance Test

This notebook provides a test for the noise and stability of the housekeeping data captured by the FPE. It evaluates the performance of the housekeeping system by taking a large number of samples, collecting the results for each signal channel, and evaluating the variance of the data for each channel.

Instructions:

Enter Your Name and today's date:

Ed Bokhour, 11/4/15

Enter the part numbers and serial numbers of the units under test:

SDPCB Interface 6.1, s/n 02. SDPCB 6.1 Driver s/n RPI15310002, SDPCB Video 6.1 s/n RPI15310001. Using wrapper 6.1.2 (San Diego).

When the test is complete, save this notebook as a new file, indicating the date, as "HK_Variance_Results_YYMMDD.ipynb". Alternatively, export the notebook as a PDF file, then clear all entries and outputs.

Start the Observatory Simulator and Load the FPE FPGA

Remember that whenever you power-cycle the Observatory Simulator, you should set preload=True below.

When you are running this notebook and it has not been power cycled, you should set preload=False.

Run the following cell to get the FPE loaded:


In [9]:
from tessfpe.dhu.fpe import FPE
from tessfpe.dhu.unit_tests import check_house_keeping_voltages
fpe1 = FPE(1, debug=False, preload=True, FPE_Wrapper_version='6.1.1')
print fpe1.version
fpe1.cmd_start_frames()
fpe1.cmd_stop_frames()
if check_house_keeping_voltages(fpe1):
    print "Wrapper load complete. Interface voltages OK."


Observatory Simulator Version 1.6c - Oct  8 2015 11:55:03
Wrapper load complete. Interface voltages OK.

Set all the operating parameters to the default values:


In [10]:
def set_fpe_defaults(fpe):
    "Set the FPE to the default operating parameters and return a list of the default values"
    defaults = {}
    for k in range(len(fpe.ops.address)):
        if fpe.ops.address[k] is None:
            continue
        fpe.ops.address[k].value = fpe.ops.address[k].default
        defaults[fpe.ops.address[k].name] = fpe.ops.address[k].default
    return defaults
set_fpe_defaults(fpe1)


Out[10]:
{'ccd1_backside': 0.0,
 'ccd1_input_diode_high': 12.0,
 'ccd1_input_diode_low': 12.0,
 'ccd1_input_gate_1': -3.0,
 'ccd1_input_gate_2': -3.0,
 'ccd1_output_drain_a_offset': 8.0,
 'ccd1_output_drain_b_offset': 8.0,
 'ccd1_output_drain_c_offset': 8.0,
 'ccd1_output_drain_d_offset': 8.0,
 'ccd1_output_gate': -1.0,
 'ccd1_parallel_high_offset': 0.0,
 'ccd1_parallel_low': -8.0,
 'ccd1_reset_drain': 12.0,
 'ccd1_reset_high': 3.0,
 'ccd1_reset_low_offset': -3.0,
 'ccd1_scupper': 12.0,
 'ccd1_serial_high': 4.0,
 'ccd1_serial_low_offset': -6.0,
 'ccd1_substrate': -40.0,
 'ccd2_backside': 0.0,
 'ccd2_input_diode_high': 12.0,
 'ccd2_input_diode_low': 12.0,
 'ccd2_input_gate_1': -3.0,
 'ccd2_input_gate_2': -3.0,
 'ccd2_output_drain_a_offset': 8.0,
 'ccd2_output_drain_b_offset': 8.0,
 'ccd2_output_drain_c_offset': 8.0,
 'ccd2_output_drain_d_offset': 8.0,
 'ccd2_output_gate': -1.0,
 'ccd2_parallel_high_offset': 0.0,
 'ccd2_parallel_low': -8.0,
 'ccd2_reset_drain': 12.0,
 'ccd2_reset_high': 3.0,
 'ccd2_reset_low_offset': -3.0,
 'ccd2_scupper': 12.0,
 'ccd2_serial_high': 4.0,
 'ccd2_serial_low_offset': -6.0,
 'ccd2_substrate': -40.0,
 'ccd3_backside': 0.0,
 'ccd3_input_diode_high': 12.0,
 'ccd3_input_diode_low': 12.0,
 'ccd3_input_gate_1': -3.0,
 'ccd3_input_gate_2': -3.0,
 'ccd3_output_drain_a_offset': 8.0,
 'ccd3_output_drain_b_offset': 8.0,
 'ccd3_output_drain_c_offset': 8.0,
 'ccd3_output_drain_d_offset': 8.0,
 'ccd3_output_gate': -1.0,
 'ccd3_parallel_high_offset': 0.0,
 'ccd3_parallel_low': -8.0,
 'ccd3_reset_drain': 12.0,
 'ccd3_reset_high': 3.0,
 'ccd3_reset_low_offset': -3.0,
 'ccd3_scupper': 12.0,
 'ccd3_serial_high': 4.0,
 'ccd3_serial_low_offset': -6.0,
 'ccd3_substrate': -40.0,
 'ccd4_backside': 0.0,
 'ccd4_input_diode_high': 12.0,
 'ccd4_input_diode_low': 12.0,
 'ccd4_input_gate_1': -3.0,
 'ccd4_input_gate_2': -3.0,
 'ccd4_output_drain_a_offset': 8.0,
 'ccd4_output_drain_b_offset': 8.0,
 'ccd4_output_drain_c_offset': 8.0,
 'ccd4_output_drain_d_offset': 8.0,
 'ccd4_output_gate': -1.0,
 'ccd4_parallel_high_offset': 0.0,
 'ccd4_parallel_low': -8.0,
 'ccd4_reset_drain': 12.0,
 'ccd4_reset_high': 3.0,
 'ccd4_reset_low_offset': -3.0,
 'ccd4_scupper': 12.0,
 'ccd4_serial_high': 4.0,
 'ccd4_serial_low_offset': -6.0,
 'ccd4_substrate': -40.0,
 'heater_1_current': 0.0,
 'heater_2_current': 0.0,
 'heater_3_current': 0.0}

Run the variance test:


In [4]:
from numpy import var, sqrt
samples=100
from tessfpe.data.housekeeping_channels import housekeeping_channels
# We make sample_data a dictionary and each value will be a set of HK 
# data, with key = sample_name.
sample_data = {}

# For later:
signal_names = []
signal_values = []
signal_data = {}
variance_values = {}

for i in range(samples):
    # Get a new set of HK values
    house_keeping_values = fpe1.house_keeping["analogue"]
    data_values = house_keeping_values.values()
    # Add the new HK values to the sample_data dictionary:
    sample_number = "sample_" + str(i)
    sample_data[sample_number] = data_values

# Get the signal names for use later
signal_names = housekeeping_channels.keys()

# Get list of units for later
units = {}
for name in housekeeping_channels:
    units[name] = housekeeping_channels[name]['unit']
    
"""Assign the set of all HK values of the same signal (e.g. substrate_1) 
to the dictionary 'signal_data'"""

for k in range(len(signal_names)):
    # Build the list 'signal_values' for this signal:
    for i in range(samples):
        sample_number = "sample_" + str(i)
        signal_values.append(sample_data[sample_number][k])
    # Add signal_values to the signal_data dictionary:
    signal_data[signal_names[k]] = signal_values
    signal_values = []

""" Now get the square root of the variance of each of the 'signal_values' in the 
signal_data dictionary and put the result in the 'variance_values' 
dictionary."""
for name in signal_data:
    variance_values[name] = sqrt(var(signal_data[name]))
    #print units[name]["unit"]
    #print signal_data
    #print units[name]
    print '{0:26}     {1:.3} {2}'.format(name, variance_values[name], units[name])

# Results will be displayed below, in engineering units (root-variance).  
# Watch ObsSim LEDs for activity.


ccd4_substrate                 0.0057 V
ccd1_serial_low_offset         0.00111 V
ccd2_output_source_a           0.00086 V
ccd2_output_source_c           0.000881 V
ccd2_output_source_b           0.000966 V
ccd2_output_source_d           0.000657 V
ccd4_parallel_low              0.000846 V
ccd4_output_drain_b_offset     0.00125 V
ccd1_output_source_d           0.000928 V
ccd3_output_source_a           0.00118 V
ccd3_output_source_b           0.00123 V
ccd3_output_source_c           0.000916 V
ccd3_output_source_d           0.000854 V
ccd4_output_source_d           0.00089 V
ccd4_output_source_c           0.0101 V
ccd4_output_source_b           0.000879 V
ccd4_output_source_a           0.000754 V
ccd3_board_temperature         0.000885 K
ccd2_output_drain_d_offset     0.000799 V
ccd1_output_drain_b_offset     0.0151 V
ccd2_output_gate               0.00103 V
ccd4_input_diode_low           0.000864 V
ccd3_substrate                 0.000696 V
ccd2_serial_low_offset         0.000694 V
ccd1_output_drain_a_offset     0.00935 V
ccd2_scupper                   0.000899 V
ccd3_reset_high                0.00097 V
ccd2_backside                  0.00105 V
+2.5f                          0.000821 V
heater_3_current               0.00113 mA
ccd3_serial_high               0.00891 V
ccd3_backside                  0.000552 V
ccd1_output_drain_c_offset     0.00864 V
ccd4_input_gate_2              0.000602 V
ccd4_input_gate_1              0.000488 V
ccd1_serial_high               0.000708 V
ccd3_output_drain_c_offset     0.00296 V
ccd1_output_drain_d_offset     0.0099 V
ccd4_output_drain_c_offset     0.000497 V
ccd2_output_drain_c_offset     0.000589 V
ccd3_input_diode_low           0.00121 V
+1f                            0.000886 V
ccd1_substrate                 0.000526 V
ccd3_reset_drain               0.000485 V
hk_bias_1                      0.000402 uA
hk_bias_0                      0.000824 uA
hk_bias_3                      0.0125 uA
hk_bias_2                      0.000591 uA
hk_bias_5                      0.000889 uA
hk_bias_4                      0.000839 uA
ccd1_reset_low_offset          0.000884 V
ccd1_parallel_low              0.000668 V
ccd3_parallel_high_offset      0.000987 V
ccd1_scupper                   0.000792 V
ccd3_serial_low_offset         0.000575 V
+15                            0.000662 V
ccd3_reset_low_offset          0.00079 V
ccd1_input_diode_high          0.000984 V
ccd1_reset_drain               0.000687 V
ccd1_reset_high                0.000525 V
-12                            0.000963 V
+5                             0.000492 V
ccd1_input_diode_low           0.000941 V
ccd4_output_drain_a_offset     0.0082 V
ccd2_substrate                 0.000511 V
ccd2_parallel_high_offset      0.00253 V
ccd4_output_gate               0.000634 V
ccd2_input_diode_low           0.000701 V
ccd3_output_drain_d_offset     0.000807 V
ccd4_board_temperature         0.0171 K
+1.8f                          0.000466 V
ccd2_reset_low_offset          0.000401 V
ccd2_serial_high               0.000561 V
heater_1_current               0.000674 mA
ccd4_input_diode_high          0.000752 V
ccd4_reset_drain               0.000654 V
heater_2_current               0.0 mA
ccd4_parallel_high_offset      0.00829 V
ccd2_input_diode_high          0.000664 V
ccd3_input_gate_2              0.000793 V
ccd3_scupper                   0.000936 V
ccd3_input_gate_1              0.000706 V
ccd4_backside                  0.000612 V
ccd4_reset_high                0.000592 V
ccd2_reset_drain               0.000522 V
ccd4_serial_high               0.00426 V
ccd3_output_drain_b_offset     0.000628 V
ccd1_input_gate_1              0.00118 V
ccd2_parallel_low              0.000433 V
ccd1_board_temperature         0.00106 K
ccd1_input_gate_2              0.0011 V
ccd1_backside                  0.0101 V
ccd1_output_gate               0.00101 V
ccd3_parallel_low              0.00114 V
pt1000_sensor_2                0.000793 C
pt1000_sensor_3                0.000563 C
pt1000_sensor_1                0.00106 C
pt1000_sensor_6                0.00921 C
pt1000_sensor_7                0.000774 C
pt1000_sensor_4                0.000534 C
pt1000_sensor_5                0.0167 C
pt1000_sensor_8                0.00101 C
pt1000_sensor_9                0.000724 C
ccd4_output_drain_d_offset     0.000539 V
ccd2_output_drain_a_offset     0.144 V
ccd2_input_gate_1              0.164 V
+3.3f                          0.00115 V
ccd2_input_gate_2              0.00107 V
ccd3_output_gate               0.000379 V
ccd2_board_temperature         0.00113 K
ccd3_output_drain_a_offset     0.000586 V
ccd1_output_source_c           0.000819 V
ccd2_reset_high                0.000617 V
ccd1_parallel_high_offset      0.0 V
ccd3_input_diode_high          0.000471 V
ccd4_reset_low_offset          0.0 V
ccd4_serial_low_offset         0.000683 V
ccd2_output_drain_b_offset     0.000602 V
ccd4_scupper                   0.00118 V
pt1000_sensor_10               0.331 C
pt1000_sensor_11               0.000752 C
pt1000_sensor_12               0.0123 C
ccd1_output_source_b           0.000971 V
alcu_sensor_ccd4               0.0173 C
ccd1_output_source_a           0.000929 V
alcu_sensor_ccd1               0.00879 C
alcu_sensor_ccd3               0.0067 C
alcu_sensor_ccd2               0.0 C

End HK Variance Test.