[mmaimcal] Photonic LO

Bryan Butler bbutler at aoc.nrao.edu
Fri Feb 18 12:27:17 EST 2000


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



for those of you not on the sw-ssr mailgroup, this might be
of some interest...

	-bryan

----- Begin Included Message -----

>From owner-alma-sw-ssr at web3.hq.eso.org Fri Feb 18 10:24 MST 2000
Date: Fri, 18 Feb 2000 10:19:14 -0700 (MST)
From: Barry Clark <bclark at aoc.nrao.edu>
To: alma-sw-ssr at eso.org
Subject: Photonic LO
Cc: bclark at zia.aoc.NRAO.EDU, ldaddario at zia.aoc.NRAO.EDU
Sender: owner-alma-sw-ssr at web3.hq.eso.org
Precedence: bulk
Reply-To: alma-sw-ssr at web3.hq.eso.org
Content-Type: X-sun-attachment
Content-Length: 6765
X-Lines: 220
Status: RO

Attached tool knows about most (but not quite all) of the peculiarities
of the photonic LO system.  Try it with your favorite lines.  Enjoy.

Sample session below.

bclark<332>% make loser
cc    -o loser loser.c 
bclark<333>% loser
How many lines? 4
Enter line frequencies, GHz, lowest first:
Frequency of line number 1:  342.883
Frequency of line number 2:  344.2003
Frequency of line number 3:  345.3398
Frequency of line number 4:  347.3306
Enter velocity width (km/s):  100
Will use a bandwidth of 125.0 MHz = 108.0 km/s
Enter topocentric velocity (km/sec):  0
There are 91 different LO setups for this combination.
One is:
First synthesizer = 10.300, harmonic = 33, first LO = 339.925
                  Line 1      Line 2      Line 3      Line 4
Rest frq          342.8830    344.2003    345.3398    347.3306  
Obs frq           342.8830    344.2003    345.3398    347.3306  
LO by FIR alias    -1.2500      0.5000      1.7500      3.7500  
2nd LO harmonic     6.2500      9.8125      9.6875      9.6875  
DDS LO              0.0205      0.0253      0.0398      0.0306  

Enter topocentric velocity (km/sec):  30
There are 96 different LO setups for this combination.
One is:
First synthesizer = 9.880, harmonic = 35, first LO = 345.825
                  Line 1      Line 2      Line 3      Line 4
Rest frq          342.8830    344.2003    345.3398    347.3306  
Obs frq           342.8487    344.1659    345.3053    347.2959  
LO by FIR alias    -1.2500     -2.5000     -3.7500     -2.7500  
2nd LO harmonic     6.2500      6.1875      6.3125      6.2500  
DDS LO              0.0388      0.0341      0.0197      0.0334  

Enter topocentric velocity (km/sec):  -30
There are 88 different LO setups for this combination.
One is:
First synthesizer = 10.320, harmonic = 33, first LO = 340.585
                  Line 1      Line 2      Line 3      Line 4
Rest frq          342.8830    344.2003    345.3398    347.3306  
Obs frq           342.9173    344.2347    345.3743    347.3653  
LO by FIR alias    -1.7500     -0.5000      1.0000      3.0000  
2nd LO harmonic     6.1250      6.1875      9.8125      9.8125  
DDS LO              0.0198      0.0247      0.0393      0.0303 
 
Enter topocentric velocity (km/sec):  ^C
bclark<334>% 

----- End Included Message -----

----------
X-Sun-Data-Type: c-file
X-Sun-Data-Description: c-file
X-Sun-Data-Name: loser.c
X-Sun-Content-Lines: 155
X-Sun-Charset: us-ascii

