cp1l.elan

#############################################################################
# cp1l.elan
#
#   EROS3 script for cp1l experiment. 
#
#   Versions: 1.00  Initial version, Aug 2000
#     Jan 2003 A better elan script for all radar in one
#
# 07-Feb-2001 AW
# 27-Jan-2003 AW
#############################################################################
# Matlab data file layout for remote stations OBS 0 indexed 
# 0-3164		Signal longpulse 29 lag 120 samples, physical ch 1
# 3165-14069		Background longpulse 29 lag 120 samples, physical ch 1
# 14070-14268		Calibration longpulse 0 lag 199 samples, physical ch 1
# 14269-25173		Signal longpulse 29 lag 378 samples, physical ch 2
# 25174-25372		Calibration longpulse 0 lag 199 samples, physical ch 2
# 25373-28528		AC signal 44 lag 66 samples, frac 3 physical ch 3
# 25529-29070		signal 0 lag 542 samples, physical ch 4
# 29071-29360		Calibration 0 lag 290 samples, physical ch 4
#############################################################################
# Matlab data file layout for Tromso UHF stations OBS 0 indexed 
# 0-239         Signal power profile 240 samples, physical ch 1
# 240-359       Background power profile 120 samples, physical ch 1
# 360-386       Calibration power profile 27 samples, physical ch 1
# 387-10486     Signal longpulse 25 lag 416 samples, physical ch 2
# 10487-15236   Background longpulse 25 lag 202 samples, physical ch 2
# 15237-15262   Calibration longpulse power profile 26 samples, physical ch 2
# 15263-15571   Signal AC code power profile 309 samples, physical ch 3
# 15572-34429   Signal AC code lag profiles 45 lag
#               285 samples fractionality 3 physical ch 3
# 34430-34738   Signal Power profile 309 samples physical ch 4
# 34739-35014   Background Power profile 276 samples physical ch 4
# 35015-35053   Calibration Power profile 39 samples physical ch 4
#############################################################################

block cp1l {{scan cp1}  {owner CP} {height 292.9} } {

    # What scan patterns todo, cp1, cp2 and cp3 are possible
    set SCAN_PAT $scan

    # Who is running the experiment (CP, SW ..... and so on )
    # All of these parameters are set in the end of this file
    set Owner $owner	
    # Height used in CP3 scan
    set Height $height	

    #############
    # Definitions
    #############

    set XDIR /kst/exp/cp1l	;# The base directory
    set FIR /kst/dsp/fir	;# Where to find FIR filter files
    set RADAR uhf		;# Radar (VHF or UHF)
    set Expname "cp1l"		;# Experiment name
    set LOOPC 8			;# How many loops in radar program for 1 integration
    set SYNC 3200		;# Sync time before next integration cycle
    set Version 1.00		;# Version number
    set Iper_us  5000000	;# Integration time in us
    set SCAN_FILE "/kst/exp/scans/scanpatterns.elan"	;# Scanpattern file

    # Check on what system we are running and set the Site var. to correct value
    if {[ISKIR]|[ISSOD]} {
		set Site "r
                  }
    if {[ISUHF ]} {
		set Site "u
                  }
   
	# Set Expid variable to correct value
	set Expid    "kst0 ${Expname}${Site}_${SCAN_PAT}_${Version}_${Owner}

	# What DSP file to use
	set Corrfile $XDIR/${Expname}-${Site}.fil

	# What NCO files to use
    	set NCO1 $XDIR/ch1_${Expname}-${Site}.nco
    	set NCO2 $XDIR/ch2_${Expname}-${Site}.nco
    	set NCO3 $XDIR/ch3_${Expname}-${Site}.nco
    	set NCO4 $XDIR/ch4_${Expname}-${Site}.nco

        # Which filters
   	set Filter12 $FIR/b25d150.fir     ;# +-25kHz filter for 10 usec sampling
    	set Filter34 $FIR/b75d105.fir     ;# +-75kHz filter for 7 usec sampling

        set Expfiles [list $XDIR/$Expname.elan $SCAN_FILE $Corrfile \
        $XDIR/${Expname}-$Site.tlan $XDIR/rtg_def.m \
        $NCO1 $NCO2 $NCO4 $NCO5 $Filter12 $Filter34]
    #############
    # Actual work
    #############
    # Get all different scan patterns
    source ${SCAN_FILE}

    # Stop receiver --

    SYNC -10

    # If we are in Tromso stop the transmitt radar controller also
    stopradar -rec
    if {[ISUHF ]} {
    	stopradar -trans
	}

    # Stop DSP program if running
    stopdata

     # Load radar controller --

    loadradar rec -loopc ${LOOPC} -sync ${SYNC} -file $XDIR/${Expname}-${Site}_${RADAR}.rbin  -prog1 0    

# Load also transmitter radar controller if we are in Tromso
    if {[ISUHF ]} {
	    loadradar trans -loopc ${LOOPC} -sync ${SYNC} -file $XDIR/${Expname}-${Site}_${RADAR}.tbin  -prog1 0    
		}

    # Load filters --

    loadfilter $Filter12 ch1,2
    loadfilter $Filter34 ch3,4


    # Load NCO file to channel boards
    loadfrequency $NCO1 ch1
    loadfrequency $NCO2 ch2
    loadfrequency $NCO3 ch3
    loadfrequency $NCO4 ch4

    # This is only a dummy setting of the frequency of the channel boards
    setfrequency ch1, ch2, ch3, ch4 12.0

    # Start radar controllers --

    SYNC 2
    armradar rec -prog1

    if {[ISUHF ]} {
    	armradar trans -prog1
	}

    startradar EXPSTART [ expr double($Iper_us)/double(1000000) ]
	
    # Start data access -------------------------------------------------------

    SYNC 4

    startdata $Corrfile $Expid $Iper_us

    # Write all relevant experiment file to the info. direcectory
    writeexperimentfile $Expfiles

    # Start recording ---------------------------------------------------------

    SYNC 4
    # Stop data recording
    disablerecording

    # Infinite loop, to be keep the experiment alive ---------------------------
    set ExpStart [timestamp [getstarttime exp]]
    gotoblock  ${SCAN_PAT} $ExpStart $Expname $Height
 DO -1 { SYNC 100 }

};#cp1l
# How to call the experiment In this case do a CP1 scan (field align)
# and run the exp. as CP
# proc name, scan name, owner, and height used for CP2/CP3 scan 
eval callblock cp1l [argv]

 



