[daip] CONFI

Leonia Kogan lkogan at aoc.nrao.edu
Tue Nov 20 12:47:28 EST 2001


----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 66

Douglas,

I have worked a little bit to apply CONFI for ATA optimization.

At June (before SKA meeting) I got the file of one of ATA configuration 
from you via Rick Perley. 

The XY were given at format 2F12.3.

CONFI requires format 2F20.3.

So I wrote a small fortran program outside AIPS to reformat the file.
This program is doing something more: calculate the minimum spacing, 
the maximum baseline and..

I am attaching the fortran codes of this programm (file_reformat.f) 
for the case if you will want to apply CONFI for other configuration.

I am attaching the file (CONFI_INP) with input parameters for CONFI 
I used as an example today.

AS you see I carried aou 200 iteration with the gain 0.001 to optimize sidelobes inside of the sky circle of radius 18*lambda/Bmax, where BMAX=APARM(7) is the 
array size.

I got the improve of 2 times at the sidelobes: 0.0179 for the original
configuration; 0.0089 for the optimized one.
But of cource this only example.

I have not applied the topography constrain (IN2file, BPARM, DPARM)

Usually I use the following sequence to evaluate parameters of the optimized 
array.

1. reRun CONFI with INFILE = OUTFILE, APARM(1) =1 to get the output file format 
   match with the simmulation task UVCON; Use CPARM to instract UVCON 
   to create the output file at the UVCON format

2. Run UVCON using the oufile of CONFI to simulate the UV data.

3. Run UVPLT using the simulated UV data to see the UV coverage.

4. Run IMAGR using the simulated UV data to create the beam file.

5. Run KNTR using the beam file to get the two dimensional beam.

6. Run Slice to get the one dimensional slices of the beam.

7. Use other AIPS task.....

Please ask me any question about CONFI, UVCON.....


Leonia
-----------------------------------------------------------------
Douglass Bock wrote:


Dear Leonia,

Would you be willing to send me the inputs you used to CONFI to optimize
the ATA configuration? I would like to try to use your program, but I am
confused about the many choices!

cheers

Douglas
----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: file_reformat.f
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 55

C Copy a file from one format to another and something more
C Report number of lines at the file
      INTEGER I, NARRAY, K, IM, KM, IMM, KMM
      REAL X, Y, MINX, MINY, MAXX, MAXY, XARR(1000), YARR(1000),
     *   SPACIN, DIST, MAXDIS
      open(unit=8,file='ATA_ORIG_FORMAT')
      open(unit=9,file='ATA_CONFI_FORMAT')
      MINX = 1.E6
      MINY = 1.E6
      MAXX = -1.E6
      MAXY = -1.E6
      DO 100 I = 1, 4000
         READ(8,1000, END=200) X, Y
         XARR(I) = X
         YARR(I) = Y
C         WRITE(9,1100) X, Y
         MINX = MIN(MINX,X)
         MINY = MIN(MINY,Y)
         MAXX = MAX(MAXX,X)
         MAXY = MAX(MAXY,Y)
         IF (MOD (I,50) .Eq. 0) PRINT 1300, X, Y, I
  100    CONTINUE
  200 NARRAY = I - 1
      PRINT 1200, NARRAY
      PRINT 1400, MINX, MAXX, MINY, MAXY
C                                       calculate minimum spacing
      SPACIN = 1.E6
      MAXDIS = 0
      DO 300 I = 1, NARRAY
         DO 250 K = I+1, NARRAY
            DIST = SQRT((XARR(I)-XARR(K))**2 + (YARR(I)-YARR(K))**2)
            IF (DIST .LT. SPACIN) THEN
               SPACIN = DIST
               IM = I
               KM = K
               END IF
            IF (DIST .GT. MAXDIS) THEN
               MAXDIS = DIST
               IMM = I
               KMM = K
               END IF
  250       CONTINUE
  300    CONTINUE
      PRINT 1500, SPACIN, IM, KM
      PRINT 1600, MAXDIS, IMM, KMM
