Changes in / [ed0b796:d186319] in sasview
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Vagrantfile
r601b93d r96032b3 21 21 # Every Vagrant development environment requires a box. You can search for 22 22 # boxes at https://atlas.hashicorp.com/search. 23 config.vm.box = "ubuntu/trusty64" 23 config.vm.box = "ubuntu1404" 24 config.vm.box_url = "https://github.com/hnakamur/packer-templates/releases/download/v1.0.2/ubuntu-14-04-x64-virtualbox.box" 24 25 #config.vm.box = "fedora19" 25 26 #config.vm.box_url = "https://dl.dropboxusercontent.com/u/86066173/fedora-19.box" -
docs/sphinx-docs/source/conf.py
r9a182b2 r86eb046 62 62 version = '4.0' 63 63 # The full version, including alpha/beta/rc tags. 64 release = '4.0 .0'64 release = '4.0b1' 65 65 66 66 # The language for content autogenerated by Sphinx. Refer to documentation -
sasview/README.txt
r9a182b2 r86eb046 4 4 1- Features 5 5 =========== 6 - New in Version 4.07 ------------------8 This release fixes the various bugs found during the alpha and beta testing9 - Improvements10 - Support for reading data files from Anton Paar Saxess instruments11 - Adds documentation on how to write custom models in the new framework12 - Bug Fixes13 - Fixes bug #604 Pringle model questions14 - Fixes bug #472 Reparameterize Teubner-Strey15 - Fixes bug #530 Numerical instabilities in Teubner Strey model16 - Fixes bug #658 ASCII reader very broken17 18 6 19 7 - New in Version 4.0 beta 1 … … 26 14 - Old custom models should now still work 27 15 - '''NOTE:''' These will be deprecated in a future version. Old 28 custom models should be converted to the new model format which 16 custom models should be converted to the new model format which 29 17 is now the same as the built in models and offers much better 30 18 support. … … 91 79 - New in Version 3.1.2 92 80 -------------------- 93 This release is a major stability improvement, having fixed a serious bug 81 This release is a major stability improvement, having fixed a serious bug 94 82 that came to light since release 3.1.1. All users should upgrade. 95 83 96 - Fixes bug #468 broken remove constraint buttons in 84 - Fixes bug #468 broken remove constraint buttons in 97 85 simultaneous/constrained fitting panel 98 - Fixes bug #474 resulting from changes in 3.1.1 that had 86 - Fixes bug #474 resulting from changes in 3.1.1 that had 99 87 introduced an error in the high-Q of slit-smeared models. 100 - Fixes bug #478 which would cause wx to run out of IDs and result 88 - Fixes bug #478 which would cause wx to run out of IDs and result 101 89 in SasView crashing even if left alone. 102 90 - Fixes bug #479 missing help button on simultaneous/constrained fit page … … 122 110 documentation. 123 111 - The model help has been split so that the Details button now brings up 124 a very short pop-up giving the equation being used while HELP goes to 112 a very short pop-up giving the equation being used while HELP goes to 125 113 the section in the full documentation describing the model. 126 - Extensive help has also been added for the new optimizer engine (see 114 - Extensive help has also been added for the new optimizer engine (see 127 115 below) including rules of thumb on how and when to choose a given 128 116 optimizer and what the parameters do. … … 139 127 - A Nelder-Mead Simplex optimizer 140 128 - A Differential Evolution optimizer 141 - A Monte Carlo optimizer (DREAM) 129 - A Monte Carlo optimizer (DREAM) 142 130 - New models were added: 143 131 - MicelleSphCoreModel (currently residing in the Uncategorized category) … … 148 136 - RectangularHollowPrismInfThinWallsModel 149 137 - Infrastructure to allow SESANS data to be fit with models was added. This 150 will become available in a future release but can currently be used from 138 will become available in a future release but can currently be used from 151 139 the command line with some caveats. 152 140 - A number of bugs were fixed including a thread crashing issue and an … … 173 161 floating. 174 162 - Five new models have been added: PringlesModel, CoreShellEllipsoidXTModel, 175 RectangularPrismModel, RectangularHollowPrismModel and 163 RectangularPrismModel, RectangularHollowPrismModel and 176 164 RectangularHollowPrismInfThinWallsModel. 177 - The data loader now supports ILL DAT data files and reads the full meta 165 - The data loader now supports ILL DAT data files and reads the full meta 178 166 information from canSAS file formats. 179 167 - Redefined convention for specifying angular parameters for anisotropic 180 168 models. 181 - A number of minor features have been added such as permitting a log 182 distribution of points when using a model to simulate data, and the 169 - A number of minor features have been added such as permitting a log 170 distribution of points when using a model to simulate data, and the 183 171 addition of a Kratky plot option to the linear plots. 184 172 - A number of bugs have also been fixed. 185 173 - Save Project and Save Analysis now work more reliably. 186 - BETA: Magnetic contrast supporting full polarization analysis has been 174 - BETA: Magnetic contrast supporting full polarization analysis has been 187 175 implemented for some spherical and cylindrical models. 188 176 - BETA: Two new tools have been added: 189 - A generic scattering calculator which takes an atomic, magnetic or 190 SLD distribution in space and generates the appropriate 2D 191 scattering pattern. In some cases the orientationally averaged 192 (powder) 1D scattering can also be computed. Supported formats 193 include: SLD or text, PDB, and OMF magnetic moment distribution 177 - A generic scattering calculator which takes an atomic, magnetic or 178 SLD distribution in space and generates the appropriate 2D 179 scattering pattern. In some cases the orientationally averaged 180 (powder) 1D scattering can also be computed. Supported formats 181 include: SLD or text, PDB, and OMF magnetic moment distribution 194 182 file. 195 - An image viewer/converter for data in image format; this reads in 196 an image file and will attempt to convert the image pixels to 183 - An image viewer/converter for data in image format; this reads in 184 an image file and will attempt to convert the image pixels to 197 185 data. Supported formats include: TIFF, TIF, PNG, BMP, JPG. 198 186 … … 222 210 - Added more plot symbols options for 1d plots 223 211 - Added improved trapping of compiling errors to the 'New model editor' 224 - Added some intelligent outputs (e.g., Rg, background, or rod diameter 212 - Added some intelligent outputs (e.g., Rg, background, or rod diameter 225 213 depending on the choice of axis scale of the plot) to the linear fits 226 214 - Added more models 227 228 - Feature set from previous versions 215 216 - Feature set from previous versions 229 217 ----------------------------------- 230 218 - Perspectives Available … … 232 220 specific surface area. 233 221 - P(r) inversion calculator: Indirect Fourier transformation method. 234 - Fitting: the tool used for modeling and fitting 1D and 2D data to 222 - Fitting: the tool used for modeling and fitting 1D and 2D data to 235 223 analytical model functions 236 224 - Tools: provides a number of useful supplementary tools such as SLD 237 calculation 238 239 - Fitting 225 calculation 226 227 - Fitting 240 228 - Includes a large number of model functions, both form factors and structure factors. 241 229 - Support P(Q)*S(Q) for form factors that flag they can be so multiplied. … … 245 233 - Anisotropic shapes and magnetic moment modeling in 2D allow for a non-uniform 246 234 distribution of orientations of a given axis leading to modeling and fitting 247 capabilities of non azimuthaly symmetric data. 235 capabilities of non azimuthaly symmetric data. 248 236 - User can choose to weight fits or not. If using weights, the user can choose 249 237 the error bar on each point if provided in the file, the square root 250 of the intensity or the intensity itself. 238 of the intensity or the intensity itself. 251 239 - Instrumental resolution smearing of model or fits is provided with several 252 240 options: read the resolution/point fromt he file. Input a pinhole resolution … … 261 249 data set or several different sets simultaneously with the application 262 250 of advanced constraints relating fit parameters to functions of other 263 parameters (including from a different set). For example thickness of 264 shell = sin(30) times the length. 251 parameters (including from a different set). For example thickness of 252 shell = sin(30) times the length. 265 253 - Models that are the sum of two other models can be easily generated through the 266 254 SUM Model menubar item. … … 271 259 and the mathematical function of the model (box 2) and generating the 272 260 necessary *.py file. A separate advanced model editor provides a full Python 273 file editor. Either way once saved the model becomes immediately available 274 to the application. 261 file editor. Either way once saved the model becomes immediately available 262 to the application. 275 263 - A batch fitting capability allows for the analysis of a series of data sets to 276 264 a single model and provides the results in a tabular form suitable for saving 277 265 or plotting the evolution of the fit parameters with error bars (from within 278 266 the application). 279 267 280 268 - Tools 281 269 - A scattering length density calculator,including some X-ray information … … 287 275 - A slit size calculator optimized for Anton Paar Saxess is provided. 288 276 - A kiessig fringe thickness calculator is provided 289 277 290 278 - Plots and plot management 291 279 - A 3D graphing option (for 2d data/results) is provided with the view … … 301 289 - Extensive context sensitive plot/fitting/manipulation options are available 302 290 through a right mouse click pop-up menu on plots. 303 291 304 292 - Data management 305 293 - Supports 2 + column 1D ASCII data, NIST 1D and 2D data, and canSAS data 306 via plug-in mechanism which can easily allow other readers as appropriate. 294 via plug-in mechanism which can easily allow other readers as appropriate. 307 295 - 2D data is expected in Q space but for historical reasons accepts the 308 296 NIST 2D raw pixel format and will do conversion internally. … … 310 298 right clicking on a data set and choosing Data Info in the DataExplorer 311 299 or on the plots 312 - Supports loading a single file, multiple files, or a whole folder 300 - Supports loading a single file, multiple files, or a whole folder 313 301 - An optional Data Explorer is provided (default) which simplifies managing, 314 302 plotting, deleting, or setup for computation. Most functions however do … … 316 304 right click menus and the toolbar. The data explorer can be re-started 317 305 from the menu bar. 318 306 319 307 - Data manipulation 320 308 - Support various 2D averaging methods : Circular, sectors, annular, … … 322 310 - A 2D data maks editor is provided 323 311 - 2D mask can be applied to the circular averaging. 324 312 325 313 - Miscellaneous features 326 314 - limited reports can be generated in pdf format … … 343 331 2- Downloading and Installing 344 332 ============================= 345 333 346 334 *** Note 1: Much more information is available at www.sasview.org under links. 347 335 Look in the 'For Developers' section and particularly the wiki at … … 382 370 - The following modules are required (version numbers are what are used 383 371 in the windows release build): 384 372 385 373 - Common Packages 386 374 - reportlab 3.1.44 … … 399 387 - html5lib Version Installed: 0.99999 400 388 - wx Version Installed: 3.0.2.0 401 389 402 390 - Windows Specific Packages 403 391 - pywin 219 … … 405 393 - comtypes 1.1.1 406 394 - MinGW w/ gcc version 4.6.1 (WIN) 407 - vcredist_x86.exe (version 9.0.21022.8 -microsoft visual C 2008 395 - vcredist_x86.exe (version 9.0.21022.8 -microsoft visual C 2008 408 396 re-distributable) 409 397 - Innosetup (WIN - isetup 5.4.2-unicode) - used to create distributable … … 411 399 *** Note: Windows build dependencies can be set up using anaconda. Instructions 412 400 can be found at http://trac.sasview.org/wiki/AnacondaSetup 413 401 414 402 - MAC Specifc Packages 415 403 - py2app 0.7.1 416 404 417 405 418 406 3- Known Issues … … 424 412 equations will render properly. Until then they will show in their 425 413 original TeX format. 426 - If the documentation window remains stubbornly blank, try installing a 414 - If the documentation window remains stubbornly blank, try installing a 427 415 different browser and set that as your default browser. Issues have 428 416 been noted with Internet Explorer 11. 429 - Check for Updates may fail (with the status bar message ' Cannot 430 connect to the application server') if your internet connection uses 431 a proxy server. Tested resolutions for this are described on the 417 - Check for Updates may fail (with the status bar message ' Cannot 418 connect to the application server') if your internet connection uses 419 a proxy server. Tested resolutions for this are described on the 432 420 website FAQ. 433 421 - The copy and paste functions (^C, ^V) in the batch mode results grid 434 422 require two clicks: one to select the cell and a second to select the 435 contents of the cell. 423 contents of the cell. 436 424 - The tutorial has not yet been updated and is somewhat out of date 437 425 - Very old computers may struggle to run the 3.x and later releases … … 448 436 - The angular distribution angles are not clearly defined and may in 449 437 some cases lead to incorrect calculations(ticket #332) 450 438 451 439 3.2- Windows: 452 440 - If installed to same directory as old version without first removing … … 455 443 have the old name even though pointing to the new version. Usually 456 444 safest to uninstall old version prior to installing new version anyway. 457 445 458 446 3.3- MAC: 459 447 - Application normally starts up hidden. Click icon in Dock to view/use 460 application. 448 application. 461 449 - Multiprocessing does not currently work on MAC OS 462 450 463 451 3.4- Linux: 464 452 - Not well tested … … 468 456 ================== 469 457 470 - www.sasview.org. This main project site is the gateway to all 458 - www.sasview.org. This main project site is the gateway to all 471 459 information about the sasview project. It includes information 472 460 about the project, a FAQ page and links to all developer and user … … 487 475 - Latest developer builds 488 476 - https://jenkins.esss.dk/sasview/view/Master-Builds/ 477 478 -
sasview/__init__.py
r9a182b2 r4ac4caa 1 __version__ = "4.0 "1 __version__ = "4.0b1" 2 2 __build__ = "GIT_COMMIT" 3 3 try: -
sasview/local_config.py
re74274ab r9bbc074 35 35 '''Acknowledge its use in your publications as suggested below''' 36 36 _acknowledgement_preamble_bullet2 =\ 37 '''Reference SasView as : Doucet M, et. al. SasView version 4.0, Zenodo''' +\ 38 ''', http://doi.org/10.5281/zenodo.159083''' 37 '''Reference the following website: http://www.sasview.org''' 39 38 _acknowledgement_preamble_bullet3 =\ 40 39 '''Reference the model you used if appropriate (see documentation for refs)''' … … 43 42 _acknowledgement_publications = \ 44 43 '''This work benefited from the use of the SasView application, originally 45 developed under NSF award DMR-0520547. SasView contains code developed with 46 funding from the European Union's Horizon 2020 research and innovation programme 47 under the SINE2020 project, grant agreement No 654000. 44 developed under NSF award DMR-0520547. 48 45 ''' 49 46 _acknowledgement = \ 50 47 '''This work originally developed as part of the DANSE project funded by the NSF 51 48 under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS 52 and ILL. SasView contains code developed with funding from the European Union's 53 Horizon 2020 research and innovation programme under the SINE2020 project, grant 54 agreement No 654000. 49 and ILL. 55 50 56 51 ''' -
src/sas/sascalc/dataloader/readers/anton_paar_saxs_reader.py
ra235f715 r80c5d46 45 45 output = None 46 46 47 def reset_state(self):47 def __init__(self): 48 48 self.current_dataset = Data1D(np.empty(0), np.empty(0), 49 49 np.empty(0), np.empty(0)) … … 72 72 73 73 ## Reinitialize the class when loading a new data file to reset all class variables 74 self. reset_state()74 self.__init__() 75 75 ## Check that the file exists 76 76 if os.path.isfile(filename): … … 84 84 self.raw_data = buff.splitlines() 85 85 self.read_data() 86 xml_intermediate = self.raw_data[self.upper:] 87 xml = ''.join(xml_intermediate) 88 self.set_xml_file(xml) 86 89 return self.output 87 90 … … 97 100 self.lower = 5 98 101 self.upper = self.lower + self.data_points 99 self.source.radiation = 'x-ray' 100 normal = float(line4[3]) 102 self.detector.distance = float(line4[1]) 101 103 self.current_dataset.source.radiation = "x-ray" 102 104 self.current_dataset.source.name = "Anton Paar SAXSess Instrument" 103 105 self.current_dataset.source.wavelength = float(line4[4]) 104 xvals = [] 105 yvals = [] 106 dyvals = [] 106 normal = line4[3] 107 107 for i in range(self.lower, self.upper): 108 index = i - self.lower109 108 data = self.raw_data[i].split() 110 xvals.insert(index, normal * float(data[0])) 111 yvals.insert(index, normal * float(data[1])) 112 dyvals.insert(index, normal * float(data[2])) 113 self.current_dataset.x = np.append(self.current_dataset.x, xvals) 114 self.current_dataset.y = np.append(self.current_dataset.y, yvals) 115 self.current_dataset.dy = np.append(self.current_dataset.dy, dyvals) 116 if self.data_points != self.current_dataset.x.size: 117 self.errors.add("Not all data was loaded properly.") 118 if self.current_dataset.dx.size != self.current_dataset.x.size: 119 dxvals = np.zeros(self.current_dataset.x.size) 120 self.current_dataset.dx = dxvals 121 if self.current_dataset.x.size != self.current_dataset.y.size: 122 self.errors.add("The x and y data sets are not the same size.") 123 if self.current_dataset.y.size != self.current_dataset.dy.size: 124 self.errors.add("The y and dy datasets are not the same size.") 125 self.current_dataset.errors = self.errors 126 self.current_dataset.xaxis("Q", q_unit) 127 self.current_dataset.yaxis("Intensity", i_unit) 128 xml_intermediate = self.raw_data[self.upper:] 129 xml = ''.join(xml_intermediate) 130 self.set_xml_string(xml) 131 dom = self.xmlroot.xpath('/fileinfo') 132 self._parse_child(dom) 109 x_val = [float(data[0])] 110 y_val = [float(data[1])] 111 dy_val = [float(data[2])] 112 self.current_dataset.x = np.append(self.current_dataset.x, x_val) 113 self.current_dataset.y = np.append(self.current_dataset.y, y_val) 114 self.current_dataset.dy = np.append(self.current_dataset.dy, dy_val) 115 self.current_dataset.xaxis("Q (%s)" % (q_unit), q_unit) 116 self.current_dataset.yaxis("Intensity (%s)" % (i_unit), i_unit) 117 self.current_dataset.detector.append(self.detector) 133 118 self.output.append(self.current_dataset) 134 135 def _parse_child(self, dom, parent=''):136 """137 Recursive method for stepping through the embedded XML138 :param dom: XML node with or without children139 """140 for node in dom:141 tagname = node.tag142 value = node.text143 attr = node.attrib144 key = attr.get("key", '')145 if len(node.getchildren()) > 1:146 self._parse_child(node, key)147 if key == "SampleDetector":148 self.current_dataset.detector.append(self.detector)149 self.detector = Detector()150 else:151 if key == "value":152 if parent == "Wavelength":153 self.current_dataset.source.wavelength = value154 elif parent == "SampleDetector":155 self.detector.distance = value156 elif parent == "Temperature":157 self.current_dataset.sample.temperature = value158 elif parent == "CounterSlitLength":159 self.detector.slit_length = value160 elif key == "unit":161 value = value.replace("_", "")162 if parent == "Wavelength":163 self.current_dataset.source.wavelength_unit = value164 elif parent == "SampleDetector":165 self.detector.distance_unit = value166 elif parent == "X":167 self.current_dataset.xaxis(self.current_dataset._xaxis, value)168 elif parent == "Y":169 self.current_dataset.yaxis(self.current_dataset._yaxis, value)170 elif parent == "Temperature":171 self.current_dataset.sample.temperature_unit = value172 elif parent == "CounterSlitLength":173 self.detector.slit_length_unit = value174 elif key == "quantity":175 if parent == "X":176 self.current_dataset.xaxis(value, self.current_dataset._xunit)177 elif parent == "Y":178 self.current_dataset.yaxis(value, self.current_dataset._yunit) -
src/sas/sascalc/dataloader/readers/xml_reader.py
ra235f715 rb699768 70 70 self.xmldoc = etree.parse(self.xml, parser=PARSER) 71 71 self.xmlroot = self.xmldoc.getroot() 72 except etree.XMLSyntaxError as xml_error:73 logging.info(xml_error)74 except Exception:75 self.xml = None76 self.xmldoc = None77 self.xmlroot = None78 79 def set_xml_string(self, tag_soup):80 """81 Set an XML string as the working XML.82 83 :param tag_soup: XML formatted string84 """85 try:86 self.xml = tag_soup87 self.xmldoc = tag_soup88 self.xmlroot = etree.fromstring(tag_soup)89 72 except etree.XMLSyntaxError as xml_error: 90 73 logging.info(xml_error)
Note: See TracChangeset
for help on using the changeset viewer.