RadProj

Overview

RadProj takes a data set on a Cartesian grid and projects it to polar, spherical, or cylindrical coordinates. One of the types of projections supported is radial averaging.

A basic recipe for using RadProj is:

    Enter the name of the input dataset (must be in MRC format) in the "Input" field.

    Choose the format for the projection result with the "Output format" menu. There are two basic categories of output formats: text formats that support a projection to a single spatial dimension (for example, the projected intensity as a function of radius) or images that support a projection result that can have one to three spatial dimensions.

    Enter the name of the output file to generate in the "Output" field.

    From the options in the "Output values" menu, select how values are presented in the output file. If your input data is real-valued, only two of the options are normally of interest: "real component" which causes the projection result to be stored without modification or "amplitude" which causes RadProj to save the absolute value of the projection result. If your input data is complex-valued, any of the options may be of interest. As in the real-valued case, the transformations specified through the "Output values" menu take place after the projection has been calculated.

    Select the destination coordinate system from the "Coordinates" menu. With polar coordinates, z slices in the input are not combined when forming the output. The other two options, cylindrical and spherical, allow combination of values from different z slices.

    Use the "Blending" menu to select how pixel values from the input are combined to form the projection result.

    Enter into the "Center" field the pixel coordinates for the point which will be the origin of the output coordinate system. When you select a new input file, RadProj sets the center to be where it would be for a centered FFT or power spectrum result.

    Adjust the range and spacing for the bins that cover the output coordinates. When you select a new input file, RadProj resets the bounds to generate a projection to the radial axis.

    Press the "DoIt" button to generate the projection.

Topics

Z | T | W | Output format | Section label | Output values | Coordinates | Blending | Wrap | Center | Bounds | Sampling

Related Priism Topics

radialft_asym | 2D Plot Priism


Z

If you set the output coordinate system to be polar, you can use the "Z" field (near the top of the RadProj dialog) to control the range of z sections processed from the input file. With spherical or cylindrical coordinates, that "Z" field is disabled and has no effect. The first value in the field is the starting section number (the sections are numbered from zero). The second value in the field is the inclusive upper limit for the section numbers to process. The third value is the increment between the section numbers that will be processed. Each time you select a new input file, RadProj resets the wavelength toggle buttons so that all the wavelengths in the input file will be processed.

Return to overview


T

Use the "T" field to control the range of times points processed from the input file. The first value in the field is the starting time point number (the time points are numbered from zero). The second value in the field is the inclusive upper limit for the time points to process. The third value is the increment between the time points that will be processed. Each time you select a new input file, RadProj resets the wavelength toggle buttons so that all the wavelengths in the input file will be processed.

Return to overview


W

Use the toggle buttons next to the "W" label to control which wavelengths RadProj processes from the input file. If the ith toggle button is on, RadProj will process the ith wavelength. Otherwise, RadProj will not process the ith wavelength. Each time you select a new input file, RadProj resets the wavelength toggle buttons so that all the wavelengths in the input file will be processed.

Return to overview


Output Format

Use the "Output format" menu to control the file format of the projection result. The available choices are:

text: tab-delimited columns
The output is a text file. Within that file, a line, whose contents are set by the "Section label" field, introduces the data from each input volume (if the output coordinates are spherical are cylindrical) or input section (if the output coordinates are polar). The projection data is formatted in columns separated by a tab character. The first column holds the coordinates for the centers of the bins. The second column holds the first component of the projection result. The third column, only present if the output values have two components, holds the second component of the projection result.
text: space-delimited columns
Is the same as "tab-delimited columns" but the columns of data are separated by a single space rather than a tab character.
text: comma-delimited columns
Is the same as "tab-delimited columns" but the columns of data are separated by a comma rather than a tab character.
text: 2d_plot
The output is a text file compatible with Priism's 2D Plot. The data form each input volume (if the output coordinates are spherical or cylindrical) or input section (if the output coordinates are polar) is stored as a separate graph in the file. The contents of the "Section label" field control the main titles of each graph.
text: 2d_plot & display
Is the same as "2d_plot" except that RadProj will automatically call 2d_plot to display the result if the projection is successful.
MRC images
The output is in Priism's image data format. The "Section label" field has no effect for this format. You can control how the dimensions of the output coordinate system map to the file dimensions with the "Order" menus in the controls for the output ranges and number of bins.

Of these options, only the last allows you to have a projection result which has two or more output dimensions with more than one bin. With the others, RadProj will enforce the constraint that there is only one output dimension that has more than one bin.

Return to overview


Section Label