C-------------------------------------
 1000 FORMAT (2F12.3)
 1100 FORMAT (2F20.3)
 1200 FORMAT ('Number of lines at the input file', I10)
 1300 FORMAT (2F12.3, I10)
 1400 FORMAT ('MINX=', F9.3, 'MAXX=', F9.3, 'MINY=', F9.3,
     *   'MAXY=', F9.3)
 1500 FORMAT ('Minimum spacing = ', F5.1, ' between ',I3,'-',I3)
 1600 FORMAT ('Maximum baseline = ', F7.1, ' between ',I3,'-',I3)
      END
----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: CONFI_INP
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 149

AIPS 1: CONFI     Optimize array configuration by minimum side lobes
AIPS 1: Adverbs     Values                 Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME     'EVLA        '          UV file name.
AIPS 1: INCLASS    'TASAV '                Input UV file name (class)
AIPS 1: INSEQ         1                    Input UV file name (seq. #)
AIPS 1: INDISK        1                    Input UV file disk unit #
AIPS 1:                                    The UV file is needed
AIPS 1:                                    only to attach PL table
AIPS 1: INFILE     'EVLA:ATA_CONFI_FORMAT  Filename of the data
AIPS 1:
AIPS 1:               '
AIPS 1:                                    of initial configuration.
AIPS 1:                                    Blank => the initial
AIPS 1:                                    configuration is calculated
AIPS 1: IN2FILE    *all ' '                Filename of the topography
AIPS 1:                                    mask.
AIPS 1:                                    Used also as fixed positions
AIPS 1:                                    of the two  and three circle
AIPS 1:                                    configurations (see HELP)
AIPS 1: CELL          0           0        Size of the cell at mask,
AIPS 1:                                    meters (x, y); 0 => 10m
AIPS 1: BLC        *all 0                  bottom left corner of the
AIPS 1:                                    mask, in meters
AIPS 1: TRC        *all 0                  top right corner of the
AIPS 1:                                    mask, in meters
AIPS 1: OUTFILE    'EVLA:ATA_CONFI_OUT2    Filename of the final
AIPS 1:
AIPS 1:               '
AIPS 1:                                    configuration
AIPS 1:                                    '' => no record a file
AIPS 1: ** press RETURN for more, enter Q or next line to quit print **
#
AIPS 1: NPLOTS        0                    Number of plots of beam's
AIPS 1:                                    pattern at the page.
AIPS 1:                                    0 => 20.
AIPS 1: DOTV          1                    > 0 Do plot on the TV, else
AIPS 1:                                    make a plot file
AIPS 1: APARM       200         0.001      1. Number of iterations.
AIPS 1:             350          18           0 => 1
AIPS 1:               0           0        2. gain in the iterat. loop
AIPS 1:               0.855    *rest 0        0 => 0.001
AIPS 1:                                    3. Number of elements at the
AIPS 1:                                       array. 0 => 64
AIPS 1:                                    4. Outer radius of optimizat.
AIPS 1:                                       circle at the sky
AIPS 1:                                       in main lobe size; 0=>20
AIPS 1:                                    5. Step of the beam calculat.
AIPS 1:                                       in main lobe size 0 => 0.2
AIPS 1:                                    6. 0 => display configuration
AIPS 1:                                       1 => not display it;
AIPS 1:                                    7. Size of the array in km
AIPS 1:                                    8. 0 => The configuration had
AIPS 1:                                            been shifted
AIPS 1:                                       1 => The configuration had
AIPS 1:                                            not been shifted
AIPS 1:                                    9. Inner radius of optimizat.
AIPS 1:                                       circle at the sky
AIPS 1:                                       in main lobe size;
AIPS 1:                                    10.Sector of optimization
AIPS 1:                                       in degrees. < 180 deg.
AIPS 1:                                       0 => 180 deg.
AIPS 1: BPARM      *all 0                  1. Elevation of the source,
AIPS 1:                                       degrees. 0 => 90
AIPS 1:                                    2. Total number of plots of
AIPS 1:                                       the beam pattern; 0 => 20
AIPS 1:                                    3. 0 => auto scale beam plots
AIPS 1:                                       otherwise: Min = 0
AIPS 1:                                                  Max = BPARM(3)
AIPS 1:                                    4. X-shift of configuration
AIPS 1:                                       relatively BLC of mask, m
AIPS 1:                                    5. Y-shift of configuration
AIPS 1:                                       relatively BLC of mask, m
AIPS 1:                                    6. Turn of configuration
AIPS 1:                                       clockwise, degrees
AIPS 1:                                    7. Number of steps in topogr.
AIPS 1:                                       fitting, X, 0 => 50
AIPS 1:                                    8. Number of steps in topogr.
AIPS 1:                                       fitting, Y, 0 => 50
AIPS 1:                                    9. Number of steps in topogr.
AIPS 1:                                       fitting, Rotation,
AIPS 1:                                       0 => 360/STEP
AIPS 1:                                   10. Step in topography
AIPS 1:                                       fitting of rot., degrees
AIPS 1:                                       0 => 5
AIPS 1:                                       see explain of BPARM(4-10)
AIPS 1:
AIPS 1: CPARM      *all 0                  Data to prepare the output
AIPS 1:                                    file at UVCON format
AIPS 1:                                    1. 0 => CONFI format
AIPS 1:                                       1 => UVCON format
AIPS 1:                                    The following CPARMs used
AIPS 1:                                    only  if CPARM(1) = 1
AIPS 1:                                    2. The site latitude, degrees
AIPS 1:                                    3. The site longtitude,
AIPS 1:                                       degrees
AIPS 1:                                    4. Antenna diameter, meters
AIPS 1:                                       0 => 12
AIPS 1:                                    5. Ant. efficiency, 0 => 0.5
AIPS 1:                                    6. Antenna system temperature
AIPS 1:                                       0 => 50K
AIPS 1:                                    7. Number of levels of
AIPS 1:                                       digitizer; 0 => 2 level
AIPS 1:
AIPS 1: DPARM         0           0        1. Initial configuration:
AIPS 1:               0           1           0 => homogeneous
AIPS 1:               0           1                circular array
AIPS 1:              10        *rest 0        2 => two circles
AIPS 1:                                       3 => three circles
AIPS 1:                                       4 => hexagon tile
AIPS 1:                                    2. Number of fixed antennas
AIPS 1:                                    3. Constraints:
AIPS 1:                                       0 => no constraint
AIPS 1:                                       1 => constraint of topogr.
AIPS 1:                                       2 => constraint of 2 circ.
AIPS 1:                                       3 => constraint of donuts.
AIPS 1:                                       4 => constraint topography
AIPS 1:                                            and donuts
AIPS 1:                                       5 => constraint topography
AIPS 1:                                            and 2 circus
AIPS 1:                                    4. 0 => input configuration
AIPS 1:                                            is normalized to 1
AIPS 1:                                       1 => input configuration
AIPS 1:                                            is in meters
AIPS 1:                                    5. 0 => Yes side lobes optim.
AIPS 1:                                            No topography fit
AIPS 1:                                       1 => No side lobes optim.
AIPS 1:                                            Yes topography fit.
AIPS 1:                                       2 => Yes side lobes optim.
AIPS 1:                                            Yes topography fit.
AIPS 1:                                    6. Output file mode:
AIPS 1:                                       0 =>  normalized
AIPS 1:                                       1 =>  in meters
AIPS 1:                                    7. Minimum distance between
AIPS 1:                                       elements, meters
AIPS 1:                                    8. Inner radius of donut, in
AIPS 1:                                       the outer diameter parts.
AIPS 1:                                       radius of the 2nd circle
AIPS 1:                                       if DPARM(1) =2, or 3.
AIPS 1:                                       >0 => the circle is
AIPS 1:                                       concentric
AIPS 1:                                       <0 => the circle is inside
AIPS 1:                                       tangent to the outer
AIPS 1:                                       circle.
AIPS 1:                                    9. radius of the third
AIPS 1:                                       (innerest) circle
AIPS 1:                                   10. number of additional
AIPS 1:                                       elements at the outer
AIPS 1:                                       circle. see explain.



More information about the Daip mailing list