cp1l-u.tlan

cp1l-u.tlan



cp1l-u.fil

nr_stc=64;
% Channel one
channel=1;
type=1;
	max_lag=0;
	vec_len=240;
	data_start=0;
end_type
type=1;
	max_lag=0;
	vec_len=120;
	data_start=240;
end_type
type=1;
	max_lag=0;
	vec_len=27;
	data_start=360;
end_type
end_chan
% Channel two
channel=2;
type=1;
	max_lag=24;
	vec_len=416;
	data_start=0;
end_type
type=1;
	max_lag=24;
	vec_len=202;
	data_start=416;
end_type
type=1;
	max_lag=0;
	vec_len=26;
	data_start=618;
end_type
end_chan
% Channel three
channel=3;
type=1;
	max_lag=0;
	vec_len=309;
	data_start=0;
end_type
type=1;
	res_mult=32;
	sub_int=2;
	n_frac=3;
	max_lag=44;
	vec_len=285;
	data_start=309;
	code_len=16;
	ac_file=ac.txt;
end_type
end_chan
% Channel four
channel=4;
type=1;
	max_lag=0;
	vec_len=309;
	data_start=0;
end_type
type=1;
	max_lag=0;
	vec_len=276;
	data_start=309;
end_type
type=1;
	max_lag=0;
	vec_len=39;
	data_start=585;
end_type
end_chan

 



cp1l-u.DECO


