ABELCLEAN X
Try to clean up Abel inverted images. Calculate average horizontal gradient magnitude. If the average horizontal gradient in a single line is more than X times greater than the average, replace the line with the average of the lines above and below.
ACPDF n
Accumulate a pdf of 2 variables. The binning parameters are selected with the ACSPDF command. n is the single channel of the data to be used in accumulating the pdf. (Yale Command.)
ACSPDF start_val bin_width
Setup for the ACPDF command. Must specify:
Starting Value
Bin Width
Note that the number of bins is specified by the size of the 2D array defined when the accumulator is defined with the ACCGET command.
AINPUT [channel]
Reads the analog input from the specified channel (default is 0) of a Labjack U12 USB analog/digital I/O device. The value (in volts) is returned in command_return_1.
AMASK value
Make a “mask” corresponding to air in Rayleigh flame images. Set new image value to 1 under the following conditions:
image value > value
All image values along the current row have satisfied the above condition as well.
Otherwise, set the image value to 0. This assumes the cold air part of the image is on the left hand side.
ANGRAD
Replace the image with and image that represents the angle of the gradient at each point.
AOUTPUT v1 v2 [v3 v4]
Sends voltages to D/A converters 0 and 1 on a Labjack USB analog/digital I/O device.
If a Labjack U3 is present, v1 and v2 are sent to it.
If there is no U3 but there is a Labjack U12, v1 and v2 are sent to the U12.
If both U3 and U12 Labjacks are present and all 4 voltages are given, v1 and v2 are sent to the U3 and v3 and v4 are sent to the U12.
ATTENUATION
Runs the Attenuation algorithm in OMA on the image in the buffer. Attenuation parameters are specified using ATTVALUES. The OMA buffer contains the corrected intensity image. Other intermediate images are in the temporary buffers:
Temp[0]: The original image
Temp[1]: The K_div image (laser fluence correction for divergence)
Temp[2]: The local transmission fraction in a pixel due to extinction by particles, K_trans
Temp[3]: The Ck image
Temp[4]: The mean Particle cross-section distribution
Temp[5]: The number of standard particles in each pixel (N_p)
Temp[6]: The extinction history at each point.
ATTPRINT
Prints the Attenuation parameters to the OMA Command Window. Attenuation parameters are set with ATTVALUES.
ATTLSTHICKNESS <microns>
If <microns> is specified on the command line then the Attenuation parameter for Laser Sheet Thickness is set to that value. If this command is called without arguments then the Attenuation dialog box is opened.
ATTDIAMETER <microns>
If <microns> is specified on the command line then the Attenuation parameter for Mean Particle Diameter is set to that value. If this command is called without arguments then the Attenuation dialog box is opened.
ATTIPRESOLUTION <microns>
If <microns> is specified on the command line then the Attenuation parameter for In-Plane (CCD) Resolution is set to that value. If this command is called without arguments then the Attenuation dialog box is opened.
ATTSCALE <arg1>
If <arg1> is specified on the command line then the Attenuation parameter for Ck scaling parameter is set to that value. If this command is called without arguments then the Attenuation dialog box is opened.
ATTVALUES <xloc> <yloc>
Called with two arguments, this command sets the location of the Virtual Origin for the Attenuation algorithm. The V.O must be off the LHS of the image. If this is not the case, use FLIPH or ROTATE to make it so. The location of the V.O. is with respect the OMA origin, which is top-left corner of the image. If this command is called without arguments then the Attenuation dialog box is opened.
AVERAGE
This command calculates the average of the NON-ZERO pixels in the image and then writes this value into every pixel in the image. This allows the AVERAGE value to be easily passed into OMA Macros by using %b. We will let this still wreck the buffer for compatibility, but we will be more clever about passing results out in the command_return_N variables.
command_return_1 Average of non-zero pixels
command_return_2 Average of ALL pixels
command_return_3 rms of non-zero pixels
command_return_4 rms of all pixels
COSMOOTH dx dy cnt name
Contour-smoothing: where cnt is the nominal 1/2 width of contour interval (in counts) and name is the name of file to be smoothed. Read in Rayleigh file into buffer first.
COUNT
Count the number of distinct objects above a zero background. The original image is replaced. The maximum value is the number of objects. Try this:
SIN 50 50 ; create an image
DISP
COUNT ; count the peaks
DISP
CTRLST [num_pts]
Treat the current image as a set of connected contours. Make lists of the x-y pixels that define the contour, goes clockwise, nonzero values are on the contour. After the routine is done, the original image should all be zeros. Number of closed contours varies depending on the image. num_pts is the number of points on either side.
CYLIMAGE [COPX COPY COPZ]
Treat the data in the current image as a half cross section of a cylindrically symmetric intensity distribution. The centerline is assumed to be along the LHS of the image. An integrated image is calculated by rotating the image about the centerline. A pinhole camera imaging configuration is assumed, with the center of projection specified by the COPX COPY and COPZ coordinates. Default values are COPX = 0, COPY = imageheight/2, and COPZ = 1.0E10. (COPX = 0 means camera is centered, COPZ is the distance to the camera. Units for COPX, COPY, and COPZ are in pixels)
DIST2N value
Swap every pixel with distance to nearest neighbor with value <value>
DOUT state
Sets digital I/O bit 2 to low (state = 0) or high (state = 1) on a LabJack U12
FCALC
Using the data in the current buffer as rayleigh input and the specified file as the fluorescence input, create the conserved scalar image.
FCCASE
Set the information that the fcalc command returns.
FCONST
Read in constants to be used for FCALC.
FINDPEAK center start end
Locates peak within window designated (Center, +, -).
FMAXHORIZ
Scans an image horizontally. For each row, the pixel(s) holding the maximum value in that row are left alone. All other pixels are set to zero.
FMAXVERT
Scans an image vertically. For each column, the pixel(s) holding the maximum value in that column are left alone. All other pixels are set to zero.
FREEMEMORY
Free the memory from the background, mean, and response.
FUEL ctr1 ctr2 name
Fuel: command is “fuel ctr1 ctr2 name”, where ctr1 is the fuel contour at which the Rayleigh image will be cut to form a new fuel image. ctr 2 is a different contour value to determine the scaling and offset for this shot. name is the name of the Raman image. Read the Rayleigh image file into buffer first.
GETANGLE
Calculate the angle that the current image needs to be rotated to align the x center of mass with the y axis. The region inside the current rectangle is considered.
GETBKG
Writes to each pixel in the image a value that is the calculated average of all non-zero pixels in the original image, PLUS 3 times the rms. The original image is destroyed. This command is useful for stripping the background values from noisy CCD's by passing this 'background' value to variables within a macro. See also AVERAGE. We will let this still wreck the buffer for compatibility, but we will be more clever about passing results out in the command_return_N variables.
command_return_1 Average of non-zero pixels
command_return_2 Average of ALL pixels
command_return_3 rms of non-zero pixels
command_return_4 rms of all pixels
GETFUNCT n <filename>
Read in a tabulated function to be used with the LOOKUP command. This is also used in the C function tabfun(fn_number, x_val). Filename is file containing y=f(x) data pairs, preceded by number of table entries.
JFCALC
Using the data in the current buffer as Rayleigh input and the specified file as the fluorescence input, create the conserved scalar image.
JFCONS
Read in constants to be used for FCALC.
JFSTRI PE
Get a stripe response for the image -- j. frank algorithm.
KILBOX [value]
Much like FILBOX, this command works on the region of the image that has been specified with the RECT command or mouse. The contents of this region are set to 'value'. Default for 'value' is 0.
KINTEGRATE
The same as the “Plot Integrated” menu item.
KLIMIT flag
Set the printing flag. If flag = -1, turn off printing but save old status. If flag = -2, restore old status. Other values turn printing on. Cmnd K toggles limited printing.
KPCTR
The same as the “Plot Contours” menu item. It causes the data in the current buffer to be plotted according to the information in the “Set Contours” menu item.
KWABEL n
Uses analytic evaluation of integral required for abel inversion, which involves a lot of evaluations of ln(x). n is a scale factor for the image.
LABJAK
Performs a test on a Labjack U12 USB multifunction digital/analog I/O device.
LINE
Set all pixels in the specified row of the current image to 1.
LOOKUP fn_number
Redefine the current image using the lookup table specified by a tabulated function. Use GETFUNCT n filename before using this command. Ignore scale factors for now.
MAKPSZ
Crops an image to an appropriate size for PIV. Uses the values of PIVSIZE and PIVINC to trim away edges that would be ignored by PIV processing
MCALX
Using the data in the current buffer as Rayleigh input and the specified file as the fuel input, create the conserved scalar image.
MCONST
Read in constants to be used for MCALX.
NAN2ZERO
This command filters the Image buffer, PIV buffers and Temp image buffers. If a Pixel or Vector contains a 'not-a-number' (nan) then the pixel(s) and/or vector(s) are set to zero.
PARSE <filename>
Reads in a TECPLOT vector file from PIVView and converts to an OMA PIV field.
PDFDO flag
1-D pdf command. Command sequence would be
pdfsiz 0 1000 100 1 ; 100 bins data values from 0 to 1000
; exclude values outside the range 0 - 1000
...load an image.....
pdfdo 0 ; add all points in the current image to the pdf accumulator
pdfdo 1 ; get the pdf accumulator
PDFSIZE pdfstart pdfend pdfbins [pdf exclude flag]
Setup for the 1-D PDFDO command. Default for “pdf exclude flag” is 0.
PDFIT
Use 2-D fit (hardwired for now) to calculate a scalar from P and D image
Arguments:
Depolarized file name
Rayleigh-cts in air
Depolarized-cts in air
Scale factor for new image
flag: 1 for calculating T, 2 for calculating [CH4], else: xi
POLARN
Custom function by pkalt used for polaristion processing.
POPULN <filename>
Creates a CSV (Comma Separated Value) file named 'filename' of the histogram of values appearing within in an image. Creates 1024 bins, many of which will be zero if the image has less than 1024 discrete values.
PRFLAG flag
If “flag” is set to 0, no printing will be echoed to the command window.
If “flag” is non-zero, printing is controlled as normal.
RAMP
Fill current image with a ramp from 0 to the number of number of channels.
RYCALC <filename>
Using the data in the current buffer as rayleigh input and the specified file as the fluorescence input, create the conserved scalar image.
SAUTER <filename> <Factor>
Do a division of LIF and MIE images using floating point arithmetic.
<filename> name of file to act as the denominator
<Factor> scales the resulting image by this amount
SCALC center start end findpeak
Spectra Calc - locates peak and centers on it of findpeak != 0. SCALC requires estimate of peak location, the + and - limits and whether to locate the peak (1, default) or not (0) : e.g., SCALC 179 -5 +5 1
SCALC1 center start end refpeak
SCALC requires estimate of peak location, the + and - limits and a reference peak e.g., SCALC1 203 -5 +5 203
SERCLOSE
Closes the serial port opened with the last “SERIAL device_name” command. This can be used if you need to talk to more than one serial device -- open device 1, send commands, close the serial port, open device 2, send commands, and so forth.
SERIAL device_name (or character_string)
Provides a simple way of sending text strings to a serial device. For example, a KeySpan USB to serial converter can be used to control a variety stepping motor controllers, spectrographs, etc. The device name should be something like “/dev/tty.KeySpan1” Note that upper/lower case matters on these specifications. Look in the “/dev” directory to find the name of your specific hardware. After opening the device with the first SERIAL command, subsequent SERIAL commands will send across the specified character_string, followed by a <CR>. This uses standard POSIX calls.
SHIFT
Shifts the current image by an amount determined by the current PIV field. Useful for sub-pixel matching between images. (Uses 8-parameter bilinear method). Does this between each node of the PIV field. <Screws up the edges if the PIV field is significantly smaller than the image in the buffer.> Works nicely if the PIV field and image are the same size with no unused edges at the edge.
SINGRD
Draw grid from the sine function.
SINKPK [radius no_of_flags]
Is the pixel likely to be a local minima?
SOLGB <filename>
Get a Yale laminar flame calculation.
Read in binary numbers for a single variable. Assumes solget has been read in first. Use SOLMAKE to get the image.
SOLGET <filename>
Get a Yale binary laminar flame calculation.
SOLGF
Read in a string of formatted numbers for a single variable. Assumes solget has been read in first. Use solmak to get the image.
SOLMAKE x0 y0 x1 y1
Make an image from the solution read in SOLGET. x0 y0 x1 y1 are floating point numbers that specify the sub rectangle of the solution. current ruler determines the resolution. command-return: species multiplier (float)
SOLMULT snum mult moleflag
Specify the species_number, multiplier, and mole_fraction_flag to be used in SOLMAKE
SPEX command_string [parameters]
command_string specifies a SPEX command.
The values for parameters depend on the particular command.
Commands are as follows:
INIT initialize the spectrometer
GRATING set the grating (in nm)
SLIT set the slit width (in microns)
VERSION echo software version
STREAM x0 y0 scale_factor
x0 y0 is the starting location of the ray that will be propagated mainly in the x direction. The two components of the velocity field are needed. The y velocity is stored with SBACK; the x velocity field is in the current image buffer. On return, the image is zero except for the stream line. Values along the stream line correspond to elapsed time as determined by the scale_factor. time = distance/velocity*scale_factor. Distance is in pixels; velocity as per values in velocity files.
STRIPE start_col end_col rotation_angle [ave_value]
This command does the following operations using other internal routines
1) rotate the existing image by “rotation_angle”.
2) crop the rotated image to be so that no “filled” pixels are present (will be smaller than original).
3) divide each row of the image by the average of the pixels between start_col and end_col. If ave_value is not specified, the average of the region inside the box will be used.
STRTIM x0 dy scale_factor
This plots a series of streamlines in the image (similar to a loop containing STREAM commands). x0 is the starting location of the ray that will be propagated mainly in the x direction. dy is increment between rays and can be less than one pixel if a continuous “time elapsed” image is desired. When more than one elapsed time occurs within a given pixel, the minimum value is given. The two components of the velocity field are needed. The y velocity is stored with SBACK; the x velocity field is in the current image buffer. On return, the image is zero except for the stream lines. Values along the stream line correspond to elapsed time as determined by the scale_factor. time = distance/velocity*scale_factor. Distance is in pixels; velocity as per values in velocity files.
SWAPIX old new
This command goes through an image and swaps all occurrences of pixels with the value ='old', to now hold the value ='new'.
TECPLT <filename>
Exports the currently loaded PIV image to a text file called 'filename', in a format readable by the TecPlot graphics program.
TRACE y0 angle factor
Ray trace across the image continuous. Image interpreted as local index of refraction. y0 is the starting location of the ray. If y0 is positive, a single ray is drawn. If y0 is negative, it is taken as an increment, and many rays are traced across the image. e.g., y= -5 would trace a ray every 5th pixel. y0 = -0.1 would trace 10 rays across each pixel over the entire image. Angle is the initial propagation direction (in radians, 0 is horizontal). Factor is the amount that the data are divided by in calculating the index (index = 1.0 + signal/scale_factor).
TRACE2 y0 angle index2
Ray trace across contour lines.
TRACOR y0 angle factor smooth
Column-wise ray trace across the image. Image interpreted as local index of refraction. y0 is an increment between consecutive rays.
y0 = 5 would trace a ray every 5th pixel.
y0 = 0.1 would trace 10 rays across each pixel over the entire image.
Angle is the initial propagation direction (in radians, 0 is horizontal). Factor is the amount that the data are divided by in calculating the index (index = 1.0 + signal/scale_factor). smooth is the amount a column is Gaussian smoothed before being projected forward.
TRACPT 1/f# dtheta scale_factor
Ray trace from a point in the center-left of the image, through an ideal lens near the center of the image. The continuous image is interpreted as local index of refraction (index = 1.0 + signal/scale_factor). The inverse f# determines the angle over which rays from the point will be traced. dtheta (in radians) determines the increment between rays (smaller = more rays). Factor is the amount that the data are divided by in calculating the index.
(index = 1.0 + signal/scale_factor).
TRPDF pix_inc angle scale_factor pix_offset num_bins bin_width
Ray trace across an image and return the pdf of pixel displacements. The continuous image is interpreted as local index of refraction (index = 1.0 + signal/scale_factor). pix_inc an increment between successive traces (floating pt); pix_offset is how far away to stay from the top and bottom of the image; angle is the initial propagation direction (in radians, 0 is horizontal); num_bins is the number of bins in the returned histogram; bin_width is the bin width.
WAITHI bit_number
Waits until the specified digital I/O bit is asserted high on a LabJack U12. Don't use bit_number = 2, as that is reserved for output using the DOUT command.
WARP subpix
Remaps an image coordinate system using bilinear geometric warping.
x’ = a00 + a01x + a10y + a11xy
y’ = b00 + b01x + b10y + b11xy
The 8 parameters must first be read in with the WARPARAMS command. the subpix command specifies subpixel resolution used (default is 0.2). Without subpixel sampling, there would likely be holes in the warped image.
WARPARAMS <filename>
Reads in 8 warp parameters from the specified file. The format of the text file should be as follows:
a00 a01 a10 a11
b00 b01 b10 b11