- Timestamp:
- Apr 10, 2021 4:33:39 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIscriptable.py
r4878 r4879 116 116 :meth:`G2Project.add_HoldConstr` Adds a hold constraint on one or more variables 117 117 :meth:`G2Project.add_EquivConstr` Adds an equivalence constraint on two or more variables 118 :meth:`G2Project.add_EqnConstr` Adds an equation-type constraint on two or more variables 118 119 119 120 ================================================== =============================================================================================================== … … 3065 3066 self.add_constraint_raw(typ, constr) 3066 3067 3067 def add_Eq uivEquation(self,total,varlist,multlist=[],reloadIdx=True):3068 def add_EqnConstr(self,total,varlist,multlist=[],reloadIdx=True): 3068 3069 '''Set a constraint equation on a list of variables. 3069 3070 … … 3089 3090 Example:: 3090 3091 3091 gpx.add_Eq uivEquation(1.0,('0::Ax:0','0::Ax:1'),[1,1])3092 gpx.add_EqnConstr(1.0,('0::Ax:0','0::Ax:1'),[1,1]) 3092 3093 3093 3094 ''' … … 3097 3098 self.index_ids() 3098 3099 if len(varlist) < 2: 3099 raise Exception('add_Eq uivEquationError: varlist must have at least 2 variables')3100 raise Exception('add_EqnConstr Error: varlist must have at least 2 variables') 3100 3101 try: 3101 3102 float(total) 3102 3103 except: 3103 raise Exception('add_Eq uivEquationError: total be a valid float')3104 raise Exception('add_EqnConstr Error: total be a valid float') 3104 3105 constr = [] 3105 3106 typ_prev = None … … 3128 3129 constr += [float(total), None, 'c'] 3129 3130 self.add_constraint_raw(typ, constr) 3130 3131 3132 3131 3133 def add_constraint_raw(self, cons_scope, constr): 3132 3134 """Adds a constraint to the project. -
trunk/exports/G2export_CIF.py
r4878 r4879 2150 2150 dlg.Destroy() 2151 2151 # scan over histograms used in this phase for 2152 pId = self.Phases[phasenam]['pId']2153 for h in phasedict['Histograms']:2154 if not phasedict['Histograms'][h]['Use']: continue2155 hId = self.Histograms[h]['hId']2156 T = self.Histograms[h]['Sample Parameters']['Temperature']2152 #pId = self.Phases[phasenam]['pId'] 2153 #for h in phasedict['Histograms']: 2154 # if not phasedict['Histograms'][h]['Use']: continue 2155 # hId = self.Histograms[h]['hId'] 2156 # T = self.Histograms[h]['Sample Parameters']['Temperature'] 2157 2157 2158 2158 # check if temperature values & pressure are defaulted
Note: See TracChangeset
for help on using the changeset viewer.