[ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

## 6.8 Near-Field-to-Far-Field Transformer

In many electromagnetic problems, it is of interest to calculate the radiated (or far-zone) field scattered from (or radiated by) the structures inside the grid. The radiated field is defined as the asymptotic form of the electric field at large distances, which decays as and propagates locally like a plane wave. Although the radial dependence is trivial in the far field, the angular dependence is highly variable. In finite numerical solution methods such as FDTD and FEM, it is only the near-field that is available in the computation grid. It is hugely impractical to extend the computation grid to large distances where the field assumes an asymptotic form. Luckily, certain theorems of electromagnetics (Huygens’ principle, equivalence theorem, etc.) allow the calculation of the far field using this near field information. This procedure is called a near-field-to-far-field transform (NFFFT). There are two main types of NFFFTs. In the first type, the far-field waveforms are calculated directly in time domain. In the second, the frequency (or phasor) components in the Fourier decomposition of the far-field waveforms are calculated at a number of frequencies. Angora features both time-domain and phasor domain NFFFTs.

 [ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

### 6.8.1 Time-Domain Near-Field-to-Far-Field-Transformer

In the time-domain NFFFT, the far-field waveforms (normalized by the distance r, and advanced in time by ) are calculated directly using time-domain Green’s functions for the particular space. Currently, the time-domain NFFFT supports up to three lossless infinite planar material layers with only permittivity variations.

The time-domain NFFFT should be used when the far-field waveforms are to be computed over only a few observation directions. The additional computational burden per observation direction is much larger than that of the phasor-domain NFFFT. The format used for the time-domain far-field output is HDF5 (Hierarchical Data Format) (http://www.hdfgroup.org/HDF5/). The HDF5 format was chosen for its standard interface, and the availability of free software tools for inspecting and modifying HDF5 output. The HDF5 output created by the time-domain NFFFT is explained in more detail in HDF5 Content of Time-Domain NFFFT Output.

The radiated electric field can be expressed in the form

The time-domain NFFFT only calculates the angle and time-dependent part of the above expression, namely, .

Global variable: string td_nffft_output_dir (default: "nffft/td")

This determines the subdirectory in which all the time-domain-NFFFT output will be placed. Unless it has a slash ‘/’ up front; this path is interpreted as being relative to output_dir (see section Paths).

 td_nffft_output_dir = "nffft/td"; TimeDomainNFFFT: { … … }; 
Global variable: list TimeDomainNFFFT

Time-domain NFFFTs are defined inside a TimeDomainNFFFT list, each within its own group:

 TimeDomainNFFFT: ( { theta = 36; phi = 57; write_hertzian_dipole_far_field = false; nffft_back_margin_x_in_cells = 3; nffft_front_margin_x_in_cells = 3; nffft_left_margin_y_in_cells = 3; nffft_right_margin_y_in_cells = 3; nffft_lower_margin_z_in_cells = 3; nffft_upper_margin_z_in_cells = 3; far_field_origin_x = 0; far_field_origin_y = 0; far_field_origin_z = 0; far_field_dir = "my_dir"; far_field_file_name = "FarField_td"; far_field_file_extension = "hd5"; append_group_index_to_file_name = true; }, { … … } ); 
Sub-variable of TimeDomainNFFFT: floating-point theta (units: degrees)
Sub-variable of TimeDomainNFFFT: floating-point phi (units: degrees)

The direction at which the time-domain far field will be calculated is expressed in terms of the traditional spherical-coordinate variables . The first of these angles is the zenith angle, while the second is the azimuth angle. In this figure, the definitions of these angles are shown schematically. The theta variable specifies the zenith angle in degrees. Although this angle is traditionally defined between 0 and 180deg, theta can be assigned any negative or positive value. The phi variable specifies the azimuth angle in degrees. Although this angle is traditionally defined between 0 and 360deg, phi can be assigned any negative or positive value.

Sub-variable of TimeDomainNFFFT: boolean write_hertzian_dipole_far_field (default: false)

If set to true, the theoretical far field waveforms due to the Hertzian point sources (see Point Sources) in the simulation grid are also written into the output file. Any planar stratification up to three lossless layers with permittivity variations is accounted for in the calculation of the theoretical far field, but the scattering from any other structure inside the grid is ignored. As such, this feature can be (and has been) used to test the time-domain NFFFT.

Sub-variable of TimeDomainNFFFT: floating-point nffft_back_margin_x (units:m)
Sub-variable of TimeDomainNFFFT: floating-point nffft_front_margin_x (units:m)
Sub-variable of TimeDomainNFFFT: floating-point nffft_left_margin_y (units:m)
Sub-variable of TimeDomainNFFFT: floating-point nffft_right_margin_y (units:m)
Sub-variable of TimeDomainNFFFT: floating-point nffft_lower_margin_z (units:m)
Sub-variable of TimeDomainNFFFT: floating-point nffft_upper_margin_z (units:m)
Sub-variable of TimeDomainNFFFT: integer nffft_back_margin_x_in_cells (default: 3)
Sub-variable of TimeDomainNFFFT: integer nffft_front_margin_x_in_cells (default: 3)
Sub-variable of TimeDomainNFFFT: integer nffft_left_margin_y_in_cells (default: 3)
Sub-variable of TimeDomainNFFFT: integer nffft_right_margin_y_in_cells (default: 3)
Sub-variable of TimeDomainNFFFT: integer nffft_lower_margin_z_in_cells (default: 3)
Sub-variable of TimeDomainNFFFT: integer nffft_upper_margin_z_in_cells (default: 3)

The near field is collected over the surface of a rectangular prism in the grid, called the NFFFT surface. This surface should enclose all the scattering and/or radiating structures in the grid, as well as the total-field/scattered-field surface (see Incident Beams). By default, this rectangular box is placed 3 grid cells away from the PML boundary (see Perfectly-Matched Layer (PML)). You can specify different margins to reduce the computational burden associated with the NFFFT. This burden is directly proportional to the surface area of the box. The margins can be specified in meters or in grid cells. For the latter, the _in_cells suffix should be appended to the variable name. If given in meters, the margins are rounded to the nearest multiple of the spatial step size.

Sub-variable of TimeDomainNFFFT: floating-point far_field_origin_x (units: m, default: 0)
Sub-variable of TimeDomainNFFFT: floating-point far_field_origin_y (units: m, default: 0)
Sub-variable of TimeDomainNFFFT: floating-point far_field_origin_z (units: m, default: 0)
Sub-variable of TimeDomainNFFFT: floating-point far_field_origin_x_in_cells (default: 0)
Sub-variable of TimeDomainNFFFT: floating-point far_field_origin_y_in_cells (default: 0)
Sub-variable of TimeDomainNFFFT: floating-point far_field_origin_z_in_cells (default: 0)

These variables set the coordinates of the point relative to which the far field will be calculated. The distance r in the above equation is with respect to this point. The coordinates of the far-field origin are with respect to the grid origin (see section Coordinate Origin). The units are either in meters or grid cells. For the latter, the _in_cells suffix should be appended to the variable name.

Sub-variable of TimeDomainNFFFT: string far_field_dir (default: "")

This determines the subdirectory in which this individual far-field file will be placed. Unless it has a slash ‘/’ up front; this path is interpreted as being relative to td_nffft_output_dir (see td_nffft_output_dir). By default, no subdirectory is created inside td_nffft_output_dir.

Sub-variable of TimeDomainNFFFT: string far_field_file_name (default: "FarField_td")

This determines the base string in the full name of the far-field file. Other information is appended to the name of the file to differentiate individual far-field files (see the example below).

Sub-variable of TimeDomainNFFFT: string far_field_file_extension (default: "hd5")

This is the extension of the far-field file name. If assigned the value "", no extension is added to the file. The HDF5 extension "hd5" is applied by default.

Here is an example far-field file name:

 FarField_td_0_1.hd5 

The base string in the name of the file ("FarField_td") is specified by the far_field_file_name variable. The two integers that follow are the run index (see Multiple Simulation Runs) and the index of the time-domain NFFFT inside the TimeDomainNFFFT list. For example, if there are two groups (two NFFFTs) in the TimeDomainNFFFT list, the first one will write into

 FarField_td_0_0.hd5 

while the second will write into

 FarField_td_0_1.hd5 

If there are two simulation runs (i.e., number_of_runs is equal to 2 – see Multiple Simulation Runs), then the files created in the second run will have 1 instead of 0 as the first integer in the above file names. Finally, the extension ("hd5") of the line files is determined by the variable far_field_file_extension.

Sub-variable of TimeDomainNFFFT: boolean append_group_index_to_file_name (default: true)

If this is set to false, the second integer in the filename (see above) and the underscore preceding it are not included in the filename. It is set to true by default. If this variable is set to false and there are multiple groups (time-domain NFFFTs), there will be a name clash, and the output will be undefined.

 [ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

#### 6.8.1.1 HDF5 Content of Time-Domain NFFFT Output

The HDF5 file created as the output of the time-domain NFFFT can be viewed and modified using freely-available tools. One of these tools is HDFView, provided by the HDF Group. MATLAB also has built-in functions and tools that handle HDF5 files. For reference, a MATLAB script named ‘hdf5_read.m’ is distributed as part of the Angora package, which reads an HDF5 dataset from an HDF5 file into a MATLAB array. This script is installed in the directory ‘$(prefix)/share/angora/’ (see Compilation and Installation). If Angora was installed without any $(prefix) configuration option, the default location is ‘/usr/local/share/angora/’. This script can also be downloaded directly from the Angora website (link here). For example, if you want to read the dataset named theta from the file ‘my_file.hd5’, use

 >> theta = hdf5_read('my_file.hd5','theta'); 

In MATLAB R2011a and later, there is a high-level built-in function h5read that could be used for the same purpose.

The HDF5 datasets in the far-field file are the following:

• angora_version’: Integer array of length 3 with the major version, minor version, and revision numbers of the Angora package used to create the file.
• theta’: A floating-point value for the spherical zenith angle at which the far field is calculated (in radians).
• phi’: A floating-point value for the spherical azimuth angle at which the far field is calculated (in radians).
• time_step’: A floating-point value specifying the temporal step in the simulation (in sec).
• initial_time_value’: A floating-point value specifying the time value corresponding to the beginning of the simulation (in sec). This is usually a negative value, since time waveforms frequently begin before t=0.
• Floating-point arrays with the waveforms of different components of the vector radiated electric field. See this figure for a graphical illustration of the unit vectors in spherical coordinates. Note that only the angle and time-dependent part of the radiated electric field is calculated (see the above equation). Because the (1/r) dependence has been factored out, the units are in Volts.
• E_theta’: 1-D array with the theta component of the radiated electric field.
• E_phi’: 1-D array with the phi component of the radiated electric field.
• If the theoretical far field due to Hertzian point sources is also calculated (namely, write_hertzian_dipole_far_field is true):
• E_theta_th’: 1-D array with the theoretical theta component of the radiated electric field created by the Hertzian dipoles in the simulation grid.
• E_phi_th’: 1-D array with the theoretical phi component of the radiated electric field created by the Hertzian dipoles in the simulation grid.

 [ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

### 6.8.2 Phasor-Domain Near-Field-to-Far-Field-Transformer

The phasor-domain NFFFT calculates the amplitude of the far field at individual frequencies using Fourier decomposition. This NFFFT supports free space as well as infinite planar layered media with arbitrary permittivity, permeability and conductivity profiles (see Capoglu12). Infinite planar layers are created using the MaterialSlabs variable (see section Planar Layers).

The phasor-domain NFFFT in Angora calculates far-field values over a two-dimensional array of observation directions and a range of wavelengths; resulting in a three-dimensional array. The spacing of the wavelengths and the arrangement of observation directions is highly configurable. The format used for the phasor-domain far-field output is HDF5 (Hierarchical Data Format) (http://www.hdfgroup.org/HDF5/). The HDF5 format was chosen for its standard interface, and the availability of free software tools for inspecting and modifying HDF5 output. The HDF5 output created by the phasor-domain NFFFT is explained in more detail in HDF5 Content of Phasor-Domain NFFFT Output.

Angora uses the engineering convention for time-harmonic quantities. The time-domain data on the surface of a rectangular prism in the grid, called the NFFFT surface, is decomposed into its phasor components by a numerical approximation to the temporal Fourier transform . Because of the term, the phasor quantities correspond to the true Fourier components of the time-domain quantities on the NFFFT surface. These quantities are then inserted into phasor-domain electromagnetic theorems linking the near field to the far field. The complex phasor output data therefore also corresponds to the Fourier components of the far-field temporal waveforms.

In the phasor domain, the radiated electric field can be expressed in the form

The phasor-domain NFFFT only calculates the angle-dependent part of the above expression, namely, . In the following figure, the angles and unit vectors are shown for spherical coordinates.

Figure 6.4: The angles and unit vectors for spherical coordinates.

Global variable: string pd_nffft_output_dir (default: "nffft/pd")

This determines the subdirectory in which all the phasor-domain-NFFFT output will be placed. Unless it has a slash ‘/’ up front; this path is interpreted as being relative to output_dir (see section Paths).

 pd_nffft_output_dir = "nffft/pd"; PhasorDomainNFFFT: { … … }; 
Global variable: list PhasorDomainNFFFT

Phasor-domain NFFFTs are defined inside a PhasorDomainNFFFT list, each within its own group:

 PhasorDomainNFFFT: ( { num_of_lambdas = 10; lambda_min = 400e-9; lambda_max = 700e-9; lambda_spacing_type = "k-linear"; do_not_include_first_lambda = false; do_not_include_last_lambda = false; direction_spec = "theta-phi"; num_of_dirs_1 = 9; dir1_min=0.0; dir1_max=90.0; num_of_dirs_2 = 361; dir2_min=0.0; dir2_max=360.0; limit_to_s = 1.0; write_hertzian_dipole_far_field = false; nffft_back_margin_x_in_cells = 3; nffft_front_margin_x_in_cells = 3; nffft_left_margin_y_in_cells = 3; nffft_right_margin_y_in_cells = 3; nffft_lower_margin_z_in_cells = 3; nffft_upper_margin_z_in_cells = 3; far_field_origin_x = 0.0; far_field_origin_y = 0.0; far_field_origin_z = 0.0; far_field_dir = "my_dir"; far_field_file_name = "FarField_pd"; far_field_file_extension = "hd5"; append_group_index_to_file_name = true; }, { … … } ); 
Sub-variable of PhasorDomainNFFFT: integer num_of_lambdas

This specifies the number of wavelengths (in vacuum) at which the far field will be calculated.

Sub-variable of PhasorDomainNFFFT: floating-point lambda_min (units: m)
Sub-variable of PhasorDomainNFFFT: floating-point lambda_min_in_cells

This value sets the lower limit of the wavelength range (in vacuum) over which the far field is calculated. The far field may or may not be calculated at the wavelength lambda_min, depending on the variable do_not_include_first_lambda. The units are either in meters or grid cells. For the latter, the _in_cells suffix should be appended to the variable name.

Sub-variable of PhasorDomainNFFFT: floating-point lambda_max (units: m)
Sub-variable of PhasorDomainNFFFT: floating-point lambda_max_in_cells

This value sets the upper limit of the wavelength range (in vacuum) over which the far field is calculated. The far field may or may not be calculated at the wavelength lambda_max, depending on the variable do_not_include_last_lambda. The units are either in meters or grid cells. For the latter, the _in_cells suffix should be appended to the variable name.

Sub-variable of PhasorDomainNFFFT: string lambda_spacing_type

This string specifies how the wavelengths will be spaced between the two end points determined by lambda_min, lambda_max, do_not_include_first_lambda, and do_not_include_last_lambda.

• "lambda-linear": The wavelengths are spaced lineary between the two end points.
• "k-linear": The wavenumbers are spaced linearly between the two end points. Since the wavenumber is also equal to , where is the radian frequency, this causes the frequencies to be spaced linearly as well.
• "log": The logarithms of the wavelengths (therefore the logarithms of the wavenumbers) are spaced linearly between the two end points.
Sub-variable of PhasorDomainNFFFT: boolean do_not_include_first_lambda (default: false)
Sub-variable of PhasorDomainNFFFT: boolean do_not_include_last_lambda (default: false)

Let’s assume that lambda_spacing_type is lambda-linear. For k-linear and log, replace lambda_min in the following by lambda_min and log(lambda_min), respectively. The same applies to lambda_max.

• If do_not_include_first_lambda=false and do_not_include_last_lambda=false: The interval between lambda_min and lambda_max is divided into (num_of_lambdas-1) equal intervals. A total of num_of_lambdas wavelengths are placed linearly at the boundaries between the intervals, including both endpoints lambda_min and lambda_max.
• If do_not_include_first_lambda=true and do_not_include_last_lambda=false: The interval between lambda_min and lambda_max is divided into num_of_lambdas equal intervals. A total of num_of_lambdas wavelengths are placed linearly at the boundaries between the intervals, excluding the endpoint lambda_min.
• If do_not_include_first_lambda=false and do_not_include_last_lambda=true: The interval between lambda_min and lambda_max is divided into num_of_lambdas equal intervals. A total of num_of_lambdas wavelengths are placed linearly at the boundaries between the intervals, excluding the endpoint lambda_max.
• If do_not_include_first_lambda=true and do_not_include_last_lambda=true: The interval between lambda_min and lambda_max is divided into num_of_lambdas equal intervals. A total of num_of_lambdas wavelengths are placed at the midpoints of each interval.
Sub-variable of PhasorDomainNFFFT: string direction_spec

This string specifies how the observation directions are arranged in a two-dimensional array.

• "theta-phi": The first dimension is the spherical polar angle , defined as the angle between the observation direction and the z-axis. The second dimension is the spherical azimuth angle , defined as the angle between the x-axis and the projection of the observation direction onto the xy-plane. See the above figure for a graphical illustration. These angles are spaced linearly between their respective endpoints.
• "dircosx-dircosy-upper" or "dircosx-dircosy-lower": The first dimension is the x-direction-cosine while the second dimension is the y-direction-cosine . These direction cosines are spaced linearly between their respective endpoints. The suffix "-upper" or "-lower" determines whether the observation direction is in the upper half space (+z direction) or the lower half space (-z direction).
Sub-variable of PhasorDomainNFFFT: integer num_of_dirs_1

This is the number of observation directions over the first dimension of the two-dimensional observation-direction array. If direction_spec is "theta-phi", this is the number of values; otherwise, the number of x-direction-cosines .

Sub-variable of PhasorDomainNFFFT: floating-point dir1_min
Sub-variable of PhasorDomainNFFFT: floating-point dir1_max

These are the minimum/maximum values of either the angle (in degrees), or the x-direction-cosine (between -1 and 1).

Sub-variable of PhasorDomainNFFFT: integer num_of_dirs_2

This is the number of observation directions over the second dimension of the two-dimensional observation-direction array. If direction_spec is "theta-phi", this is the number of values; otherwise, the number of y-direction-cosines .

Sub-variable of PhasorDomainNFFFT: floating-point dir2_min
Sub-variable of PhasorDomainNFFFT: floating-point dir2_max

These are the minimum/maximum values of either the angle (in degrees), or the y-direction-cosine (between -1 and 1).

Sub-variable of PhasorDomainNFFFT: floating-point limit_to_s (default: 1)

If direction_spec is "dircosx-dircosy-upper" or "dircosx-dircosy-lower" (the direction cosines are used to specify the observation directions), it might happen that some combinations of and do not correspond to a real observation direction, since . Such direction cosines are automatically assigned a far-field value of zero. If you would like to limit the direction cosines further into a narrower observation cone, you can choose the value of limit_to_s to be smaller than 1.0. Then, the far field corresponding to the direction cosines satisfying (limit_to_s) are assigned a zero value. Although this could also be done in post processing, eliminating some observation directions in this way removes the burden of computing them in the first place. Specifying a limit_to_s value corresponds to reducing the numerical aperture in a microscope objective.

Sub-variable of PhasorDomainNFFFT: boolean write_hertzian_dipole_far_field (default: false)

If set to true, the theoretical far field due to the Hertzian point sources (see Point Sources) in the simulation grid is also written into the output file. Any planar stratification is accounted for in the calculation of the theoretical far field, but the scattering from any other structure inside the grid is ignored. As such, this feature can be (and has been) used to test the phasor-domain NFFFT.

Sub-variable of PhasorDomainNFFFT: floating-point nffft_back_margin_x (units:m)
Sub-variable of PhasorDomainNFFFT: floating-point nffft_front_margin_x (units:m)
Sub-variable of PhasorDomainNFFFT: floating-point nffft_left_margin_y (units:m)
Sub-variable of PhasorDomainNFFFT: floating-point nffft_right_margin_y (units:m)
Sub-variable of PhasorDomainNFFFT: floating-point nffft_lower_margin_z (units:m)
Sub-variable of PhasorDomainNFFFT: floating-point nffft_upper_margin_z (units:m)
Sub-variable of PhasorDomainNFFFT: integer nffft_back_margin_x_in_cells (default: 3)
Sub-variable of PhasorDomainNFFFT: integer nffft_front_margin_x_in_cells (default: 3)
Sub-variable of PhasorDomainNFFFT: integer nffft_left_margin_y_in_cells (default: 3)
Sub-variable of PhasorDomainNFFFT: integer nffft_right_margin_y_in_cells (default: 3)
Sub-variable of PhasorDomainNFFFT: integer nffft_lower_margin_z_in_cells (default: 3)
Sub-variable of PhasorDomainNFFFT: integer nffft_upper_margin_z_in_cells (default: 3)

The near field is collected over the surface of a rectangular prism in the grid, called the NFFFT surface. This surface should enclose all the scattering and/or radiating structures in the grid, as well as the total-field/scattered-field surface (see Incident Beams). By default, this rectangular box is placed 3 grid cells away from the PML boundary (see Perfectly-Matched Layer (PML)). You can specify different margins to reduce the computational burden associated with the NFFFT. This burden is directly proportional to the surface area of the box. The margins can be specified in meters or in grid cells. For the latter, the _in_cells suffix should be appended to the variable name. If given in meters, the margins are rounded to the nearest multiple of the spatial step size.

Sub-variable of PhasorDomainNFFFT: floating-point far_field_origin_x (units: m, default: 0)
Sub-variable of PhasorDomainNFFFT: floating-point far_field_origin_y (units: m, default: 0)
Sub-variable of PhasorDomainNFFFT: floating-point far_field_origin_z (units: m, default: 0)
Sub-variable of PhasorDomainNFFFT: floating-point far_field_origin_x_in_cells (default: 0)
Sub-variable of PhasorDomainNFFFT: floating-point far_field_origin_y_in_cells (default: 0)
Sub-variable of PhasorDomainNFFFT: floating-point far_field_origin_z_in_cells (default: 0)

These variables set the coordinates of the point relative to which the far field will be calculated. The distance r in the above equation is with respect to this point. The coordinates of the far-field origin are with respect to the grid origin (see section Coordinate Origin). The units are either in meters or grid cells. For the latter, the _in_cells suffix should be appended to the variable name.

Sub-variable of PhasorDomainNFFFT: string far_field_dir (default: "")

This determines the subdirectory in which this individual far-field file will be placed. Unless it has a slash ‘/’ up front; this path is interpreted as being relative to pd_nffft_output_dir (see pd_nffft_output_dir). By default, no subdirectory is created inside pd_nffft_output_dir.

Sub-variable of PhasorDomainNFFFT: string far_field_file_name (default: "FarField_pd")

This determines the base string in the full name of the far-field file. Other information is appended to the name of the file to differentiate individual far-field files (see the example below).

Sub-variable of PhasorDomainNFFFT: string far_field_file_extension (default: "hd5")

This is the extension of the far-field file name. If assigned the value "", no extension is added to the file. The HDF5 extension "hd5" is applied by default.

Here is an example far-field file name:

 FarField_pd_0_1.hd5 

The base string in the name of the file ("FarField_pd") is specified by the far_field_file_name variable. The two integers that follow are the run index (see Multiple Simulation Runs) and the index of the phasor-domain NFFFT inside the PhasorDomainNFFFT list. For example, if there are two groups (two NFFFTs) in the PhasorDomainNFFFT list, the first one will write into

 FarField_pd_0_0.hd5 

while the second will write into

 FarField_pd_0_1.hd5 

If there are two simulation runs (i.e., number_of_runs is equal to 2 – see Multiple Simulation Runs), then the files created in the second run will have 1 instead of 0 as the first integer in the above file names. Finally, the extension ("hd5") of the line files is determined by the variable far_field_file_extension.

Sub-variable of PhasorDomainNFFFT: boolean append_group_index_to_file_name (default: true)

If this is set to false, the second integer in the filename (see above) and the underscore preceding it are not included in the filename. It is set to true by default. If this variable is set to false and there are multiple groups (phasor-domain NFFFTs), there will be a name clash, and the output will be undefined.

 [ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

#### 6.8.2.1 HDF5 Content of Phasor-Domain NFFFT Output

The HDF5 file created as the output of the phasor-domain NFFFT can be viewed and modified using freely-available tools. One of these tools is HDFView, provided by the HDF Group. MATLAB also has built-in functions and tools that handle HDF5 files. For reference, a MATLAB script named ‘hdf5_read.m’ is distributed as part of the Angora package, which reads an HDF5 dataset from an HDF5 file into a MATLAB array. This script is installed in the directory ‘$(prefix)/share/angora/’ (see Compilation and Installation). If Angora was installed without any $(prefix) configuration option, the default location is ‘/usr/local/share/angora/’. This script can also be downloaded directly from the Angora website (link here). For example, if you want to read the dataset named lambda from the file ‘my_file.hd5’, use

 >> lambda = hdf5_read('my_file.hd5','lambda'); 

In MATLAB R2011a and later, there is a high-level built-in function h5read that could be used for the same purpose.

The HDF5 datasets in the far-field file are the following:

• angora_version’: Integer array of length 3 with the major version, minor version, and revision numbers of the Angora package used to create the file.
• lambda’: 1-D array with the recorded free-space wavelength values (in m).
• If direction_spec is "theta-phi":
• theta’: 1-D array with the theta values.
• phi’: 1-D array with the phi values.
• If direction_spec is "dircosx-dircosy-upper" or "dircosx-dircosy-lower":
• dircos_x’: 1-D array with the x-direction-cosine values.
• dircos_y’: 1-D array with the y-direction-cosine values.
• Floating-point arrays with the real and imaginary parts of different components of the vector radiated electric field. See the above figure for a graphical illustration of the unit vectors in spherical coordinates. Note that only the angle-dependent part of the radiated electric field is calculated (see the above equation). Because the (1/r) dependence has been factored out, the units are in Volts. The first dimension is the wavelength, the second is either theta or the x-direction-cosine, and the third is either phi or the y-direction-cosine.
• E_theta_r’,‘E_theta_i’: 3-D arrays with the real and imaginary parts of the theta component of the radiated electric field.
• E_phi_r’,‘E_phi_i’: 3-D arrays with the real and imaginary parts of the phi component of the radiated electric field.
• If the theoretical far field due to Hertzian point sources is also calculated (namely, write_hertzian_dipole_far_field is true):
• E_theta_th_r’,‘E_theta_th_i’: 3-D arrays with the theoretical real and imaginary parts of the theta component of the radiated electric field created by the Hertzian dipoles in the simulation grid.
• E_phi_th_r’,‘E_phi_th_i’: 3-D arrays with the theoretical real and imaginary parts of the phi component of the radiated electric field created by the Hertzian dipoles in the simulation grid.

 [ < ] [ > ] [ << ] [ Up ] [ >> ]

This document was generated by Ilker Rafet Capoglu on December 12, 2012 using texi2html 1.82.