DECO 2.0
1	427196
35054
42
% Channel=1 type=1 data_start=0 vec_len=240 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 0 - 239
1	G	1	0	240	0	0	1	0	240	0	0	240	0	0	 
% Channel=1 type=1 data_start=240 vec_len=120 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 240 - 359
2	G	1	240	120	0	0	1	0	120	0	240	120	0	0	 
% Channel=1 type=1 data_start=360 vec_len=27 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 360 - 386
3	G	1	360	27	0	0	1	0	27	0	360	27	0	0	 
% Channel=2 type=1 data_start=0 vec_len=416 max_lag=24 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 387 - 10486
4	G	1	387	10400	0	24	1	0	416	0	387	10100	0	0	 
% Channel=2 type=1 data_start=416 vec_len=202 max_lag=24 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 10487 - 15236
5	G	1	10787	5050	0	24	1	0	202	0	10487	4750	0	0	 
% Channel=2 type=1 data_start=618 vec_len=26 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 15237 - 15262
6	G	1	15837	26	0	0	1	0	26	0	15237	26	0	0	 
% Channel=3 type=1 data_start=0 vec_len=309 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 15263 - 15571
7	G	1	15863	309	0	0	1	0	309	0	15263	309	0	0	 
% Channel=3 type=1 data_start=309 vec_len=285 max_lag=44 res_mult=32 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 15572 - 34429
8	H	1	16172	12825	1	14	3	2	329	0	15572	18858	0	16	 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 
% Data position in d_data vector 15572 - 34429
9	H	1	28997	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 
% Data position in d_data vector 15572 - 34429
10	H	1	41822	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 
% Data position in d_data vector 15572 - 34429
11	H	1	54647	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 1 
% Data position in d_data vector 15572 - 34429
12	H	1	67472	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 
% Data position in d_data vector 15572 - 34429
13	H	1	80297	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 
% Data position in d_data vector 15572 - 34429
14	H	1	93122	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 
% Data position in d_data vector 15572 - 34429
15	H	1	105947	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 1 1 -1 -1 1 1 1 1 1 -1 1 -1 -1 1 
% Data position in d_data vector 15572 - 34429
16	H	1	118772	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 
% Data position in d_data vector 15572 - 34429
17	H	1	131597	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 
% Data position in d_data vector 15572 - 34429
18	H	1	144422	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 
% Data position in d_data vector 15572 - 34429
19	H	1	157247	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 
% Data position in d_data vector 15572 - 34429
20	H	1	170072	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 
% Data position in d_data vector 15572 - 34429
21	H	1	182897	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 1 1 
% Data position in d_data vector 15572 - 34429
22	H	1	195722	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 
% Data position in d_data vector 15572 - 34429
23	H	1	208547	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 
% Data position in d_data vector 15572 - 34429
24	H	1	221372	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 
% Data position in d_data vector 15572 - 34429
25	H	1	234197	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 
% Data position in d_data vector 15572 - 34429
26	H	1	247022	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 
% Data position in d_data vector 15572 - 34429
27	H	1	259847	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 
% Data position in d_data vector 15572 - 34429
28	H	1	272672	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 
% Data position in d_data vector 15572 - 34429
29	H	1	285497	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 
% Data position in d_data vector 15572 - 34429
30	H	1	298322	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 
% Data position in d_data vector 15572 - 34429
31	H	1	311147	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 
% Data position in d_data vector 15572 - 34429
32	H	1	323972	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 
% Data position in d_data vector 15572 - 34429
33	H	1	336797	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 
% Data position in d_data vector 15572 - 34429
34	H	1	349622	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 1 
% Data position in d_data vector 15572 - 34429
35	H	1	362447	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 1 -1 1 1 1 -1 -1 1 1 1 1 1 -1 1 
% Data position in d_data vector 15572 - 34429
36	H	1	375272	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 
% Data position in d_data vector 15572 - 34429
37	H	1	388097	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 
% Data position in d_data vector 15572 - 34429
38	H	1	400922	12825	1	14	3	2	329	0	15572	18858	1	16	 -1 -1 1 1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 
% Data position in d_data vector 15572 - 34429
39	H	1	413747	12825	1	14	3	2	329	0	15572	18858	2	16	 -1 1 1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 
% Channel=4 type=1 data_start=0 vec_len=309 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 34430 - 34738
40	G	1	426572	309	1	0	1	0	309	0	34430	309	0	0	 
% Channel=4 type=1 data_start=309 vec_len=276 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 34739 - 35014
41	G	1	426881	276	1	0	1	0	276	0	34739	276	0	0	 
% Channel=4 type=1 data_start=585 vec_len=39 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 35015 - 35053
42	G	1	427157	39	1	0	1	0	39	0	35015	39	0	0	 

 



ac.txt


-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 
-1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 
-1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 
-1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 1 
-1 -1 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 
-1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 
-1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 
-1 1 1 1 -1 -1 1 1 1 1 1 -1 1 -1 -1 1 
-1 -1 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 
-1 1 -1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 
-1 -1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 
-1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 
-1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 
-1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 1 1 
-1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 
-1 1 1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 
-1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 
-1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 
-1 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 
-1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 
-1 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 
-1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 
-1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 
-1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 
-1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 
-1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 
-1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 1 
-1 1 1 -1 1 1 1 -1 -1 1 1 1 1 1 -1 1 
-1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 
-1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 
-1 -1 1 1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 
-1 1 1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 

 



ch1_cp1l-u.nco


NCOPAR_VS       0.1
%======================================
% cp1l_ch1
% LO1=812.0 MHz LO2=128.0 MHz
%======================================
NCO	0	 10.4	% f12
NCO	1	 10.1	% f13
NCO	2	 10.1	% f13
NCO	3	 10.4	% f12

 



ch2_cp1l-u.nco


NCOPAR_VS       0.1
%======================================
% cp1l_ch2
% LO1=812.0 MHz LO2=128.0 MHz
%======================================
NCO	0	  9.8	% f14
NCO	1	  9.5	% f15
NCO	2	  9.5	% f15
NCO	3	  9.8	% f14

 



