# SciFigs: Curve Browser

Note: you can load as many curve as you want. However, you MUST keep only the curves that you want to invert. PLEASE do not forget to REMOVE the Data Sets you do not want to be used in the Inversion.

By pressing button Load a pop up window appears and you can select the ASCII file that has in a multi-column file format the Dispersion Curve information. After you select the file and press Open another dialog box appears where you can define the type of information you have in each column.

## Clear

By pressing Clear you remove all curves from the memory. In order to add a curve you should start from loading the curve. It is highly suggested after some processing with different Dispersion Curves to save the curves before removing everything. Do not forget if you use Save you also add the Log information of the work that has been done with different curves so that you can repeat the procedure later.

## Legend

You can also associate a special color, pen and symbol to each curve with the Legend button. Naming curves with unique names might be also useful.

## Averaging or merging curves

Once you have at least two curves loaded, you can select the Average button to average or merge several curves. A dialog box lets you select the curves to average or merge. Merging applies to non-overlapping frequency ranges, average applies to overlapping ranges. Both actions are automatically performed. If more than two curves are selected, curves are averaged or merged one by one using the same process:

• Build a vector with X values from the two curves.
• Resample both curves with this common X sampling.
• For each X value and for both curves, we have mean, variance, and weight (number of values used to compute statistics)

${\displaystyle {\begin{array}{ll}\mu ^{(1)},\sigma ^{(1)},w^{(1)}\\\mu ^{(2)},\sigma ^{(2)},w^{(2)}\end{array}}}$

Where:

${\displaystyle {\begin{array}{lll}\mu ^{(j)}&=&{\frac {\sum _{i=1}^{w^{(j)}}{s_{i}^{(j)}}}{w^{(j)}}}\\\sigma ^{(j)}&=&{\frac {\sum _{i=1}^{w^{(j)}}{(s_{i}^{(j)}-\mu ^{(j)})^{2}}}{w^{(j)}-1}}\\&=&{\frac {\sum _{i=1}^{w^{(j)}}{[(s_{i}^{(j)})^{2}+(\mu ^{(j)})^{2}-2s_{i}^{(j)}\mu ^{(j)}]}}{w^{(j)}-1}}\\&=&{\frac {\sum _{i=1}^{w^{(j)}}{(s_{i}^{(j)})^{2}}+w^{(j)}(\mu ^{(j)})^{2}-2\mu ^{(j)}\sum _{i=1}^{w^{(j)}}{s_{i}^{(j)}}}{w^{(j)}-1}}\\&=&{\frac {\sum _{i=1}^{w^{(j)}}{(s_{i}^{(j)})^{2}}+w^{(j)}(\mu ^{(j)})^{2}-2w^{(j)}(\mu ^{(j)})^{2}}{w^{(j)}-1}}\\&=&{\frac {\sum _{i=1}^{w^{(j)}}{(s_{i}^{(j)})^{2}}-w^{(j)}(\mu ^{(j)})^{2}}{w^{(j)}-1}}\end{array}}}$

${\displaystyle w^{(j)}}$ is the weight or equivalently the number of items in the statistical population used for the computation of ${\displaystyle \mu ^{(j)}}$ and ${\displaystyle \sigma ^{(j)}}$. ${\displaystyle s_{i}^{(j)}}$ is the ith item in population j.

The mean and variance computed over the whole population is then:

${\displaystyle {\begin{array}{lll}\mu &=&{\frac {\sum _{i=1}^{w^{(1)}}{s_{i}^{(1)}}+\sum _{i=1}^{w^{(2)}}{s_{i}^{(2)}}}{w^{(1)}+w^{(2)}}}={\frac {w^{(1)}\mu ^{(1)}+w^{(2)}\mu ^{(2)}}{w^{(1)}+w^{(2)}}}\\\sigma &=&{\frac {\sum _{i=1}^{w^{(1)}}{(s_{i}^{(1)})^{2}}+\sum _{i=1}^{w^{(2)}}{(s_{i}^{(2)})^{2}}-(w^{(1)}+w^{(2)})\mu ^{2}}{w^{(1)}+w^{(2)}-1}}\\&=&{\frac {\sigma ^{(1)}(w^{(1)}-1)+w^{(1)}(\mu ^{(1)})^{2}+\sigma ^{(2)}(w^{(2)}-1)+w^{(2)}(\mu ^{(2)})^{2}-(w^{(1)}+w^{(2)})\mu ^{2}}{w^{(1)}+w^{(2)}-1}}\end{array}}}$

## Table with Curve data

Curve Browser

All curves loaded or created so far are displayed on the attached plot (right hand side). Only one curve is shown in the Table (gray frame) each time (left hand side). To change the active/shown curve, move the horizontal scroll bar above the Table entitled Curve Data. The title of the frame just below the scroll bar give the index and the total number of available curves. All items within this frame Curve 1 of 2 apply to the current curve:

• Values of each parameter are given in the table and you can define if set of values for any frequency is valid, to be used, or not
• The curve Name as defined from the Filename when we imported the ASCII data file
• Visible check box can be used to remove the line from the graph on the right hand side of the window. Be careful this does not exclude the curve from further calculations it is just a visualization trick, that is very handy. You need to use from Actions (see below) REMOVE to exclude the Data from the group of curves to be used

### Actions

List of available actions for the current curve

#### Save

Saves current curve to a text file made of 4 columns: frequency, slowness, standard deviation and weight. The log is saved as comments before the curve samples.

#### Log

Shows a curve log of all actions performed on the current curve.

#### Remove

Removes the current curve from the plot. This is the only secure way to Remove a curve from the list of data we have. If you want any part of the removed curve you have to load it from the beginning. If you need to remove all curves please use Clear

#### Resample

Reorganize sampling of the current curve. Samples can be distributed on a log, linear or curvilinear scale. You can define any frequency range even outside the current available range. In this later case, samples are extrapolated and set as invalid. If the defined range is smaller than the current range, outside samples are not affected. To remove them use Cut.

#### Cut / Keep

Removes all samples outside a defined frequency or period range. It should called keep but for reason of consistency with other software we use Cut since it cuts the data that are outside the limits we define.

#### Smooth

Smooths the curve... currently not implemented.

### Manual editing

You can edit all values like in a usual work sheet.

If you want to set the same value to several rows:

• Selected the rows (by clicking on the left header to select the full row)
• Edit one cell of the selection
• Hit enter or move to another cell to validate
• A dialog box should pop up asking if you want to extend the edition to all other selected rows.