1111import numpy as np
1212from pydantic import (
1313 BaseModel ,
14- ConfigDict ,
1514 Discriminator ,
1615 Field ,
1716 Tag ,
@@ -124,15 +123,13 @@ def discriminate_contrasts(contrast_input):
124123]
125124
126125
127- class Project (BaseModel , validate_assignment = True , extra = "forbid" ):
126+ class Project (BaseModel , validate_assignment = True , extra = "forbid" , use_attribute_docstrings = True ):
128127 """Defines the input data for a reflectivity calculation in RAT.
129128
130129 This class combines the data defined in each of the pydantic models included in "models.py" into the full set of
131130 inputs required for a reflectivity calculation.
132131 """
133132
134- model_config = ConfigDict (use_attribute_docstrings = True )
135-
136133 name : str = ""
137134 """The name of the project."""
138135
@@ -146,7 +143,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
146143 """What geometry should be used. Can be 'air/substrate' or 'substrate/liquid'"""
147144
148145 absorption : bool = False
149- """Whether imaginary (absorption) SLD should be accounted for."""
146+ """Whether imaginary SLD (absorption) should be accounted for."""
150147
151148 parameters : ClassList [RATapi .models .Parameter ] = ClassList ()
152149 """The list of parameters used in the layers of a model."""
@@ -163,7 +160,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
163160 sigma = np .inf ,
164161 ),
165162 )
166- """The parameters for SLD of the entry interfaces of a model."""
163+ """The list of parameters for SLD of the entry interfaces of a model."""
167164
168165 bulk_out : ClassList [RATapi .models .Parameter ] = ClassList (
169166 RATapi .models .Parameter (
@@ -177,7 +174,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
177174 sigma = np .inf ,
178175 ),
179176 )
180- """The parameters for SLD of the exit interfaces of a model."""
177+ """The list of parameters for SLD of the exit interfaces of a model."""
181178
182179 scalefactors : ClassList [RATapi .models .Parameter ] = ClassList (
183180 RATapi .models .Parameter (
@@ -191,7 +188,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
191188 sigma = np .inf ,
192189 ),
193190 )
194- """The parameters for scale factors to handle systematic error in model data."""
191+ """The list of parameters for scale factors to handle systematic error in model data."""
195192
196193 domain_ratios : ClassList [RATapi .models .Parameter ] = ClassList (
197194 RATapi .models .Parameter (
@@ -205,7 +202,7 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
205202 sigma = np .inf ,
206203 ),
207204 )
208- """The parameters for weighting between domains of a domains model."""
205+ """The list of parameters for weighting between domains of a domains model."""
209206
210207 background_parameters : ClassList [RATapi .models .Parameter ] = ClassList (
211208 RATapi .models .Parameter (
@@ -219,12 +216,12 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
219216 sigma = np .inf ,
220217 ),
221218 )
222- """The parameters for models of backgrounds."""
219+ """The list of parameters for models of backgrounds."""
223220
224221 backgrounds : ClassList [RATapi .models .Background ] = ClassList (
225222 RATapi .models .Background (name = "Background 1" , type = TypeOptions .Constant , source = "Background Param 1" ),
226223 )
227- """The models for background noise in the project."""
224+ """The list of models for background noise in the project."""
228225
229226 resolution_parameters : ClassList [RATapi .models .Parameter ] = ClassList (
230227 RATapi .models .Parameter (
@@ -238,18 +235,18 @@ class Project(BaseModel, validate_assignment=True, extra="forbid"):
238235 sigma = np .inf ,
239236 ),
240237 )
241- """The parameters for models of resolutions."""
238+ """The list of parameters for models of resolutions."""
242239
243240 resolutions : ClassList [RATapi .models .Resolution ] = ClassList (
244241 RATapi .models .Resolution (name = "Resolution 1" , type = TypeOptions .Constant , source = "Resolution Param 1" ),
245242 )
246- """The models for instrument resolution in the project."""
243+ """The list of models for instrument resolution in the project."""
247244
248245 custom_files : ClassList [RATapi .models .CustomFile ] = ClassList ()
249246 """Handles for custom files used by the project."""
250247
251248 data : ClassList [RATapi .models .Data ] = ClassList ()
252- """Arrays of experimental data corresponding to a model."""
249+ """Experimental data for a model."""
253250
254251 layers : Union [
255252 Annotated [ClassList [RATapi .models .Layer ], Tag ("no_abs" )],
0 commit comments