main()
    {
    int nlines=0;
    int iline;
    int nset, iharm, istep, harm2;
    int itsOK;
    double first, ifcen, secondn, firalias, dds;
    double foma, foml, fomg;
    double firalv[4], firalg[4], ddsg[4], ddsv[4];
    int harm2v[4], harm2g[4];
    int istepg, iharmg;
    double lines[4];
    double doppler;
    double deltav, deltaf;

    printf("How many lines? ");
    scanf("%d",&nlines);
    if(nlines<1 || nlines>4) 
	{
	printf("Must be between 1 and 4\n");
	exit();
	}
    printf("Enter line frequencies, GHz, lowest first:\n");
    for(iline=0; iline<nlines; iline++)
	{
	printf("Frequency of line number %d:  ",iline+1);
	scanf("%lf", &lines[iline]);
	}
    printf("Enter velocity width (km/s):  ");
    scanf("%lf", &deltav);
    if(deltav<1 || deltav > 30000)
	{
	printf("Get real.  I won't deal with a width of %f km/sec\n",
	   deltav);
	exit();
	}
    for(deltaf=2; deltaf/lines[nlines-1] > deltav/200000; deltaf /=2);
    if(deltaf < 0.03) deltaf = 1/32.0;
    printf("Will use a bandwidth of %.1f MHz = %.1f km/s\n", 1000*deltaf,
       300000*deltaf/lines[nlines-1]);
    if(lines[nlines-1]-lines[0]+deltaf > 16)
	{
	printf("Can't do this - requires %f > 16 GHz instantaneous bandwidth\n",
	   lines[nlines-1]-lines[0]+deltaf);
	exit();
	}
    
    /* let user suggest some doppler factors */
    for(;;)
	{
	printf("Enter topocentric velocity (km/sec):  ");
	scanf("%lf", &doppler);
	doppler /= 300000;
	doppler += 1;
	nset = 0;
	fomg = 99;

	/* check each harmonic on the optical comb */
	for (iharm=3; iharm<91; iharm++)
	    {
	    if(iharm*10.425 < lines[nlines-1]-8) continue;
	    if(iharm*8.600 > lines[0]+8) break;

	    /* check each step of the synthesizer */
	    for(istep = 1720; istep < 2086; istep++)
		{
		first = iharm*istep*0.005 + 0.025;
		if(first < lines[nlines-1]-8) continue;
		if(first > lines[0]+8) break;

		/* now check each line */
		itsOK = 1;
		foml = 0;
		for(iline=0; iline<nlines; iline++)
		    {
		    ifcen = lines[iline]/doppler - first;

		    /* rcvrs below 80 have only one sideband, upper I think
		    */
		    if(lines[iline]/doppler<80 && ifcen < 0)
		       itsOK = 0;
		    if(ifcen < 0) ifcen = -ifcen;
		    
		    /* check that not on analog filter rolloffs */
		    if(ifcen - deltaf/2 < 0.08 || 
		       (ifcen - deltaf/2 < 4.08 && ifcen + deltaf/2 > 3.92)
		       ||
		       ifcen + deltaf/2 > 7.92)
			 itsOK = 0;
		    
		    /* calculate desired 2nd LO */
		    if(ifcen < 4) 
			{
			secondn = 2 + ifcen + deltaf/2;
			for (firalias=0; secondn-firalias < 6.09;
			   firalias -= 2*deltaf);
			}
		    else
			{
			secondn = 6 + ifcen + deltaf/2;
			for (firalias=0; secondn-firalias > 9.91;
			   firalias += 2*deltaf);
			}
		    harm2 = (secondn - firalias - 0.030)/0.0625 + 0.5;
		    dds = secondn - firalias - harm2 * 0.0625;
		    foma = dds - 0.03;
		    if(foma<0) foma = -foma;
		    if(foma > foml) foml = foma;
		    if(dds < 0.011 || dds > 0.049) itsOK = 0;
		    firalv[iline] = firalias;
		    harm2v[iline] = harm2;
		    ddsv[iline] = dds;
		    }
		if(!itsOK) continue;
		nset++;
		if(foml < fomg)
		    {
		    fomg = foml;
		    for(iline=0; iline<nlines; iline++)
			{
			firalg[iline] = firalv[iline];
			harm2g[iline] = harm2v[iline];
			ddsg[iline] = ddsv[iline];
			}
		    istepg = istep;
		    iharmg = iharm;
		    }
		}
	    }
	printf("There are %d different LO setups for this combination.\n",
	   nset);
	if(nset==0) continue;
	printf(
	  "One is:\nFirst synthesizer = %.3f, harmonic = %d, first LO = %.3f\n",
	     istepg*0.005, iharmg, istepg*iharmg*0.005 + 0.025);
	printf("                  ");
	printf("Line 1      Line 2      Line 3      Line 4\n");
	printf("Rest frq        ");
	for (iline=0; iline<nlines; iline++) 
	    printf("%10.4f  ",lines[iline]);
	printf("\nObs frq         ");
	for (iline=0; iline<nlines; iline++) 
	    printf("%10.4f  ",lines[iline]/doppler);
	printf("\nLO by FIR alias ");
	for (iline=0; iline<nlines; iline++) 
	    printf("%10.4f  ",firalg[iline]);
	printf("\n2nd LO harmonic ");
	for (iline=0; iline<nlines; iline++) 
	    printf("%10.4f  ",harm2g[iline]*0.0625);
	printf("\nDDS LO          ");
	for (iline=0; iline<nlines; iline++) 
	    printf("%10.4f  ",ddsg[iline]);
	printf("\n");
	}
    }



More information about the mmaimcal mailing list