Create a Session and choose a Dataset for Curve Fitter
Prepare the working context, recognize a scientific Dataset and correctly bind the X and Y variables before fitting.
Reference interface: GX-TXT DEV112-P011 · Dataset Curve Fit.
Why a Session is needed
In GX-TXT a Session collects the Datasets and other resources of a scientific activity. Curve Fitter uses the Datasets available in the current Session: if no Session is open or no compatible variables are present, there is no curve to select for analysis.
From the start it helps to distinguish three objects: the Session, which defines the working context; the Dataset, which contains data and metadata; the Workspace of Curve Fitter, where fitting and results are managed. They are linked, but not equivalent.
Create a new Session from the menu
- Open GX-TXT and select the Sessions tab.
- In the Session menu choose New Session…. If a base directory is required, configure it before creating the Session.
- In the New Session window, enter a recognizable name in the Session name field.
- Check the destination indicated by Session root. The Standalone Session option lets you create the Session without linking it to a specific Project.
- Select Create and confirm the creation message.
After creation, the name of the new Session appears at the top of the main window. In the Sessions tab gives access to its documents and files.
An example scientific Dataset
To explain variable selection we use a small, entirely syntheticDataset, published in canonical form in the Session through the GX-TXT public API DATASET_PUBLICATION_API_v2 . It is not an instrument measurement and was not produced by a fit. Preparing or importing Datasets in the acquisition interface is a separate procedure.
The example represents an electrical signal as a function of time:
U(t) = 0.25 V + (0.15 V/s) · t, with t expressed in seconds.
Eleven observations were generated, from 0 to 10 seconds, with deterministic values and no added noise. The two numerical variables have stable identities and explicit units:
| Canonical variable | Visible label | Unit | Role |
|---|---|---|---|
time_s | Time (s) | s | Independent coordinate X |
signal_v | Signal (V) | V | Response Y |
Three representative rows of the Dataset are:
| Time (s) | Signal (V) |
|---|---|
| 0 | 0.25 |
| 5 | 1.00 |
| 10 | 1.75 |
The advantage of known data is that the numerical results can later be checked independently, separating variable-selection errors from estimation problems.
Locate the Dataset in the Dataset tab
Open the Dataset main tab. The Datasets panel on the right shows the Session resources grouped in a hierarchy. In the case shown, the test Dataset appears in the module → viewer.dataset_curve_fit group because it was published through that module.
The Dataset name identifies a registered canonical resource; it is neither the Session name nor the column labels. The same Dataset can contain several numerical variables, which must be bound correctly to the axes.
Select Dataset, X and Y in Curve Fitter
- Go back to the Viewers tab and open Curve Fitter.
- In the Dataset and variables section, open the Dataset selector and choose the Dataset to analyze. In the example,
c03_synthetic_signal. - In the X selector choose the Time (s) independent variable, corresponding to the
time_scanonical identifier. - In the Y selector choose the Signal (V) response, corresponding to
signal_v. - Check the consistency between axes, labels and units. The Show variable IDs option can be used when you need to distinguish similar labels.
time_s and signal_v.**Note the distinction:** selecting the Dataset, X and Y does not yet load the curve into the plot. The Fit & Plot area can still display Load a Dataset curve to begin. The next step will use the Add Dataset curve command, after checking any filters.
Essential checks before fitting
Before proceeding, check that the Session is the correct one, that the Dataset is actually present in the catalog, that X and Y are different numerical variables and that the units have a physical meaning consistent with the expected model. An inverted assignment changes the meaning of the fit, even when the program allows both orientations.
Curve Fitter can handle different orientations, but in this example we choose Y = f(X): the electrical signal is expressed as a function of time. The initially proposed model is linear; no fit is run in this chapter.
We therefore end with the Session available, the Dataset published and the X and Y variables bound. The next step is to actually add the curve to the working window.