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

  1. Open GX-TXT and select the Sessions tab.
  2. In the Session menu choose New Session…. If a base directory is required, configure it before creating the Session.
  3. In the New Session window, enter a recognizable name in the Session name field.
  4. Check the destination indicated by Session root. The Standalone Session option lets you create the Session without linking it to a specific Project.
  5. Select Create and confirm the creation message.
Figure 1. The original New Sessiondialog. The Session root field shows the folder chosen for Sessions; in the image the private path has been masked without changing the controls.

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.

Figure 2. Session created and active. The example uses a synthetic name, unrelated to real data or experiments.

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 variableVisible labelUnitRole
time_sTime (s)sIndependent coordinate X
signal_vSignal (V)VResponse Y

Three representative rows of the Dataset are:

Time (s)Signal (V)
00.25
51.00
101.75

The advantage of known data is that the numerical results can later be checked independently, separating variable-selection errors from estimation problems.

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.

Figure 3. The synthetic Dataset appears in the Session catalog. The text Active Dataset: None in this screenshot does not mean that the Dataset is missing: it means that it has not been chosen as the active Dataset in the main view.

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

  1. Go back to the Viewers tab and open Curve Fitter.
  2. In the Dataset and variables section, open the Dataset selector and choose the Dataset to analyze. In the example, c03_synthetic_signal.
  3. In the X selector choose the Time (s) independent variable, corresponding to the time_s canonical identifier.
  4. In the Y selector choose the Signal (V) response, corresponding to signal_v.
  5. Check the consistency between axes, labels and units. The Show variable IDs option can be used when you need to distinguish similar labels.
Figure 4. Actual selection of the Dataset and the two numerical variables in Curve Fitter. The visible labels correspond to the canonical IDs 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.