SupraFit uses a JSON-based file format to store project data, analytical models, and statistical results. This specification defines the complete data structure for both single and multi-project files.
.suprafit: Compressed JSON format (default, recommended).json: Plain text JSON format (human-readable)
A single-project file contains one analytical experiment or analysis:
{
"data": {
"DataType": 1,
"SupraFit": 2024,
"title": "Project Title",
"uuid": "unique-project-identifier",
"independent": {...},
"dependent": {...},
"system": {...},
"raw": {},
"begin_data": 0,
"end_data": 25,
"timestamp": 1706123456789
},
"model_0": {
"model": 1,
"name": "1:1 Model",
"data": {
"globalParameter": {...},
"localParameter": {...},
"methods": {...}
}
},
"model_1": {...}
}A multi-project file contains multiple independent analyses:
{
"project_0": {
"data": {...},
"model_0": {...},
"model_1": {...}
},
"project_1": {
"data": {...},
"model_0": {...}
}
}DataType(integer): Data type identifier (1 = Table)SupraFit(integer): File format version numbertitle(string): Human-readable project titleuuid(string): Unique project identifiertimestamp(integer): Creation timestamp in millisecondsgit_commit(string): Git commit hash of SupraFit versioncontent(string): Enhanced content descriptionroot_dir(string): Root directory path
independent(object): Independent variable data tableheader(array): Column headersdata(object): Row-wise data storagechecked(object): Data point validation flags
dependent(object): Dependent variable data table (same structure)independent_raw(object): Raw independent data (unprocessed)dependent_raw(object): Raw dependent data (unprocessed)
system(object): System parameters (key-value pairs)raw(object): Additional raw data storagebegin_data(integer): Start index for data analysisend_data(integer): End index for data analysisxaxis(integer): X-axis column selectionsimulate_dependent(integer): Number of dependent series to simulate
model(integer): Model type ID (see MODEL_ID_REFERENCE.md)name(string): Human-readable model name
data(object): Core model informationglobalParameter(object): Global fitting parameters (e.g., stability constants)localParameter(object): Local fitting parameters (e.g., chemical shifts)active_series(string): Active data series configurationmethods(object): Statistical analysis results
Statistical post-processing results organized by analysis method:
"methods": {
"1": { // Monte Carlo
"controller": {...},
"parameter_0": {"data": {...}, "boxplot": {...}, "confidence": {...}}
},
"2": { // Cross Validation
"controller": {...},
"validation_results": {...}
},
"3": { // Reduction Analysis
"controller": {...},
"reduction_results": {...}
}
}colors(array): Chart color configurationkeys(array): UI state information
LegacyImportData(): Supports older data formatsLegacyImportModel(): Supports older model formats- Version checking: Prevents loading of newer formats in older SupraFit versions
AddModels: Current standard for model specificationMLModels: Legacy key, automatically converted to AddModels formatProcessMLPipeline: Enables ML pipeline workflow
{
"Main": {
"OutFile": "output_name",
"UseModularStructure": true,
"ProcessMLPipeline": true
},
"Independent": {
"Source": "generator",
"Generator": {
"Type": "equations",
"DataPoints": 20,
"Equations": "0.001|(X - 1) * 0.0001"
}
},
"Dependent": {
"Source": "generator",
"Generator": {
"Type": "model",
"Model": {"ID": 1}
},
"Noise": {
"Type": "gaussian",
"Std": [1e-3, 1e-3]
}
}
}{
"Main": {
"OutFile": "output_name",
"GenerateData": {
"UseDataGenerator": true,
"DataPoints": 15,
"Equations": "0.001|(X - 1) * 0.0001",
"Model": 1
}
}
}- Single-project: Must contain
dataobject - Multi-project: Must contain
project_Xobjects - Data object: Must contain
DataType,SupraFit,independent,dependent - Model objects: Must contain
model,name,data
- Files with
SupraFitversion > current version are rejected - Warning displayed for significantly older versions
- Legacy import functions handle format differences
- Independent and dependent data tables must have consistent dimensions
- Model parameters must match model type requirements
- UUID must be unique within multi-project files
- Use
JsonHandler::LoadFile()for .suprafit files - Use
QJsonDocument::fromJson()for .json files - Access data via
DataClass::ImportData()andAbstractModel::ImportModel() - Export via
DataClass::ExportData()andAbstractModel::ExportModel()
- Large model result datasets are stored in compressed .suprafit format
- Statistical analysis results can be memory-intensive
- Raw data preservation is optional and configurable
This specification defines the complete SupraFit JSON format as implemented in SupraFit v2024+.