Skip to content

4.6 Math

Mingsong Li edited this page Sep 2, 2019 · 5 revisions

Sort/Unique/Delete-empty

This function will sort the selected data file like MS Excel’s SORT function.

If a dataset contains 2 or more data points with the same time/depth, then these data points will be replaced by their mean values.

Shortcut keys

  • [Mac]: ⌘ + U
  • [Windows]: Ctrl + U

New file name: *-sue.txt or *-s.txt or *-u.txt

Interpolation

Linear interpolation using MatLab’s interp1 function.

Shortcut keys

  • [Mac]: ⌘ + I
  • [Windows]: Ctrl + I

New file name: *-rsp0.3.txt, where 0.3 is user-defined interpolation sampling rate.

Default value is the median of the sampling rate.

Select Parts

This function generates a new series from the selected data using user-defined ‘start’ and ‘end’ of the interval.

New file name: *-a-b.txt

where a is the “start” and b is the “end”.

Merge Series

Two selected series may be merged if their first columns are exactly the same.

New file name: mergedseries.txt

Add Gaps

This function generates a new series based on the selected data file via adding a gap or gaps using user-defined location and duration of the gap(s).

Format, comma delimited:

10.5, 3.2

Add a 3.2-unit gap at the depth/time of 10.5 unit, or

10.5, 3.2, 13.3, 1.5

Add a 3.2-unit gap at the depth/time of 10.5 unit and add the second 1.5-unit gap at the depth/time of 13.3 unit.

Remove Parts

This function generates a new series based on the selected data file via removing an user-defined interval(s).

Format, comma delimited

15, 3, 20.2, 4

Remove 3-unit data at the 15 unit (remove 15-18-unit data), and remove the second interval of 20.2-24.2-unit.

Remove Peaks

This function generates a new series based on the selected data file via converting any (2nd column) data higher than the user-defined Maximum value to that value and any data smaller than Minimum value to that value.

Clipping

This function generates a new series based on the selected data file via clipping data higher or smaller than the user-defined threshold value.

Smoothing:

Moving Average

This function generates a new series based on selected data file using n-points smoothing, where n is a user-defined parameter.

New file name: *-3ptsm.txt, means 3 points smoothing output.

Moving Median

This function generates a new series based on selected data file using x% median smoothing, where x is a user-defined parameter. The default value is 0.2 (20%).

New file name: *-20%-median.txt, means a 20% median smoothing output.

Bootstrap

This function generates two new series based on selected data file using user-defined smoothing window, smoothing method, and number of bootstrap sampling.

New file name:

*-WINDOW-METHOD-NUMBER-bootstp-meanstd.txt, mean and standard deviation data, and

*-WINDOW-METHOD-NUMBER-bootstp-percentile.txt, 0.5%, 2.275%, 15.865%, 50%, 84.135%, 97.725%, and 99.5% percentiles.

Changepoint

The Bayesian Change Point algorithm - A program to calculate the posterior probability of a change point in a time series.

Please acknowledge the program author on any publication of scientific results based in part on use of the program and cite the following article in which the program was described

E. Ruggieri (2013) "A Bayesian Approach to Detecting Change Points in Climatic Records," International Journal of Climatology, 33: 520-528. doi: 10.1002/joc.3447

Program Author: Eric Ruggieri

College of the Holy Cross

Worcester, MA 01610

Email: [email protected]

Standardize

Using MatLab’s zscore function.

Z = (X-u)/σ

where X is the second column data, u is the mean of X, and σ is the standard deviation of X.

New file name: *-stand.txt

Principal Component

This function has different requirements of the data inputs. All column (including the first column) of data should be value, not depth or time.

Log-transform

This function generates a new data file based on the selected data file using log10 transformation of the second column of the selected data.

Xi = log10(Xi)

New file name: *-log10.txt

Derivative

Approximate derivatives (first, second, third, …).

New file name: *-1derv.txt

Simple Function

This function is very useful. It generates a new data file based on the selected data file. Both columns (1st or X column and 2nd or Y column) can be modified. See below case study.

X(i) = a * X(i) + b

Y(i) = c * Y(i) + d

The selected data: all value in the first column data will be transformed using the equation X(i) = 1.5 * X(i) + 1; and all value in the second column data will be transformed using the equation Y(i) = 0.8 * Y(i) + (-3).

New file name: *-new.txt

Utilities

Find max/min

Find max/min value within a user-defined interval. Output will be displayed in command window only.

Image:

Show Image

Plot selected image file.

RGB to Grayscale

Convert a image file in RGB format to a grayscale format, save new image.

New image name: *-gray.tif

Image Profile

Get the grayscale profile from a line constrained by two user-selected dots.

New file name: *-profile.txt % grayscale profile

New file name: *-controlpoints.txt % location of two control points

  • Step 1: Choose the image file, select “Math - ImageImage Profile” function.

  • Step 2: Click data cursor tool (1), press the ALT key and click to choose 2 points.

  • Step 3: For the MatLab version of Acycle: press the Enter key. Grayscale profile data will be picked up and saved along the green line.

  • Step 3: For the standalone version of Acycle: go to the Mac terminal or Windows command window, press the Enter key.

Plot Digitizer

Digitize data points from an image file. Example:

  1. LoadExample-PlotDigitizer.jpg” and runPlot Digitizer

Q: How to do this?

A: Select “Basic Series” --> “Examples” --> “Image for Plot Digitizer”.

Left click to select the image file (or your own image -- a plot with data points) in the Acycle main window, select “Math” --> “Plot Digitizer” to run this GUI (see figures below).

You will see the pop-up window of “Acycle: Plot Digitizer” (top panel).

Follow the instructions in blue text (bottom left corner):

1. Calibrate axis

Click the “Calibrate axis” button

2. Pick-up axes limits

In the image plot figure, click four points in the correct order:

  • 2.1 minimum limit of x-axis
  • 2.2 maximum limit of x-axis
  • 2.3 minimum limit of y-axis, and
  • 2.4 maximum limit of y-axis
  1. Set axes limit values

Return the window of “Acycle: Plot Digitizer”,

Type the value of x- and y- axis limits.

And select “Linear” or “Log” model.

  1. Digitize

Click “Digitize” button, you are able to click in the image figure to select data points.

Data points will be recorded and displayed in “Data Extra Tab” GUI.

Right-click to terminate the digitizer; press “Digitize” to continue.

  1. Save Data

Click “Save Data” button to save digitized data points in text files.

  1. Undo

Press “Undo” to remove the last data point(s).

Clone this wiki locally