FAKE FAKE produces a standard MERGE file and/or (u,v) plots of artificial data, which may be useful for testing programs, planning experiments, and designing VLBI and optical interferometer arrays. Example FAKE Run 1 (VMS): A radio interferometer $ FAKE OUTPUT = DAISYG.MRG MODEL = DAISYG.MOD RA = 18:03:39.177 DEC = 78:27:54.21 YEAR = 1982 DAY = 95 START = 06:00:00 STOP = 18:00:00 INTEG = 600 FREQ = 4989 SOURCE = DAISYG NUP = 3 STATIONS = BONN, HSTK, NRAO, FDVS, OVRO EFFICIENCY = 0.5, 0.5, 0.5, 0.5, 0.5 DIAMETER = 100, 34, 43, 25, 40 POINTING = 1, 1, 1, 1, 1 TSYS = 75, 120, 40, 120, 70 BANDWIDTH = 1.8 ERRMULT = 0.01 / Example FAKE Run 2 (UNIX C Shell): A normal (adding) lunar optical interferometer fake << EOD OUTPUT = blrwyem15.mrg MODEL = blrmag15.mod RA = 6:00:00 DEC = 45:00:00 FLUX = 0 ! Observations done on Autumnal equinox of 1949, when lat/long and ! RA/DEC are aligned YEAR = 1949 SOURCE = "BLRM15 at lat=45" STATIONS = WYE-1, WYE-2, WYE-3, WYE-4, WYE-5, WYE-6, WYE-7, WYE-8, WYE-9, WYE-10, WYE-11, WYE-12 EFFICIENCY = 0.9 DIAMETER = 3 TSYS = 70 BANDWIDTH = 3.55e7 DAY = 264 STARt = 0:00:00 STOP = 328:00:00 FAKE Page 2 ! Assume each 2 hour observation is one of twelve different sources, ! returing to each source every 24 hours INTEG = 2:00:00 NONOFF = 1, 11 PHASES = 0 PLOTFILE = blrwyem15fak.plt/$PLOTTER ! Optical frequency in MHz of Lyman alpha line at redshift of 0.158 ! (3C 273) FREQUENC = 2.13e9 ! Lunar rotation period in hours ROTATION = 656.0 ! Data for two-element optical interferometer(s) follows: OPTICAL NPIX = 1024 READOUT = 1 TZODI = 275 EZODI = 1.E-7 QE = 0.5 / EOD Example FAKE Run 3 (UNIX C Shell): A nulling (subtracting) lunar optical interferometer (for the purpose of detecting extrasolar planets) fake << EOD OUTPUT = sej1e7.mrg MODEL = earthjup.mod RA = 6:00:00 DEC = 45:00:00 FLUX = 0 YEAR = 1949 SOURCE = "E-J at lat=45" STATIONS = WYE-1, WYE-2, WYE-3, WYE-4, WYE-5, WYE-6, WYE-7, WYE-8, WYE-9, WYE-10, WYE-11, WYE-12 EFFICIENCY = 0.9 DIAMETER = 3 TSYS = 70 BANDWIDTH = 4.996e6 DAY = 264 STARt = 0:00:00 STOP = 328:00:00 ! Integrate for 9.66 hr per (u,v)-point; stay on source whole lunar ! night INTEG = 9:40:00 PHASES = 0 PLOTFILE = sej1e7fak.plt/sun ! Infrared frequency in MHz at 12 microns (where planet detection may ! work) FREQUENC = 2.498e7 ROTATION = 656.0 OPTICAL ! Here we use NPIX=1 for a simple intensity detector NPIX = 1 FAKE Page 3 READOUT = 1 TZODI = 275 EZODI = 1.E-7 QE = 0.5 NULLING = 1.E-7 ! Subtract from the data a model consisting of the first 2 components ! of the input model, scaled to a flux of 1.499819 Jy NCSUB = 2 SUBFLUX = 1.499819 / EOD FAKE is usually run from a command file, of which these are examples; if the VMS file is called FAKE.COM, it can be run at a terminal by typing @FAKE or as a batch job by typing SUBMIT FAKE. If the UNIX file is called "fake.csh", it can be run at a terminal by typing "csh fake.csh". FAKE can be run interactively by simply typing the command FAKE and then supplying the parameters in the format specified. The FAKE command starts the program. The symbol FAKE is defined in VLB:LOGIN.COM for VMS, or by putting the local "vlb" directory in your path (see your system manager). The various parameters controlling the running of FAKE are specified directly after the command; they follow the usual format (see VLBHELP INPUT). SUMMARY OF PARAMETERS Brackets [] indicate default values. Where no default is indicated, the parameter is an on/off switch. RA = hh:mm:ss.s *** compulsory *** DEC = dd:mm:ss *** compulsory *** START = hh:mm:ss *** compulsory *** STOP = hh:mm:ss *** compulsory *** NUP = n [ 2 ] YEAR = nnnn [ current year ] DAY = nnn [ 1 ] FREQ = n1,n2,... *** compulsory *** INTEG = hh:mm:ss *** compulsory *** SOURCE = "name" [ " " ] TITLE = "title" [ no default ] FLUX = nn [ total model flux ] STATIONS="name","name",... *** compulsory *** TELEMETRY="name","name",... *** compulsory if one or more STATIONS is an orbiter *** TELANGLE = angle [ 180 ] NONOFF = n1,n2 [ 1, 0 ] ROTATION = period [ 24/1.0237... ] NODATA [ default is false, i.e. DATA] OUTPUT = "filename" [ "OUTPUT" ] FAKE Page 4 MODEL = "filename" [ "MODEL" ] NOCLOSE ERRADD = x1,x2,x3,... [ if radio, 2% of FLUX, ... ] [ if optical, 0,0, ... ] TSYS = x1,x2,x3,... [ 0,0,...; compulsory, if OPTICAL] EFFICIENCY = x1,x2,x3,... [ 0,0,...; compulsory, if OPTICAL] DIAMETER = x1,x2,x3,... [ 0,0,...; compulsory, if OPTICAL] POINTING = x1,x2,x3,... [ 0,0,... ] BAND = x [ 0.0; compulsory, if OPTICAL] ERRMULT = x [ 0.0 ] TIMESCALE = n [ 30 ] ERRSCALE = x1,x2,x3,... [ 0,0,... ] LONG PHASES [ = x] [ 360.0 ] PERFECT [ default is not PERFECT] SEED = random-number-seed [ 3456757 ] NCSUB = n [ -1 ] SUBFLUX = x [ 0 ] OPTICAL [ default is not OPTICAL, i.e. radio ] NPIX = n [ 1024 ] READOUT = x [ 1 ] TZODI = x [ 275 ] EZODI = x [ 1.E-7 ] QE = x [ 0.5 ] NULLING = x [ -1, i.e., adding (not NULLING) optical interferometer ] UVPLOT [ default is no UVPLOT ] PLOTFILE = "filename" [ TEKTERM ] UMAX = x [ calculate ] VMAX = x [ calculate ] NOINVERT NGRDIL = n [ 1 ] MARK [ -1 (dot) ] LINEWIDTH [ 1 ] DOTSIZE [ = LINEWIDTH ] FONT [ 1 ] COUNT FAKE Page 5 DISCUSSION FAKE can produce a simulated VLBI MERGE-format dataset, a (u,v) plot of the experiment, or both. Default is dataset only. Certain parameters have an effect regardless of the choice, certain ones are ignored if NODATA is specified, and certain ones are ignored unless UVPLOT is specified. The format of the output dataset is MERGE format version 1, unless orbiters are specified or the rotation rate of the interferometer (ROTATION) is other than a normal sidereal day. 1 GENERAL PARAMETERS RA and DEC are 1950 coordinates - compulsory, no defaults. START and STOP specify the UT range of the pseudo-observation - compulsory, no defaults; the program calculates at what times the source is visible within this range. Fake data are generated for those times between START and STOP at which the source is visible from at least NUP stations. The default value of NUP is 2, which is also the minimum. The maximum value of NUP is the actual number of stations. INTEG is the time interval between data points - compulsory, no default. The two parameter list NONOFF allows data to be recorded intermittently, as in a switching experiment, for example. The first value is the number of INTEG times ON source and the second is the number OFF source. Default is NONOFF=1,0 , i.e. on source for all integration times. If NONOFF(2) is zero or negative, the results are identical to the default, regardless of the value for NONOFF(1). YEAR (default current year) and DAY (day of year - default 1) specify the starting epoch of the observation. The position is precessed to 0h UT on this day. FREQ is the frequency in MHz. At least one frequency must be specified and up to 10 may be. The average frequency is stored in the MERGE-format header file as the observing frequency. One data record for each is produced for each integration of each frequency. Multiple frequencies should be used to simulate the effects of frequency systhesis only, as the total system bandwidth is divided among the frequency bands (see below). Observations at widely-spaced frequencies should be separate runs of FAKE. The MERGE-format file produced when more than one frequency is requested has been designated version 3. [At the present time (13 August 1984) no VLBI or AIPS programs can read the file. This will change as the version 3 format evolves and other programs are changed.] SOURCE provides an optional source name, and TITLE an optional title or comment (History entry) for the output file. FLUX is the total flux of the source in Jy; the default is the total model flux. FAKE Page 6 STATIONS: at least two station names must be provided, and up to 40 may be. The X,Y,Z coordinates of the stations are found by searching a catalog with logical name STATIONS (as in HAZI); this logical name is set up in the VLB:LOGIN.COM file to refer to the file VLB:STATIONS.DAT. One or more orbiting VLBI observatories can also be included in the STATIONS list. FAKE will recognize the requested station as an orbiter and read the parameters in STATIONS.DAT as orbital elements rather than X,Y,Z. TELEMETRY: If orbiters are requested, a TELEMETRY station list must be specified. Data for an orbiter will not be generated unless at least one of these latter stations has line-of-sight contact with it. A ground antenna cannot appear in both the STATIONS and TELEMETRY lists. If TELEMETRY="NONE" is specified, FAKE will assume a VLBI recorder is on board the spacecraft and take data without checking telemetry links. TELANGLE: this parameter allows you to specify the maximum angle allowed between the spacecraft's telemetry antenna and the spacecraft axis (line of sight of the main antenna). The default is to have no constraint on the spacecraft telemetry antenna motion (TELANGLE = 180 degrees). TELANGLE = 0 would restrict the telemetry antenna to point only directly away from the radio source being observed. Parameter ROT[ation] is the rotation period of the observation platform in hours of UT. The default is 24.0/1.0027379093 hours, the sidereal rotation period of the earth. It is can be used for simulations of an orbiting optical interferometer with multiple apertures fastened on a structure which rotates about the pointing axis. Normally in such simulations one places the program source at one of the celestial poles and the apertures around the corresponding terrestrial pole. ROT is also useful for performing simulations of interferometric arrays on gravitating bodies other than the earth (such as the moon). In these latter simulations, the RA and DEC parameters actually refer to the latitude and longitude of the source and the experiment is done at a time when RA and DEC coincide with lat and long (e.g., day 264 of 1949). ROT allows the (u,v)-coverage to be built up at different rates while maintaining the same noise properties of the instrument. 2 DATA GENERATION PARAMETERS (RADIO INTERFEROMETRY DATA) If NODATA is NOT specified, the following parameters will be important in the computation of a simulated MERGE-format dataset. OUTPUT and MODEL are used to specify file names for the new MERGE-format file and for the input model file. If NOCLOSE is specified, closure phases are not calculated. Gaussian noise and errors are added to the data according to the setting of the following parameters: FAKE Page 7 1. ERRADD specifies the amplitude of additive gaussian noise in Jy for each entry in the STATIONS list. Errors on a baseline IJ are computed using SQRT[ERRADD(I)*ERRADD(J)] as the mean value. Any negative or zero value is replaced by the one preceding it in the ERRADD array: for any list which is shorter than the STATIONS list the last ERRADD value is repeated for the remaining stations. A non-positive value for ERRADD(1) or no value defaults to 2% of FLUX. 2. Alternatively, the user can choose to have the ERRADD array computed from arrays of system temperatures in degrees (TSYS), antenna efficiencies (EFFICIENCY), antenna diameters in meters (DIAMETER), pointing efficiencies (POINTING), and from the total system bandwidth in MHz (BANDWIDTH) with the formula ERRADD(I) = TSYS(I) / (2E-4 * SQRT(1E6*BAND*INTEG) * EFF(I) * DIAM(I) * DIAM(I) * POINT(I)). The elements in the arrays must match the order of the stations array. As with ERRADD any incomplete array is filled with the last value specified. This computation lies dormant until one or more values are specified for TSYS, EFFICIENCY, DIAMETER, and POINTING. FAKE then ignores any values specified for ERRADD, checks that all quantities have been properly entered, and computes a new ERRADD array. If more than one FREQ has been specified, the BANDWIDTH is evenly divided among the frequency bands. 3. ERRMULT specifies multiplicative gaussian noise as a fraction of expected visibility; default 0.0. Negative values of ERRMULT are not allowed. ERRADD and ERRMULT specify errors which are independent from point to point and baseline to baseline. In addition you can specify random scaling errors for each station that are correlated over a longer time interval: 1. TIMESCALE specifies the approximate length of correlation, in minutes; default 30. 2. ERRSCALE specifies scaling errors, one for each station; each value is the typical attenuation for the corresponding station; values in the range 0 to 0.1 make the amplitudes look fairly authentic. A zero value implies that no scaling error should be included for that station. Default is 0 for all stations, ie no scaling errors at all. If LONG is specified, scaling errors will be printed for each integration time; default is no listing. For simulating VLB observations, totally random station-dependent errors are added to the visibility phases. This may be suppressed by modifying parameter PHASES; eg PHASES=0 specifies no random station-dependent phase errors. PHASES=x specifies random errors uniformly distributed between 0 and x degrees; the default is PHASES=360. FAKE Page 8 If PERFECT is specified, NO random errors are added to the amplitudes and phases. ERRSCALE and PHASES are ignored, and ERRADD and ERRMULT are only used to compute the size of the error bars. Use the parameter SEED to control the random number generator. Change the value of SEED to get a different random number sequence (i.e., a different realization of the noisy dataset). Keep SEED constant in order to get the same realization in different runs of the program. A "poor man's" MODELFIT and UVSUB can be accomplished by using NCSUB and SUBFLUX. If specified, the first NCSUB components of the input model are used to compute model visibilities which are then subtracted from the noisy data. The model flux can be scaled to something other than the sum of the component fluxes if SUBFLUX is specified. Model subtraction is very important for nulling interferometers and, at present, MODELFIT does not have the double precision necessary for a proper subtraction. The default, of course, is to not subtract a model. 3 DATA GENERATION PARAMETERS (OPTICAL INTERFEROMETRY DATA) When OPTICAL is specified, the data generated are similar to the radio data, with the following exceptions. Photon statistical noise errors, readout noise, zodiacal light contamination, thermal emission from the optics, and quantum efficiency are taken into account automatically. The model fluxes, therefore, cannot be scaled; they must represent the correct source flux in Jy. TSYS, EFFICIENCY, DIAMETER, and BAND are compulsory. (POINTING is not at the moment.) TSYS is the temperature of the optical surfaces, EFFICIENCY is the overall reflectivity of the optical system, DIAMETER is the diameter of the telescope mirror, and BAND is the bandwidth of the filter used. TZODI and EZODI are the temperature and emissivity of the zodiacal light, READOUT is the readout noise in counts per pixel, NPIX is the number of pixels in the detector, and QE is the quantum efficiency. These effects can be turned off by setting TSYS=0 or EFF=1.0, TZODI=0, READOUT=0, or QE=1.0. ERRADD defaults to zero if OPTICAL is specified, but can still be used for further error additions, if desired. Beam combination is assumed to be performed in NS*(NS-1)/2 Michelson interferometers, formed by splitting each telescope output into (NS-1) beams. Two types of interferometers are possible: a normal adding interferometer, which is assumed to combine the two beams on a linear array of NPIX pixels, and a nulling interferometer, which applies a 180 degree phase shift to one beam before interference in order to null out light produced by a point source at the phase center. If NULLING is negative (the default), a normal adding interferometer will result. The photon statistical noise is computed from the (unitless) visibility squared. [ERRVSQ = SQRT(PI*PI*(1+NPIX*READOUT**2)/(4*NPHTOT*NPHTOT) + VSQ/NPHTOT), where NPHTOT is the total number of photons incident on the detector array, and VSQ is the square of the visibility.] A Gaussian approximation is FAKE Page 9 used to compute the random errors resulting from this photon noise. A nulling interferometer results if NULLING is given a non-negative value. The value of NULLING specifies the degree to which the nulling is exact. That is, the average error by which the phase shift deviates from 180 degrees is given by ASIN(SQRT(2*NULLING-NULLING**2)). Random phase errors of this magnitude are added to the data before detection. The output of a nulling interferometer is a single real number, (FLUX-VISR), where VISR is the real part of the visibility amplitude (in Jy), and not a complex value. In the output data file, FAKE sets the visibility amplitude equal to (FLUX-VISR) and the phase equal to 180 degrees, as VISI is not measured. This value of the phase gives any model components not at the phase center positive flux in the final map. These components will also have ghost images because of the 180 degree ambiguity. Photon statistical errors are computed from ERRAMP = DETFLUX*SQRT(PI*PI*NPIX*READOUT**2/(4*NPHTOT*NPHTOT) + 1/NPHTOT), where DETFLUX is the total flux (in Jy) incident on the detector. Normally, NPIX can be taken to be unity, but this is not the default. Note that POINTING errors, which could be significant for a nulling interferometer are not taken into account at present. However, these can be simulated crudely by increasing NULLING. 4 (U,V)-PLOT GENERATION PARAMETERS If UVPLOT is specified, the following parameters will be important for producing (u,v) diagrams. Most of the functions are identical to those in the program UVPLOT, except that no contour plotting is possible. Specifying NODATA and UVPLOT is an alternative to running the program HAZI. PLOTFILE is the output device/type. Default is to plot to TEKTERM. Plot axes will extend from -UMAX to +UMAX and -VMAX to +VMAX (in wavelengths). When not specified, plot limits are computed for ground station only experiments in the same manner as HAZI. If orbiters are involved, the orbit is assumed circular with a radius equal to the apogee, projected as an ellipse in the (u,v) plane, and then used with ground stations to determine UMAX and VMAX. NOINVERT suppresses the plotting of conjugate (u,v) points. NGRDIL is the factor by which the density of ground-ground (u,v) points is diluted. It is useful for speeding up plotting when many ground stations and only a few orbiters are used. Only every NGRDILth point is plotted for ground-ground baselines. A very high number suppresses ground-ground baselines entirely. The plot's appearance is determined by MARK, LINEWIDTH, DOTSIZE, and FONT. MARK specifies the symbol to be used for plotting each (u,v) point. (Default is -1 [dot]. See PGPLOT documentation for other examples.) LINEWIDTH and DOTSIZE control the width of lines and points plotted. Width increases with value (1-5). (Default FAKE Page 10 LINEWIDTH=1 and default DOTSIZE=LINEWIDTH.) FONT sets the font style for axis labels. (See PGPLOT for possible fonts. Default=1.) Finally, if COUNT is specified, the number of datapoints plotted on each baseline is typed out after the total number of points and mean epoch. 5 LIMITATIONS FAKE can handle up to 40 observing stations, 15 telemetry stations, 10 frequency bands, and a model with up to 2000 components (larger models are truncated at 2000 components). All standard types of model component are accepted (types 0-5: see VLBHELP INTRO). The subroutine to follow an orbit through time includes only the central force due to the earth with oblateness ("J2") corrections. Higher order earth terms, the sun, moon, etc. are not included. 6 ORBITING STATIONS IN THE STATIONS.DAT FILE Orbiting stations are entered into the stations file by listing the station name, orbit semi-major axis, eccentricity, inclination, ascending node, periapsis, mean anomaly, and year, month (number), day, hour, minute, second of the orbit epoch with the following format statement: (A8,2X,F10.0,2(F16.0.9X),F5.0,5X,2F5.0,I5,I3,I4,F16.0,F3.0,F6.3,I5). The 132nd character (the last I5) in the record must be a "2" to instruct FAKE to read the record entries as orbital parameters. Revision history: Version Date Changes 1.0 1979 Jul 5 2.0 1979 Oct 16 Table lookup for stations Increase to 15 stations 3.0 1980 Jan 19 Add precession Add random scaling errors Take account of telescope limits 3.1 1980 Mar 27 Add NUP parameter 3.2 1980 Jun 24 Correct bug ERRADD or ERRMULT = 0 3.8 1981 May 23 Permit comments in model file 4.0 1981 Dec 9 Add telescope phase errors and parameters PHASES, MODEL, OUTPUT 4.1 1981 Dec 19 Correct bug in ERRSCALE handling 4.2 1982 Feb 1 Improved SCALE errors (RPL) 4.3 1982 Jun 8 Up to 2000 model components 4.4 1982 Nov 15 Add parameter PERFECT and extend to all model types 5.0 1983 Jul 5 Convert to MERGE-format 2 so orbiting FAKE Page 11 stations can be handled. Use rotation matrix to compute u,v,w. (D.L. Meier) 5.2 1983 Aug 16 Make ERRADD an array (TJP). 5.3 1983 Aug 17 Add LONG parameter (DLM). 5.4 1983 Aug 21 Add TELEMETRY option for orbiters (DLM). 5.5 1983 Aug 28 Add NONOFF parameter; increase MAXS to 20 (DLM). 5.6 1983 Oct 17 Add history record specifying ERRSCALE and PHASES; add checks for errors in TELEMETRY. Allow FAKE to create a Merge format version 1 file when no orbiters are present (DLM). 5.7 1983 Dec 2 Increase MAXS to 40 (DLM). 6.0 1984 Jan 4 Add NODATA and UVPLOT options with associated parameters (DLM). Add NGRDIL. 6.1 1984 Jan 17 Fix bugs introduced into V6.0 (DLM). 6.2 1984 Apr 5 Fix bug in UVPLOT axis-choosing routine (DLM). 6.3 1984 Jul 17 Add ability to do VLBI at more than one frequency (FREQ=freq1, freq2,...) (DLM). 6.4 1984 Jul 25 Add ability to compute ERRADD from TSYS, EFF, DIAM, POINT, BANDW, and INTEG (DLM). 6.5 1984 Aug 13 Fix bugs introduced into V6.3 and 6.4 (DLM). 6.6 1984 Oct 17 Change default ERRMULT to 0, to agree with help file (TJP/DLM). 6.7 1987 Feb 2 Add parameter TELANGLE to suppress data when spacecraft telemetry antenna cannot point to a ground telemetry station (DJ). 6.8 1987 Sep 4 Replace all GRPCKG calls with PGPLOT (TJP). 6.9 1987 Oct 23 Add prompts when plotting on command terminal to avoid interference (TJP). 7.0 1988 Apr 7 Changes for Convex; add SEED parameter (TJP). 7.1 1989 Jun 9 Add ROT parameter to allow for space optical interferometry (apertures not mounted on earth but rather slowly rotating, inertially fixed platform) (DLM). 7.2: 1990 May 8 - fixed bugs in ROT implementation; allowed stations to reside at radii as small as one lunar radius; generate Merge version 2 file in that case 7.3: 1991 Jan 23 - add photon statistical noise for optical interferometric observations (DLM) 7.4: 1991 Feb 3 - add zodiacal light, thermal noise, and quantum efficiency for optical interferometric observations; also add ability to cancel real part of visibility (NULLING) with nulling interferometer (DLM)