@@ -208,6 +208,66 @@ result = analyse_program(command, content, "param.txt", pspace, analyse;
208208 folder= " output" , filename= " results.csv" )
209209```
210210
211+ ### Experiment Data Management
212+
213+ Manage experimental data, constraints, and analysis results:
214+
215+ ``` julia
216+ using ParameterSpace
217+
218+ # Create a dataset for experimental data
219+ ds = DataSet {ExperimentData} (" axion-mass-constraints" )
220+
221+ # Add experiment data points
222+ add! (ds, ExperimentData (
223+ DataSource (citekey= " Smith2020" , paper= " Axion Search" ,
224+ year= 2020 , method= " Haloscope" ),
225+ params= (mass= 1e-6 , coupling= 1e-12 ),
226+ results= (sigma= 2.5 ,),
227+ uncertainty= (sigma= 0.3 ,)
228+ ))
229+
230+ # Add constraint data
231+ add! (ds, ConstraintData (
232+ DataSource (citekey= " Jones2021" , paper= " Dark Matter Limits" ,
233+ year= 2021 , method= " CMB" ),
234+ param= :mass ,
235+ lower= 1e-9 , upper= 1e-7 ,
236+ constraint_type= :exclude
237+ ))
238+
239+ # Query and filter data
240+ subset = filter (ds) do e
241+ e. source. year >= 2020 && haskey (e. params, :mass )
242+ end
243+
244+ # Statistical analysis
245+ stats = compute_statistics (ds, :sigma )
246+ # Returns: mean, std, median, min, max, count
247+
248+ # Find gaps in parameter space coverage
249+ gaps = find_gaps (ds, pspace; n_gaps= 10 )
250+ ```
251+
252+ ### Data Sources and Citations
253+
254+ Track data provenance with ` DataSource ` :
255+
256+ ``` julia
257+ source = DataSource (
258+ citekey= " Smith2020" ,
259+ paper= " Axion Dark Matter Search" ,
260+ year= 2020 ,
261+ method= " Haloscope" ,
262+ notes= " First results from new detector"
263+ )
264+
265+ # Access source information
266+ source. citekey # "Smith2020"
267+ source. year # 2020
268+ source. method # "Haloscope"
269+ ```
270+
211271## Legacy API (Backward Compatibility)
212272
213273The original ` Parameter ` type is still supported:
@@ -246,6 +306,13 @@ result = analyse_function(g, params, 1.0) # x is fixed at 1.0
246306- ` CoupledParamDim{T} ` : Coupled parameter dimension
247307- ` Parameter{A} ` : Legacy parameter type
248308
309+ ### Experiment Data Types
310+ - ` DataSet{T} ` : Generic dataset container
311+ - ` ExperimentData ` : Experimental data point with params, results, and uncertainty
312+ - ` ConstraintData ` : Constraint data with parameter bounds
313+ - ` DataSource ` : Source metadata (citekey, paper, year, method, notes)
314+ - ` GapRegion ` : Gap region in parameter space with center and priority
315+
249316### Sampling Strategies
250317- ` AbstractSamplingStrategy ` : Abstract base type
251318- ` RandomSampling(seed=nothing) ` : Random uniform sampling
@@ -261,6 +328,15 @@ result = analyse_function(g, params, 1.0) # x is fixed at 1.0
261328- ` load_yaml(filepath) ` , ` load_toml(filepath) ` : Load from config files
262329- ` save_yaml(pspace, filepath) ` , ` save_toml(pspace, filepath) ` : Save to config files
263330
331+ ### Experiment Data Functions
332+ - ` add!(dataset, data) ` : Add data to dataset
333+ - ` filter(f, dataset) ` : Filter dataset with predicate
334+ - ` compute_statistics(dataset, field) ` : Compute statistics for a field
335+ - ` find_gaps(dataset, pspace; n_gaps) ` : Find gaps in parameter space coverage
336+ - ` get_param(data, param) ` : Get parameter value
337+ - ` get_result(data, result) ` : Get result value
338+ - ` source(data) ` : Get data source information
339+
264340## Examples
265341
266342See the ` examples/ ` directory for more detailed examples:
0 commit comments