Start » Science » User Documentation » Experiments » arc_slice code

arc_slice.fil


nr_stc=2;	% We have two STC in the tlan file
% Channel one
channel=1;
type=1;
% We will do 128 subcycles
	vec_len=505;	% A total of 505 samples is taken in each IPP
	sub_vec_len=505;% We will use all samples for calculations
	data_start=0;	% Data starts at position 0 in channel boards memory
	max_lag=0;	% Calculate an power profile
	nr_loops=128;	% We are dealing with 128 code cycles
	nr_rep=10;	% We will do 10 rep for one integration cycle (5.05 s)
	res_mult=10;	% We will do 10 data slice
	res_save=1;	% Save the raw data for later use
	send_raw=1;	% send raw data to server and do the calculations there
	ad_dc_rem=1;	% Use clutter subtraction
	nr_clutter_samp=150;	% do the clutter subtraction on the first 150
				% samples in each code set
% Note, due to the layout of the clutter subtraction we need to have an
% even numbers of nr_rep as we are doing clutter subtraction from complete
% code set to another
end_type
type=4;			% We will to fir:ed decoding
% We will do 128 subcycles
	vec_len=505;	% We will take 505 samples in each IPP
	sub_vec_len=505;% We will use all of these samples for each IPP
% Each subcycle will have 4 baud code
	fir_len=4;	% Text file with fir coefficients for decoding
	fir_file=code64_128_reshape.txt;
	nr_fir_passes=16;% We will decode the whole IPP
	data_start=0;	% Where data is found in channel board memory
% Do 15 lags 24 us apart
	max_lag=6630; % Number of lags will be (max_lag/lag_incr)
	lag_incr=442; % lag_incr is sub_vec_len-fir_len+1-(fir_passes-1)*code_len
	nr_loops=128;	% Number codes for a complete set
	nr_rep=10;	% We will have 10 complete code set for an integration period
	res_mult=10;	% 10 time slice for the output
	res_use=1;	% Use the same raw data as saved before
	send_raw=1;	% Do the calculations in server
	ad_dc_rem=1;	% Do clutter subtraction
	nr_clutter_samp=150;	% Do clutter subtraction on the first 150 samples
end_type
end_chan
% Channel two
% Calibration channel
channel=2;
type=1;
	vec_len=40;
	sub_vec_len=20;
	sub_data_start=20;
	nr_loops=64;
	max_lag=0;
	data_start=0;
	send_raw=1;
	res_save=1;
	nr_rep=10;
end_type
% Background channel
type=1;
	vec_len=40;
	sub_vec_len=20;
	nr_loops=64;
	max_lag=0;
	data_start=0;
	send_raw=1;
	res_use=1;
	nr_rep=10;
end_type
end_chan



arc_slice.elan


#############################################################################
# arc_slice.elan
#
#   EROS3 script for arc_slice experiment. 
#
#   Versions: 1.00  Initial version, June 2002
#
# 13-June-2002 AW
#############################################################################

proc arc_slice { azim  elev } {

    set Antenna 32m
    set Azim  $azim                 ;# These values will go to parameter block
    set Elev  $elev                 ;# 

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

    set XDIR /kst/eros4/exp/arc_slice
    set FIR /kst/eros4/fir

    set Expname  "arc_slice"              
    set Expid    "kst0 arc_slice 1.00"       
    set Corrfile $XDIR/$Expname.fil
    set Iper_us  5050000

    set Filter $FIR/w83d60.fir     ;# +-80kHz filter for 6 usec sampling


    set TxFrq $XDIR/$Expname.frq
    set NCO1 $XDIR/ch1_arc_slice.nco
    set NCO2 $XDIR/ch2_arc_slice.nco
    
    #############
    # Actual work
    #############

    # Stop receiver --

    SYNC -10

    stopradar -rec
    stopradar -trans
    stopdata

    # Load radar controller --


    loadexciter $TxFrq

    loadradar rec -loopc 5 -sync 4000 -file $XDIR/${Expname}_esr.rbin  -prog1 0    
	            ;# 10 <==> for 5.05 sec integration period

    loadradar trans -loopc 5 -sync 4000 -file $XDIR/${Expname}_esr.tbin -prog1 0     

    # Load filters --

    loadfilter $Filter ch1,2

    # Set frequencies --

    loadfrequency $NCO1 ch1
    loadfrequency $NCO2 ch2


    # Start radar controllers --

    SYNC 2
    armradar rec -prog1
    armradar trans -prog1
    startradar EXPSTART 5.00        


    # Start data access ---------------------------------------------------------

    SYNC 4

    startdata $Corrfile $Expid $Iper_us $Antenna

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

    SYNC 4
    disablerecording

    # Infinite loop, to be keep the experiment alive ---------------------------

    DO -1 {
        DISP "[TimeStamp now -noyear] -- $Expname running
        SYNC 60
    }    
};#arc_slice