If the output format is one of the text formats, the contents of the "Section label" field are used as a template for a label to identify the data from one input volume (if the output coordinate system is cylindrical or spherical) or one input section (if the output coordinate system is polar). In the formats compatible with 2D Plot, the labels are used for the graph titles. For the other text formats, the label is printed on its own line to introduce the projection results from an input volume or section.

Within the template, special conversions codes are recognized and expanded to generate the labels that appear in the output file. The conversion codes consist of a percent sign followed by an optional i followed by a letter to indicate the type of code. Possible values for the letter are:

%
The conversion code is replaced by a single percent sign when generating a label.
z
The conversion code is replaced by the z index for the section when generating a label.
w
The conversion code is replaced by the wavelength index for the section when generating a label.
t
The conversion code is replaced by the time point index for the section when generating a label.

If the optional i modifier appears within a z, w, or t conversion code then the index generated by the conversion code is computed relative to the input file. Otherwise, the indices generated are computed relative to the output file. If the output coordinate system is cylindrical or spherical, the %z and %iz conversion codes expand to zero.

Return to overview


Output Values

After RadProj computes the projection, RadProj can apply an operation to the value in each bin before it writes out the result. The "Output values" menu controls the type of operation applied. The available options are:

real component
If the input data is real-valued, RadProj does not modify the projection results before it saves them to the output file. If the input data is complex-valued, RadProj extracts the real component from the projection result and saves it.
imaginary component
If the input data is real-valued, RadProj records the result for each bin as zero. If the input data is complex-valued, RadProj extracts the imaginary component from the projection result and saves it.
real and imaginary components
If the input data is real-valued, RadProj records the projection result as the real component in the output and zeroes for the imaginary component. If the input data is complex-valued, RadProj saves both the real and imaginary components of the projection result without modification.
amplitude
If the input data is real-valued, RadProj saves the absolute value of the projection result. If the input data is complex values, RadProj saves the magnitude of the projection result.
phase
If the input data is real-valued, RadProj records the result for each bin as zero. If the input data is complex-valued, RadProj saves the phase (in units of radians) of the projection result.
amplitude and phase
If the input data is real-valued, RadProj saves the absolute value of the projection result as the first component and zero as the second component. If the input data is complex-valued, RadProj saves the amplitude of the projection result as the first component and the phase (in units of radians) of the projection result as the second component.

For the "real and imaginary components" and "amplitude and phase" options, the output consists of two components. If the output format is MRC image data, those components are saved as the real and imaginary parts, respectively, in a complex-valued image. If the output format is compatible with 2D Plot, the two components are separate lines in the graphs. Otherwise, the two components appear as separate columns in the output.

Return to overview


Coordinates

You have three choices for the output coordinate system:

polar
The x and y coordinates of the input data are converted to r and theta. r is the distance from the center point (only the x and y coordinates of the center matter). theta ranges from -180 to 180 degrees. A value of 0 degrees corresponds to a ray pointing along the positive x axis and a value of 90 degrees corresponds to a ray pointing along the positive y axis. With the polar coordinate system, RadProj treats each z section selected from the input independently and carries over the distinctions between the z sections to the output.
cylindrical
The x and y coordinates of the input data are converted to r and theta as in the polar case, but the cylindrical coordinate system allows the projection to combine different z sections from the input.
spherical
The x, y, and z coordinates of the input data are converted to r, theta, and phi. r is the distance from the center point. theta and phi specify the orientation of the ray to a point from the center. theta is the angle between the x axis and the projection of the ray onto the xy plane. theta ranges from -180 to 180 degrees with zero degrees corresponding to a ray along the positive x axis and 90 degrees corresponding to a ray along the positive y axis. phi is the angle between the ray and the xy plane. phi ranges from -90 to 90 degrees. A value of zero means the ray is in the xy plane. A value of 90 degrees means the ray points along the positive z axis.

Return to overview


Blending

RadProj combines pixel values in the input to form the projection result. Use the "Blending" menu to set how RadProj combines the input pixel values. The available options are:

