finesse.model.Model.get_parameters¶
- Model.get_parameters(*, include=None, exclude=None, are_changing=None, are_symbolic=None)[source]¶
- Get all or a filtered list of parameters from all elements in the model. - Parameters:
- include[iterable|str], optional
- Parameters that should be included. - If a single string is given it can be a Unix file style wildcard (See - fnmatch). A value of None means everything is included.- If an iterable is provided it must be a list of names or Parameter objects. 
- exclude[iterable|str], optional
- Parameters that should not be included. - If a single string is given it can be a Unix file style wildcard (See - fnmatch). A value of None means nothing is excluded.- If an iterable is provided it must be a list of names or Parameter objects. 
- are_changingboolean, optional
- Filter if Parameter has a value that will be marked as changing during a simulation. Note this might be a user chaniging variable or a symbolic value whose arguments are changing. 
- are_symbolicboolean, optional
- Filter if Parameter has a symbolic value. If set to None, not filtering is done. 
 
- Returns:
- parameterslist
- List of filtered Parameters 
 
 - Examples - >>> model = finesse.Model() >>> model.parse(''' ... l l1 ... l l2 ... lens L1 f=100 ... link(l1, L1, l2) ... pd P1 L1.p1.o ... pd P2 L1.p2.o ... ''') >>> print(model.get_parameters(include='*f*')) >>> print(model.get_parameters(include='*f*', exclude='l2*')) [<fsig.f=None @ 0x7f7fc449a580>, <l1.f=0.0 @ 0x7f7fc449a340>, <l2.f=0.0 @ 0x7f7fc449a880>, <L1.f=100.0 @ 0x7f7fc449aac0>] [<fsig.f=None @ 0x7f7fc449a580>, <l1.f=0.0 @ 0x7f7fc449a340>, <L1.f=100.0 @ 0x7f7fc449aac0>]