arc_slice 180 90.0



arc_slice.frq


#-----------------------------------------
# /kst/eros4/exp/tau0/600/tau0 6.00
# Frequency file for the exciter
# Machine generated - do not edit by hand
# 07-Jun-2002 21:03:13
#-----------------------------------------

0  0 500950000000    # IF = 6.55



esr_exciter_frq.txt


frq(4)			EISCAT file format Documentation		frq(4)

NAME
	frq - frequency files for the ESR

SYNOPSIS
	 /opt/esr0/exp/name/name.frq

DESCRIPTION
	 This file is the description of the frequencies that will be
	 downloaded to the ESR exciter by the loadxc program.
	
	 The program will ignore lines beginning with # or empty
	 lines
	
	 Each remaining line will consist of three numbers, separated
	 by blanks, which represent the unit, location and frequency,
	 respectively. The unit will be 0, 1, 2 or 3, and represents
	 which of the independent Direct Digital Synthesis (DDS)
	 units that will use this particular frequency. location
	 will be from 0 to 15, and says which of the 16 pre-
	 programmed frequencies (for each unit) we're defining.
	 frequency is the requested transmit freqency in mHz. The
	 transmitter center frequency will be 500000000000. The
	 maximum accuracy of the DDS running on 60 MHz is 14 mHz.

EXAMPLES
	 These lines are taken from the gup0 frequency file. Only
	 the first few locations of each unit is used, and only those
	 lines are shown.

		 0 0 498875000000
		 0 1 499625000000
		 0 2 501500000000
		 0 3 500000000000
		 [...]
		 1 0 500125000000
		 1 1 500625000000
		 1 2 501500000000
		 1 3 500000000000
		 [...]
		 2 0 499375000000
		 2 1 499875000000
		 2 2 501500000000
		 2 3 500000000000
	 [...]
	 3 0 500375000000
	 3 1 500875000000
	 3 2 501500000000
	 3 3 500000000000
	 [...]
	 3 15 500000000000

EISCAT			 Last change: 97/03/08				 1

frq(4)			 EISCAT file format Documentation		 frq(4)

NOTES
	 Previous versions of the frequency file had several more
	 coloumns of numbers. These coloumns are no longer read.

SEE ALSO
	 loadxc(1)

EISCAT			 Last change: 97/03/08				 2



ch1_arc_slice.nco


NCOPAR_VS       0.1
%======================================
% ch1_arc-u
%======================================
NCO     1        6.55  



steffe.elan


#############################################################################
# steffe.elan
#############################################################################
# Ion line DSP
# CH1 0-382		Zero lag Signal 368 points and 15 points noise inj.
# CH1 383-21675		368 points signal 35 lags frac. 6  30 clutter samp.
# CH2 21676-22135	460 samples background
# CH3 22136-22427	Zero lag 77 + 200 +15 points noise inj
# CH3 22428-25249	77 points signal E region max lag 31 frac. 2 clutter samp. 30
# CH3 25250-30216	200 points signal high F max lag 16 frac. 2 clutter samp. 0
############################################################################
# Plasma line DSP 
# CH1 0-127		128 points FFT 0.6 us sampling at 4 MHz upshifted plasma line
# CH1 128-255		128 points FFT 0.6 us sampling at 4 MHz upshifted plasma line
# CH1 256-383		128 points FFT 0.6 us sampling at 5.3 MHz upshifted plasma line
# CH1 384-511		128 points FFT 0.6 us sampling at 5.3 MHz upshifted plasma line
# CH5 512-639		128 points FFT 0.6 us sampling at 4 MHz downshifted plasma line
# CH5 640-767		128 points FFT 0.6 us sampling at 4 MHz downshifted plasma line
# CH5 768-895		128 points FFT 0.6 us sampling at 5.3 MHz downshifted plasma line
# CH5 896-1023		128 points FFT 0.6 us sampling at 5.3 MHz downshifted plasma line
############################################################################
# channel ch1,ch2 and ch3 operated at 16 us sampling and ch1 plasma line DSP at 0.6 us
# E region range coverage: Lowest partial decoded range gate 36 km, fully decoded 105 km,
# highest decoded 216 km
# F region range coverage: Lowest partial decoded range gate 45 km, fully decoded 259 km, 
# highest decoded 924 km
# F high region coverage: Lowest partial decoded range gate at 490 km, fully decoded 559 km,
# highest decoded 965 km
#############################################################################

