Load and manage source curves

From the selected Dataset to the curve actually displayed: add two signals, identify the sources, show or hide a curve and remove it without deleting the canonical data.

Reference interface: GX-TXT DEV112-P011 · Dataset Curve Fit.

Dataset, source and plot: three different levels

In the previous chapter we chose a Dataset and bound the numerical X and Y variables. This prepares the link, but does not yet load the points into the Viewer. To see a curve in the Fit & Plot tab, add it with the Add Dataset curve command.

Three elements should be kept apart: the canonical Dataset, preserved in the Session; the source curve, added to the Curve Fitter Workspace with its own identifier; and the graphic representation, which shows the points or the line. Visibility changes affect the representation, while the Dataset stays registered in the Session.

Two synthetic signals, known units and values

We use two simulated, not measured scientific series. Both have 11 equally spaced observations, from 0 to 10 seconds. To make the comparison straightforward, both responses are in volts:

DatasetSynthetic expressionX range
c04_signal_aUA(t) = 0.25 V + (0.15 V/s) · t0 – 10 s
c04_signal_bUB(t) = 0.45 V + (0.08 V/s) · t0 – 10 s

Signal A rises faster; signal B starts from a higher voltage. The two lines cross at about 2.86 s. These values follow directly from the formulas used to build the examples and are not parameters estimated by Curve Fitter.

The series were added to a test Session as canonical Datasets with the public API DATASET_PUBLICATION_API_v2, keeping the X variable time_s (s) and the Y variable signal_v (V). No fit was performed in this teaching example.

Add the first curve to the Viewer

  1. Open Curve Fitter from the Viewers main tab.
  2. In the left column, in the Dataset and variables section, select the c04_signal_a Dataset.
  3. Choose Time (s) as X and Voltage (V) as Y; check that the two axes have consistent units.
  4. Leave the filter list empty to use all observations. Press the Add Dataset curve button in the Filters section (or the corresponding Sources menu item).
  5. Check that the Source curves table shows a row of type dataset and that the plot actually displays the points.
Figure 1. Dataset A was added to the scene with Add Dataset curve. The table shows source1, type dataset, and the plot shows the 11 original points. No fitted curve has appeared yet.

The bottom bar can report the number of exact rows and displayed points. In the example there are 11 source rows and 11 display points. The visible count was checked against the canonical source, not inferred from the plot pixels.

Load a second source

To compare two Datasets in the same Workspace you do not need to close the Viewer. Select the c04_signal_b Dataset, keep the X variable time_s and the Y variable signal_v variables, then press Add Dataset curve again. The program creates a second source curve, distinct from the first.

Figure 2. Two source curves loaded at the same time: signal A rises faster than signal B. In the initial configuration the lines may share the same color; the table identifies them unambiguously.

The Dataset currently selected in the upper controls must not be confused with a source already registered: changing the Dataset selector prepares a new link, while the curves already added remain listed in the Workspace.

Read the Source curves table

The source table identifies each curve with a local ID, its type and the source Dataset. The example shows source1 and source2. The IDs are Workspace references; they are not newly published Datasets and do not match the variable names.

Figure 3. List of the two sources with local IDs, type dataset and canonical identifiers. To manage a curve you must first select its row in the table.

Selecting a row indicates which source the commands apply to. Check the selected row before using Hide sources, Show sources or Remove sources.

Hide and show a curve

  1. In the Source curves table, select the source1 row.
  2. From the Sources menu choose Hide sources, or use the Hide command associated with the source list.
  3. Look at the plot: the first line is no longer drawn, but the table still contains both sources.
  4. Select the same row again and use Show sources (or Show) to restore the curve.
Figure 4. The source1 curve is hidden, not removed. The list keeps both sources; only signal B remains visible. The Show command was then verified by restoring the first curve.

Hide/Show does not change the Dataset values. This is a presentation choice, useful when more curves overlap or when you want to focus on one of the sources.

Remove a source from the Workspace

Removing differs from simply hiding. Select a row in the Source curves table and use Remove sources to delete that curve from the local list. In the example source2 was removed, keeping source1.

Figure 5. After Remove sources, the table keeps only source1. The catalog check confirmed that c04_signal_a and c04_signal_b are still both recorded in the Session.

The remove command acts on the curves in the Viewer; it does not delete the canonical Dataset. Actually deleting a Session Dataset is a separate procedure, not performed in this chapter.

Reload sources and change their appearance

The Sources menu also contains Reload active source and Style sources…. The first reloads a source from the current Dataset; the second sets presentation properties such as color and stroke. Use both only after identifying the correct source.

The Add, Hide, Show and Remove actions were verified directly here. Reloading and the style editor were not validated in this sequence, so no experimental outcome is claimed for them.

Checks before fitting

Before configuring a model, check the Dataset actually linked to each curve, the X/Y identifiers, the number of source rows and the visibility. The example uses two synthetic linear signals, but a line in the plot does not mean that the program has calculated a fit: what is shown is the drawing of the source data.

The next chapter covers observation filters and point selection, separating the display of the data from the set of points actually used in the fit.