@@ -123,20 +123,30 @@ def discriminate_contrasts(contrast_input):
123123]
124124
125125
126- class Project (BaseModel , validate_assignment = True , extra = "forbid" ):
126+ class Project (BaseModel , validate_assignment = True , extra = "forbid" , use_attribute_docstrings = True ):
127127 """Defines the input data for a reflectivity calculation in RAT.
128128
129129 This class combines the data defined in each of the pydantic models included in "models.py" into the full set of
130130 inputs required for a reflectivity calculation.
131131 """
132132
133133 name : str = ""
134+ """The name of the project."""
135+
134136 calculation : Calculations = Calculations .Normal
137+ """What calculation type should be used. Can be 'normal' or 'domains'."""
138+
135139 model : LayerModels = LayerModels .StandardLayers
140+ """What layer model should be used. Can be 'standard layers', 'custom layers', or 'custom xy'."""
141+
136142 geometry : Geometries = Geometries .AirSubstrate
143+ """What geometry should be used. Can be 'air/substrate' or 'substrate/liquid'"""
144+
137145 absorption : bool = False
146+ """Whether imaginary SLD (absorption) should be accounted for."""
138147
139148 parameters : ClassList [RATapi .models .Parameter ] = ClassList ()
149+ """The list of parameters used in the layers of a model."""
140150
141151 bulk_in : ClassList [RATapi .models .Parameter ] = ClassList (
142152 RATapi .models .Parameter (
@@ -150,6 +160,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
150160 sigma = np .inf ,
151161 ),
152162 )
163+ """The list of parameters for SLD of the entry interfaces of a model."""
153164
154165 bulk_out : ClassList [RATapi .models .Parameter ] = ClassList (
155166 RATapi .models .Parameter (
@@ -163,6 +174,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
163174 sigma = np .inf ,
164175 ),
165176 )
177+ """The list of parameters for SLD of the exit interfaces of a model."""
166178
167179 scalefactors : ClassList [RATapi .models .Parameter ] = ClassList (
168180 RATapi .models .Parameter (
@@ -176,6 +188,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
176188 sigma = np .inf ,
177189 ),
178190 )
191+ """The list of parameters for scale factors to handle systematic error in model data."""
179192
180193 domain_ratios : ClassList [RATapi .models .Parameter ] = ClassList (
181194 RATapi .models .Parameter (
@@ -189,6 +202,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
189202 sigma = np .inf ,
190203 ),
191204 )
205+ """The list of parameters for weighting between domains of a domains model."""
192206
193207 background_parameters : ClassList [RATapi .models .Parameter ] = ClassList (
194208 RATapi .models .Parameter (
@@ -202,10 +216,12 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
202216 sigma = np .inf ,
203217 ),
204218 )
219+ """The list of parameters for models of backgrounds."""
205220
206221 backgrounds : ClassList [RATapi .models .Background ] = ClassList (
207222 RATapi .models .Background (name = "Background 1" , type = TypeOptions .Constant , source = "Background Param 1" ),
208223 )
224+ """The list of models for background noise in the project."""
209225
210226 resolution_parameters : ClassList [RATapi .models .Parameter ] = ClassList (
211227 RATapi .models .Parameter (
@@ -219,13 +235,19 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
219235 sigma = np .inf ,
220236 ),
221237 )
238+ """The list of parameters for models of resolutions."""
222239
223240 resolutions : ClassList [RATapi .models .Resolution ] = ClassList (
224241 RATapi .models .Resolution (name = "Resolution 1" , type = TypeOptions .Constant , source = "Resolution Param 1" ),
225242 )
243+ """The list of models for instrument resolution in the project."""
226244
227245 custom_files : ClassList [RATapi .models .CustomFile ] = ClassList ()
246+ """Handles for custom files used by the project."""
247+
228248 data : ClassList [RATapi .models .Data ] = ClassList ()
249+ """Experimental data for a model."""
250+
229251 layers : Union [
230252 Annotated [ClassList [RATapi .models .Layer ], Tag ("no_abs" )],
231253 Annotated [ClassList [RATapi .models .AbsorptionLayer ], Tag ("abs" )],
@@ -238,7 +260,11 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
238260 custom_error_context = {"discriminator" : "absorption_or_no" },
239261 ),
240262 )
263+ """The layers of a standard layer model."""
264+
241265 domain_contrasts : ClassList [RATapi .models .DomainContrast ] = ClassList ()
266+ """The groups of layers required by each domain in a domains model."""
267+
242268 contrasts : Union [
243269 Annotated [ClassList [RATapi .models .Contrast ], Tag ("no_ratio" )],
244270 Annotated [ClassList [RATapi .models .ContrastWithRatio ], Tag ("ratio" )],
@@ -251,6 +277,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
251277 custom_error_context = {"discriminator" : "ratio_or_no_ratio" },
252278 ),
253279 )
280+ """All groups of components used to define each model in the project."""
254281
255282 _all_names : dict
256283 _contrast_model_field : str
0 commit comments