Filter observations and select points
Two operations not to be confused: limiting the rows of a Dataset with a filter, and choosing, among the points of a loaded curve, those to use in a later fit.
Verified interface: GX-TXT DEV112-P011 · Dataset Curve Fit.
Data filters and graphical point selection
A filter determines which rows of the source Dataset are included in the newly loaded curve. A point selection, on the other hand, works on a curve that is already loaded and identifies the observations that can be used for fitting. In Curve Fitter, drawing the source data and selecting points are kept separate.
This difference matters: a curve can contain six points after a filter, while only four of them are marked for the fit. In addition, the Fit points parameter must be set to selected so that the fit uses the selection instead of all available points. The calculation itself is not started in this chapter.
A synthetic signal with eleven observations
We use a teaching Dataset published through the standard GX-TXT Dataset API. It is not instrument data. The independent variable is time_s, in seconds, and the dependent variable is signal_v, in volts. The values follow a deterministic linear law:
U(t) = 0.25 V + (0.15 V/s) · t, for t from 0 to 10 s in steps of 1 s.
The initial source therefore contains 11 rows and 11 displayed points. These points come directly from the Dataset; the line drawn is not a regression computed by the program.
source1 source: eleven points of the canonical Dataset. No selection for the fit has been made yet.Set a numeric range filter
In the left column, scroll to the Filters section, then proceed as follows:
- In the variable selector choose Time (s), corresponding to the
time_scanonical ID. - In the operator selector choose between.
- In the limits field enter
3,8, i.e. the lower limit 3 and the upper limit 8, separated by a comma. - Press Add filter. The rule is added to the list of filters of the curve to be loaded.
For numerical variables, between is a inclusive range: both endpoints are kept. In our Dataset the times 3, 4, 5, 6, 7 and 8 seconds remain, so six observations.
time_s between 3,8 rule is visible in the filter list. The Rectangle mode box below belongs instead to the graphical point selection: the two operations have different purposes.Note: adding the rule does not retroactively change the data of the already loaded source1 source curve. To get a new curve that respects the filter, press Add Dataset curve again. source2 was created this way in the test, with six exact rows, while source1 keeps the eleven original rows.
To keep the images readable, the unfiltered source was temporarily hidden with Hide. Its row is still present in the Source curves table.
source2: six numerical points remain in the plot. The two rows of the table show that the unfiltered Dataset has not been removed from the Workspace.Select a point with a click
In the plot, clicking a point of the active curve marks it for selection. In the example, the point at t = 5 s and U = 1.00 V was chosen. Curve Fitter highlights it with a red marker, while the source curve stays blue.
Select groups of points with a rectangle
The Point selection section has the Rectangle mode control with three modes: Replace, Add and Subtract. Dragging the mouse in the plot area, the rectangle identifies the enclosed points. Any blue line segment crossing the rectangle does not add observations: the selection refers to the points, not to the whole line connecting them.
Replace — replace the selection
Set Rectangle mode → Replace and drag a rectangle enclosing the points at t = 3, 4 and 5 s. Previously selected points are replaced by the set enclosed in the new rectangle.
Add — add points to the selection
Without clearing the first three points, set Rectangle mode → Add and draw a second rectangle enclosing the points at t = 7 and 8 s. The selection grows from three to five points: 3, 4, 5, 7 and 8 s.
Subtract — exclude selected points
Set Rectangle mode → Subtract and draw a small rectangle around the point at t = 4 s. This point is removed from the selection, while the others stay selected. In the case shown the selection goes from five to four points: 3, 5, 7 and 8 s.
A rectangular outline is shown while dragging; in the images here the drag has already ended and the markers of the resulting selection are visible.
Fit points: all or selected
Selecting points with the mouse does not automatically mean that the fit uses them. The Fit model and configuration section contains the Fit points control, which distinguishes:
| Value | Operational meaning |
|---|---|
all | The next fit uses all points of the active source that passed the filter, regardless of which markers are red. |
selected | The next fit uses only the currently selected points, provided that the selection is sufficient and valid for the chosen model. |
In the example, after Subtract we set Fit points → selected. The selection consists of the four points listed. We did not request a Preview or accept a fit: the choice defines the set of data usable in the next calculation.
Clear the selection while keeping the Dataset
When you want to start again, use Clear point selection from the Viewer or the corresponding item in the Selection menu. In the test the command reset the selected point count to zero, without removing the two local sources or changing the loading filter.
Remember that after clearing the selection, leaving Fit points: selected does not automatically prepare a valid fit: you need to select enough observations or go back to all. Model definitions, the minimum number of points and the quality of residuals are covered in later chapters.
Checks before you run a Preview
The scientific check consists of keeping apart the origin of the observations, the filter and the point selection. In this example the canonical Dataset contains 11 rows, the new filtered source contains 6 points and the final selection before clearing included 4. None of these steps estimated the coefficients of the linear model.
Before requesting Preview fit, verify that the active source is the right one, that the filter rule corresponds to the desired range, that the count of selected points is consistent and that Fit points has the expected value.







