Synthetic generation¶
Reproducible illustrative datasets.
Illustrative data only
Generated curves are closed-form shapes — not Lamm-equation solutions, not simulations of sedimentation, and carrying no physical parameters. Nothing scientific may be inferred from them. See Synthetic data.
Configuration¶
SyntheticExperimentConfig
¶
Bases: BaseModel
A reproducible description of a synthetic dataset.
The same configuration and seed always produce the same experiment. Noise,
when enabled, is drawn from a generator seeded only by :attr:seed; NumPy's
global random state is never touched.
effective_radius_axis_mode
property
¶
The axis mode actually used, after scenario requirements.
Two scenarios require per-scan axes to express what they describe:
per-scan-radius by definition, and empty-scans because the
canonical model can only represent an empty scan when each scan owns its
own axis.
effective_signal_unit
property
¶
The signal unit actually used.
mixed-optics declares several optical systems against one shared
signal unit, so it uses UNKNOWN: any concrete unit would contradict
at least one of the declared systems and produce a structural error,
which is not what that scenario is for.
Scenario
¶
Bases: StrEnum
The shape of dataset to generate.
Names describe the structure being exercised, never a physical regime.
MetadataCompleteness
¶
Bases: StrEnum
How much optional metadata to attach.
Generation¶
generate_experiment
¶
Generate an illustrative synthetic experiment.
The same configuration always yields the same experiment. Generated values and their order are preserved exactly: nothing is sorted, resampled or interpolated after construction.
The result is illustrative synthetic data, never a physically validated simulation. It carries no sedimentation or diffusion coefficient, no molar mass and no fitted parameter, and none may be inferred from it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
SyntheticExperimentConfig
|
The dataset description, including the seed. |
required |
Returns:
| Type | Description |
|---|---|
AUCExperiment
|
A canonical :class: |
Source code in src/openauc/synthetic/generators.py
Writers¶
write_generic_long
¶
write_generic_long(
experiment: AUCExperiment,
directory: str | Path,
*,
overwrite: bool = False,
) -> Path
Write experiment as a generic-long CSV plus its manifest.
Returns the directory written. Reload it with openauc.load(directory).
Optional per-scan columns are emitted only when every scan carries the value as PRESENT — see the module docstring for why.
Source code in src/openauc/synthetic/writers.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
write_generic_wide
¶
write_generic_wide(
experiment: AUCExperiment,
directory: str | Path,
*,
overwrite: bool = False,
) -> Path
Write experiment as a generic-wide CSV plus its manifest.
Raises:
| Type | Description |
|---|---|
SyntheticWriteError
|
if the experiment does not share one radius axis. Wide layout has a single radius column, so per-scan axes cannot be expressed without resampling — which openauc never does. |
Source code in src/openauc/synthetic/writers.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
write_aucx
¶
Write experiment to an AUCX archive.
A thin pass-through to :func:openauc.export_aucx, which round-trips the
canonical model exactly — including the missing/unknown/not-applicable
distinctions that delimited output cannot carry.
Raises:
| Type | Description |
|---|---|
ArchiveError
|
if the destination exists and |