位相補正

1    周波数毎にデータ取得する        
        For freq_num = Freq_start to Freq_start + Freq_count    
2    NAのセグメント設定を行う        
        周波数:NA_FREQ(Freq_num) POINT:(SOSI_COUNT+1) * (AVE+1)*(BEAM_COUNT+1) IFBW:ifbw    
3    NA出力ON        
4    試験制御ユニット 取得周波数を設定        
5    試験制御ユニット 試験開始        
6    取得処理待ち        
7    NA出力OFF        
8    試験制御ユニット 試験停止        
9    NA_file_copy_sel(freq_num)        
        コピー実行    
10    ptn_file_read(freq_num)        
        平均処理&配列格納    
        FOR sosi_num=SOSI_START to SOSI_START + SOSI_COUNT    
         FOR pulse_num = PULSE_START to PULSE_START + PULSE_COUNT    
          FOR ave_num = 0 to AVEAGE    
            amp[sosi][freq][code][ave]
             phs[sosi][freq][code][ave]
        平均処理後    
        phs_amp[sosi][freq][code]    
        phs_phs[sosi][freq][code]    
        +-180範囲チェック    
         もしphs_phs[sosi][freq][code]が-180より低い場合    
            phs_phs[sosi][freq][code] + 360
        もしphs_phs[sosi][freq][code]が+180より高い場合    
            phs_phs[sosi][freq][code] - 360
11    file_save()        
        振幅:    phs_amp[sosi][freq][code]
        位相:    phs_phs[sosi][freq][code]
12    calc_phase()        
        波面補正コード算出    
        理想位相=360°÷位相数    
        ・補正データ保存先フォルダ生成    
        ・if phs_phs[sosi][freq][code] < 0 then    
         phs_phs[sosi][freq][code] + 360    
        ・リニアリティー計算    
         各素子の各周波数ごとに位相と振幅の合計と平均を算出    
         結果から各素子の各周波数ごとの位相バイアス値を算出    
            
★        位相補正コード算出    
    修正→    "HOSEI_DAT(freq_num, sosi_num, pulse_num) → LINEARITY(freq_num, sosi_num, pulse_num)
Linearity"    
            
    追加→    phs_bias(freq_num, sosi_num, pulse_sel) = の次のステップに    
    追加→    hosei_deg(freq_num, sosi_num, pulse_sel) = (360.0-phs_bias(freq_num, sosi_num, pulse_sel)) Mod 360.0    
            
    追加→    For freq_num = Freq_START to FREQ_START + FREQ_COUNT + 1 step 1    
    追加→     For sosi_num = SOSI_START to SOSI_START + SOSI_COUNT + 1 step 1    
    追加→      deg = hosei_deg(freq_num, sosi_num, pulse_sel)    
    追加→      For bit = 0 to 7 step 1    
    追加→       if deg >= (180/Math.Pow(2,bit)) then    
    追加→        pulse_code_bit(bit) = 1    
    追加→        deg = deg - (180/Math.Pow(2,bit))    
    追加→       else    
    追加→        pulse_code_bit(bit) = 0    
    追加→       end if    
    追加→      Next    
    追加→      h_code(freq_num, sosi_num, pulse_sel) = (Math.Pow(2,7) * pulse_code_bit(0)) +  (Math.Pow(2,6) * pulse_code_bit(1)) + (Math.Pow(2,5) * pulse_code_bit(2)) + (Math.Pow(2,4) * pulse_code_bit(3)) + (Math.Pow(2,3) * pulse_code_bit(4)) + (Math.Pow(2,2) * pulse_code_bit(5)) + (Math.Pow(2,1) * pulse_code_bit(6)) + (Math.Pow(2,0) * pulse_code_bit(7))    
    追加→     Next    
    追加→    Next    
            
            
    calc_send_code()