ch3_cp1l-u.nco


NCOPAR_VS       0.1
%======================================
% cp1l_ch3
% LO1=812.0 MHz LO2=128.0 MHz
%======================================
NCO	0	 11.9	% f7
NCO	1	 11.9	% f7
NCO	2	 10.7	% f11
NCO	3	 10.7	% f11



ch4_cp1l-u.nco


NCOPAR_VS       0.1
%======================================
% cp1l_ch4
% LO1=812.0 MHz LO2=128.0 MHz
%======================================
NCO	0	 10.7	% f11
NCO	1	 10.7	% f11
NCO	2	 11.9	% f7
NCO	3	 11.9	% f7



cp1l-r.tlan

cp1l-r.tlan



cp1l-r.fil


nr_stc=64;
% Channel one
channel=1;
type=1;
	max_lag=29;
	vec_len=120;
	data_start=0;
end_type
type=1;
	max_lag=29;
	vec_len=378;
	data_start=120;
end_type
type=1;
	max_lag=0;
	vec_len=199;
	data_start=498;
end_type
end_chan
% Channel two
channel=2;
type=1;
	max_lag=29;
	vec_len=378;
	data_start=0;
end_type
type=1;
	max_lag=0;
	vec_len=199;
	data_start=378;
end_type
end_chan
% Channel three
channel=3;
type=1;
	do_zlag=1;
	res_mult=32;
	sub_int=2;
	n_frac=3;
	max_lag=44;
	vec_len=66;
	data_start=0;
	code_len=16;
	ac_file=ac.txt;
end_type
end_chan
% Channel four
channel=4;
type=1;
	max_lag=0;
	vec_len=542;
	data_start=0;
end_type
type=1;
	max_lag=0;
	vec_len=290;
	data_start=542;
end_type
end_chan

 



cp1l-r.DECO


DECO 2.0
1	122550
29361
39
% Channel=1 type=1 data_start=0 vec_len=120 max_lag=29 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 0 - 3164
1	G	1	0	3600	0	29	1	0	120	0	0	3165	0	0	 
% Channel=1 type=1 data_start=120 vec_len=378 max_lag=29 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 3165 - 14069
2	G	1	3600	11340	0	29	1	0	378	0	3165	10905	0	0	 
% Channel=1 type=1 data_start=498 vec_len=199 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 14070 - 14268
3	G	1	14940	199	0	0	1	0	199	0	14070	199	0	0	 
% Channel=2 type=1 data_start=0 vec_len=378 max_lag=29 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 14269 - 25173
4	G	1	15139	11340	0	29	1	0	378	0	14269	10905	0	0	 
% Channel=2 type=1 data_start=378 vec_len=199 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 25174 - 25372
5	G	1	26479	199	0	0	1	0	199	0	25174	199	0	0	 
% Channel=3 type=1 data_start=0 vec_len=66 max_lag=44 res_mult=32 sub_div=1 do_zlag=1 lag_incr=1 fir_len=0
% Data position in d_data vector 25373 - 28462
6	I	1	26678	2970	0	14	3	2	110	0	25373	3090	0	16	 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 
% Data position in d_data vector 25373 - 28462
7	I	1	29648	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 
% Data position in d_data vector 25373 - 28462
8	I	1	32618	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 
% Data position in d_data vector 25373 - 28462
9	I	1	35588	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 1 
% Data position in d_data vector 25373 - 28462
10	I	1	38558	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 
% Data position in d_data vector 25373 - 28462
11	I	1	41528	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 
% Data position in d_data vector 25373 - 28462
12	I	1	44498	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 
% Data position in d_data vector 25373 - 28462
13	I	1	47468	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 1 1 -1 -1 1 1 1 1 1 -1 1 -1 -1 1 
% Data position in d_data vector 25373 - 28462
14	I	1	50438	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 
% Data position in d_data vector 25373 - 28462
15	I	1	53408	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 
% Data position in d_data vector 25373 - 28462
16	I	1	56378	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 
% Data position in d_data vector 25373 - 28462
17	I	1	59348	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 
% Data position in d_data vector 25373 - 28462
18	I	1	62318	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 
% Data position in d_data vector 25373 - 28462
19	I	1	65288	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 1 1 
% Data position in d_data vector 25373 - 28462
20	I	1	68258	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 
% Data position in d_data vector 25373 - 28462
21	I	1	71228	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 
% Data position in d_data vector 25373 - 28462
22	I	1	74198	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 
% Data position in d_data vector 25373 - 28462
23	I	1	77168	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 
% Data position in d_data vector 25373 - 28462
24	I	1	80138	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 
% Data position in d_data vector 25373 - 28462
25	I	1	83108	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 
% Data position in d_data vector 25373 - 28462
26	I	1	86078	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 
% Data position in d_data vector 25373 - 28462
27	I	1	89048	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 
% Data position in d_data vector 25373 - 28462
28	I	1	92018	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 
% Data position in d_data vector 25373 - 28462
29	I	1	94988	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 
% Data position in d_data vector 25373 - 28462
30	I	1	97958	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 
% Data position in d_data vector 25373 - 28462
31	I	1	100928	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 
% Data position in d_data vector 25373 - 28462
32	I	1	103898	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 1 
% Data position in d_data vector 25373 - 28462
33	I	1	106868	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 1 -1 1 1 1 -1 -1 1 1 1 1 1 -1 1 
% Data position in d_data vector 25373 - 28462
34	I	1	109838	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 
% Data position in d_data vector 25373 - 28462
35	I	1	112808	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 
% Data position in d_data vector 25373 - 28462
36	I	1	115778	2970	0	14	3	2	110	0	25373	3090	1	16	 -1 -1 1 1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 
% Data position in d_data vector 25373 - 28462
37	I	1	118748	2970	0	14	3	2	110	0	25373	3090	2	16	 -1 1 1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 
% Channel=4 type=1 data_start=0 vec_len=542 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 28529 - 29070
38	G	1	121718	542	0	0	1	0	542	0	28529	542	0	0	 
% Channel=4 type=1 data_start=542 vec_len=290 max_lag=0 res_mult=1 sub_div=1 do_zlag=0 lag_incr=1 fir_len=0
% Data position in d_data vector 29071 - 29360
39	G	1	122260	290	0	0	1	0	290	0	29071	290	0	0



