Changeset fa6db8b in sasview for sansmodels
- Timestamp:
- Jul 9, 2012 6:39:37 AM (12 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- a269378
- Parents:
- 9696a10b
- Location:
- sansmodels
- Files:
-
- 2 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/include/sphere.h
r6319646 rfa6db8b 19 19 //[FIXED]= radius.width 20 20 //[ORIENTATION_PARAMS]= <text> </text> 21 //[CATEGORY] = Shapes & Spheres 21 22 22 23 class SphereModel{ -
sansmodels/src/python_wrapper/WrapperGenerator.py
r0a9686d rfa6db8b 90 90 ## parameters with orientation 91 91 self.orientation_params =[] 92 # Model category 93 self.category = None 92 94 ## output directory for wrappers 93 95 self.output_dir = output_dir … … 216 218 raise ValueError, "Could not parse file %s" % self.file 217 219 220 key = "[CATEGORY]" 221 if line.count(key)>0: 222 try: 223 index = line.index(key) 224 toks = line[index:].split("=") 225 self.category = toks[1].lstrip().rstrip() 226 227 except: 228 raise ValueError, "Could not parse file %s" % self.file 229 230 231 218 232 # Catch struct name 219 233 # C++ class definition … … 471 485 newline = self.replaceToken(newline, 472 486 "[ORIENTATION_PARAMS]", oriented_str) 473 487 488 if self.category: 489 newline = self.replaceToken(newline,"[CATEGORY]" 490 ,'"' + self.category + '"') 491 else: 492 newline = self.replaceToken(newline,"[CATEGORY]", 493 "None") 494 495 496 474 497 # Write new line to the wrapper .c file 475 498 file.write(newline+'\n') -
sansmodels/src/python_wrapper/modelTemplate.txt
r43e8326 rfa6db8b 68 68 ## parameters with orientation 69 69 self.orientation_params = [ORIENTATION_PARAMS] 70 71 self.category = [CATEGORY] 70 72 71 73 def __setstate__(self, state):
Note: See TracChangeset
for help on using the changeset viewer.