block steffe {{Scan fixed} {Owner CP}} {

    ##################
    # select data disk
    #################
    #mount /data
    #mount /data2
  
    set Invert   no
    set Expname  "steffe
    set Version 1.40 ;	# New version with plasma line reinstalled 5/1 2004
    set Site "l
    set Int 6.4
    set Expid    "kst0 ${Expname}${Site}_${Scan}_${Version}_${Owner}

    set XDIR    /kst/exp/${Expname}_new_plasma
    set CORR    $XDIR/${Expname}.fil
    set CORR_PLASMA    $XDIR/${Expname}_plasma.fil
    set FIR     /kst/dsp/fir
    set SCAN_FILE /kst/exp/scans/esr/${Scan}_pattern.elan

    set RBIN32  $XDIR/${Expname}@32m_ionesr.rbin
    set RBINPLASMA32 $XDIR/${Expname}@32m_plasmaesr.rbin
    set RBIN42  $XDIR/${Expname}@42m_ionesr.rbin

    set TBIN32  $XDIR/${Expname}@32m_esr.tbin
    set TBIN42  $XDIR/${Expname}@42m_esr.tbin

    set NCO1 $XDIR/ch1_${Expname}.nco
    set NCO2 $XDIR/ch2_${Expname}.nco
    set NCO3 $XDIR/ch3_${Expname}.nco
    set NCOPLASMA1 $XDIR/ch1_${Expname}_plasma.nco
    # Load scan definition file 

    source $SCAN_FILE

    # Timing
    
    if { ${Int} == 3.2 } {
     set Iper_sec  3.2
     set Loops       5
    } else {
     set Iper_sec  6.4
     set Loops      10
    }
    set Syncs       2400

    # Filters, frequencies

    set TXFRQ $XDIR/${Expname}.frq

    set Freq(ch1) 10.375 ;# signal block I
    set Freq(ch2) 10.750 ;# gain   block I
    set Freq(ch3) 10.625 ;# signal block II

    set Filter $FIR/b31d240.fir  ;# +-31 filter for 16 usec sampling
    set Filter1_plasma $FIR/w600d6.fir  ;# +-600 filter for 0.6 usec sampling

    set Iper_us [expr round($Iper_sec*1000000)]

    set Expfiles [list $XDIR/$Expname.elan $SCAN_FILE $CORR $CORR_PLASMA \
        $XDIR/${Expname}@32m.tlan $XDIR/${Expname}@42m.tlan $XDIR/rtg_def.m \
        $NCO1 $NCO2 $NCO3 $NCOPLASMA1 $Filter $Filter1_plasma $TXFRQ ]

    #############
    # Actual work
    #############

    # Stop receiver --

    SYNC -20.0

    stopradar all
    stopdata all

    # Load radar controllers

    loadradar ion -file $RBIN42 -prog1 0       -loops $Loops -sync $Syncs  
    loadradar ion -file $RBIN32 -prog2 4096    -loops $Loops -sync $Syncs
      
##    loadradar pla -file $RBIN32 -prog1 0       -loops $Loops -sync $Syncs
    loadradar pla -file $RBINPLASMA32 -prog1 0 -loops $Loops -sync $Syncs    

    loadradar tra -file $TBIN42 -prog1 0       -loops $Loops -sync $Syncs  
    loadradar tra -file $TBIN32 -prog2 4096    -loops $Loops -sync $Syncs

    # Load filters --

    loadfilter ion $Filter ch1,2,3,4 ;		# Load the ion line DSP box
    loadfilter pla $Filter1_plasma ch1,5;	# Load the plasma line DSP box

    # Frequencies --

    setfrequency ch1 $Freq(ch1) 
    setfrequency ch2 $Freq(ch2)
    setfrequency ch3 $Freq(ch3)

    loadexciter $TXFRQ

    loadfrequency ion $NCO1 ch1	;		# Load nco file to ion line in ch1-3
    loadfrequency ion $NCO2 ch2
    loadfrequency ion $NCO3 ch3
    loadfrequency pla $NCOPLASMA1 ch1,5	;	# Load nco file to plasma line in ch1,5

    # Start radar controllers --

    SYNC 10.0
    
    armradar rec -prog2	;	# Let the ion line radar controller waitr for start
    armradar pla -prog1	;	# Let the plasma line radar controller wait for start
    armradar tra -prog2	;	# Let the transmitter radar controller wait for start
    startradar EXPSTART $Iper_sec       
    
    SYNC 2.0

    # Data access 

    startdata ion $CORR $Expid $Iper_us 32m	;	# Load the proper DSP file for ion line
    startdata pla $CORR_PLASMA $Expid $Iper_us	;	# Load the proper DSP file for plasma line

    writeexperimentfile $Expfiles

    SYNC 4.0

    disablerecording all
   
    # Antenna loop

    pointdirection 181.0 81.6

    SYNC 4
    IDLELOOP

    if { $Invert == "yes" } {
        callblock ${Scan}_pattern $Iper_sec "inverted
    } else {
        callblock ${Scan}_pattern $Iper_sec
    }    

};# main

eval callblock steffe [argv]