ch1_cp1l-r.nco


NCOPAR_VS       0.1
%======================================
% cp1l_ch1
% LO1=812.0 MHz LO2=128.0 MHz
%======================================
NCO	0	 10.4	% f12
NCO	1	 10.1	% f13
NCO	2	 10.1	% f13
NCO	3	 10.4	% f12
NCO	4	  9.8	% f14
NCO	5	  9.5	% f15



ch2_cp1l-r.nco


NCOPAR_VS       0.1
%======================================
% cp1l_ch2
% LO1=812.0 MHz LO2=128.0 MHz
%======================================
NCO	0	  9.8	% f14
NCO	1	  9.5	% f15
NCO	2	  9.5	% f15
NCO	3	  9.8	% f14
NCO	4	  9.5	% f15
NCO	5	  9.8	% f14



ch3_cp1l-r.nco


NCOPAR_VS       0.1
%======================================
% cp1l_ch3
% LO1=812.0 MHz LO2=128.0 MHz
%======================================
NCO	0	 11.9	% f7
NCO	1	 11.9	% f7
NCO	2	 10.7	% f11
NCO	3	 10.7	% f11
NCO	4	 11.9	% f7
NCO	5	 10.7	% f11



ch4_cp1l-r.nco


NCOPAR_VS       0.1
%======================================
% cp1l_ch4
% LO1=812.0 MHz LO2=128.0 MHz
%======================================
NCO	0	 10.7	% f11
NCO	1	 10.7	% f11
NCO	2	 11.9	% f7
NCO	3	 11.9	% f7
NCO	4	 10.7	% f11
NCO	5	 11.9	% f7




ac_acf.m


frac=3;		% Fractionality from *.fil
max_lag=44;	% Max lag from *.fil
nsamp=285;	% Number of samples (vec_len) from *.fil
nr_bits=16;	% Number of bits in AC code from *.fil
% These calculations are for cases when do_zlag=0 in *.fil

% Below just help variables
add=1;
nr_tot=0;
jj=0;
for i=1:max_lag
 if(mod(i,frac)~=0 && (i)>frac && i< nr_bits*frac)
% It's a integer lag
	for j=1:2	
		add1=add;
		add2=nsamp-i+add1-1;
		add=add2+1;
		nr_tot=add2-add1+1+nr_tot;
		jj=jj+1;
		disp(sprintf('nr of points %d and pos. is %d-%d',add2-add1+1,add1,add2))
	end
else
	add1=add;
	add2=nsamp-i+add1-1;
	add=add2+1;
	nr_tot=add2-add1+1+nr_tot;
disp(sprintf('nr of points %d and pos. is %d-%d',add2-add1+1,add1,add2))
	jj=jj+1;
end
end
disp(sprintf('Total number of of points in the lag matrix %d',nr_tot))