average
The projection result for a bin is the sum of the intensities of the pixels whose coordinates fall within that bin divided by the number of pixels falling within that bin. If a bin has bounds that extend past the dimensions of the input data, the regions outside of the input data set contribute nothing to either the numerator (the sum of the intensities) or the denominator (the count of pixels). If no pixels fall within the bin, RadProj sets the projection result for that bin to zero.
sum
The projection result for a bin is the sum of the intensities of the pixels whose coordinates fall within that bin.
maximum
If the input data is real-valued, the projection result for a bin is the maximum intensity from the pixels whose coordinates fall within that bin. If no pixels fall within the bin, RadProj sets the projection result for that bin to the minimum floating-point value (on the the order of -1x10^38). If the input data is complex-valued, the projection result for a bin is the value with the largest amplitude from the pixels whose coordinates fall within the bin. If no pixels fall within the bin, RadProj sets the projection result for that bin to zero.
minimum
If the input data is real-valued, the projection result for a bin is the minimum intensity from the pixels whose coordinates fall within that bin. If no pixels fall within the bin, RadProj sets the projection result for that bin to the maximum floating-point value (on the order of 1x10^38). If the input data is complex-valued, the projection result for a bin is the value with the smallest amplitude from the pixels whose coordinates fall within the bin. If no pixels fall within the bin, RadProj sets the projection result for that bin to have real and imaginary components equal to the square root of the maximum floating-point value divided by two (on the order of 7x10^18).

Return to overview


Wrap

The three "Wrap" toggle buttons are there to help accommodate noncentered FFT results. If a toggle for a direction (x, y, or z) is on, RadProj will assume that first pixel and the last pixel in that direction correspond to adjacent points and that there is a break between the n/2+1 and n/2+2 pixel where n is the number of pixels in that direction. The toggle for z is only effective and enabled if the output coordinate system is spherical or cylindrical.

For a noncentered 2D FFT with only the nonnegative x frequencies available, you would turn off the x toggle and turn on the y toggle. For a noncentered 2D FFT with both positive and negative x frequencies available, you would turn on both the x and y toggles. You would handle noncentered 3D FFTs in the same way: turn on the y and z toggles and leave the x toggle off if only the nonnegative x frequencies are available and turn it on if both positive and negative x frequencies are available.

Return to overview


Center

The three values in the "Center" field are the x, y, and z coordinates in the input to use as the origin for the output coordinate system. The coordinates should be in units of pixels. The value of the center's z coordinate is only relevant if the output coordinate system is spherical.

For FFT results, the common choices for the center are:

(nx-1)/2 (ny-1)/2 (nz-1)/2
This is for centered FFT or power spectrum results and is what RadProj will put in the "Center" field when you select a new input file.
0 (ny-1)/2 (nz-1)/2
This is for centered FFT results where only the nonnegative x frequencies have been retained.
0 0 0
For noncentered FFT or power spectrum results

Return to overview


Bounds

For each dimension in the output coordinate system there is a field to set the range of values covered by the projection result, a field to set the number of bins along that dimension, a field to show the corresponding bin width, and a menu to set how that dimension is mapped to the output when the results are saved as images. For the range covered, the first value in the field is the minimum value included and the second value is the upper limit on the range (the upper limit itself is not included in the range). For the r dimension, the units for the bounds are x pixels. For the theta and phi dimensions, the units for the bounds are degrees. For the z dimension, the units on the bounds are z pixels. The bin size field for a dimension shows the bin size in the same units as are used for the range. You can change the bin size and RadProj will update the number of bins so that it most closely approximates the value you entered. RadProj then coerces the bin size to match the size given by the number of bins and the range. Keep in mind that you can only have one dimension that has more than one bin if the selected output format is one of the text formats. When you change one dimension to have more than one bin, RadProj will automatically set the number of bins in the other dimensions to be on in order to enforce that restriction.

The "Order" menus are only relevant if the output format is MRC. The dimension that has an order of one will appear as the x dimension in the MRC data, the dimension that has an order of two will appear as the y dimension in the MRC data, and the dimension that has an order of three will appear as the z dimension in the MRC data.

Return to overview


Sampling

To calculate the projection, RadProj uses a splatting technique: the intensity for a pixel in the input is assigned to the bin that contains the point corresponding to the center of the pixel. There can be aliasing artifacts (i.e. the input sampling is not fine enough to handle your chosen output sampling) in the output with this method. Those artifacts are more significant at smaller radii. To mitigate the aliasing, you can have RadProj resample your data to a finer grid and then project the resampled data. The "Sampling" field holds the factor by which to increase the sampling. Allowed sampling factors are integers from one to eight. The interpolation menu controls how the pixel values at the resampled grid points are calculated from the original grid. The allowed interpolation options are:

nearest neighbor
The intensity at a new grid point is the intensity of the closest point from the input data.
linear
The intensity at a new grid point is bilinearly (if the output coordinate system is polar) or trilinearly (if the output coordinate system is cylindrical or spherical) interpolated from the original data values.
cubic
The intensity at a new grid point is computed via a cubic convolution kernel (two dimensional if the output coordinate system is polar; three dimensional in the other cases).
cubic positivity
Is similar to the cubic method, but if the input data is real-valued, an intensity of zero is used instead of the interpolated intensity at any grid point where the interpolated intensity is negative.

Return to overview