Changes in / [7d64b0e:ac1670a2] in sasview


Ignore:
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sasview/default_categories.json

    rd26dea0 refa5e44  
    1 {"Shapes": [["PearlNecklaceModel", true], ["HollowCylinderModel", true], ["CoreMultiShellModel", true], ["FCCrystalModel", true], ["CoreShellEllipsoidXTModel", true], ["FuzzySphereModel", true], ["CSParallelepipedModel", true], ["EllipticalCylinderModel", true], ["BCCrystalModel", true], ["LamellarFFHGModel", true], ["RectangularHollowPrismInfThinWallsModel", true], ["LamellarPCrystalModel", true], ["OnionExpShellModel", true], ["VesicleModel", true], ["MultiShellModel", true], ["RaspBerryModel", true], ["CoreShellEllipsoidModel", true], ["CappedCylinderModel", true], ["CylinderModel", true], ["SphericalSLDModel", true], ["StackedDisksModel", true], ["LamellarPSHGModel", true], ["CoreShellBicelleModel", true], ["RectangularHollowPrismModel", true], ["LamellarPSModel", true], ["EllipsoidModel", true], ["SphereModel", true], ["ParallelepipedModel", true], ["TriaxialEllipsoidModel", true], ["LamellarModel", true], ["PringlesModel", true], ["RectangularPrismModel", true], ["CoreShellCylinderModel", true], ["BinaryHSModel", true], ["FlexibleCylinderModel", true], ["SCCrystalModel", true], ["FlexCylEllipXModel", true], ["LinearPearlsModel", true], ["CoreShellModel", true]], "Structure Factor": [["SquareWellStructure", true], ["HayterMSAStructure", true], ["HardsphereStructure", true], ["StickyHSStructure", true]], "Shape-Independent": [["TwoPowerLawModel", true], ["GelFitModel", true], ["DABModel", true], ["PowerLawAbsModel", true], ["PorodModel", true], ["MassFractalModel", true], ["RPA10Model", true], ["TeubnerStreyModel", true], ["DebyeModel", true], ["MassSurfaceFractal", true], ["Core2ndMomentModel", true], ["TwoLorentzianModel", true], ["UnifiedPowerRgModel", true], ["PolymerExclVolume", true], ["BEPolyelectrolyte", true], ["GuinierModel", true], ["GuinierPorodModel", true], ["CorrLengthModel", true], ["StarPolymer", true], ["FractalModel", true], ["PeakLorentzModel", true], ["BroadPeakModel", true], ["PeakGaussModel", true], ["FractalCoreShellModel", true], ["Poly_GaussCoil", true], ["SurfaceFractalModel", true], ["GaussLorentzGelModel", true], ["LorentzModel", true]], "Uncategorized": [["ReflectivityModel", true], ["ReflectivityIIModel", true], ["LineModel", true], ["MicelleSphCoreModel", true]]} 
     1{"Shapes": [["PearlNecklaceModel", true], ["HollowCylinderModel", true], ["CoreMultiShellModel", true], ["LamellarFFHGModel", true], ["FCCrystalModel", true], ["CoreShellEllipsoidXTModel", true], ["FuzzySphereModel", true], ["CSParallelepipedModel", true], ["BCCrystalModel", true], ["EllipticalCylinderModel", true], ["RectangularHollowPrismInfThinWallsModel", true], ["LamellarPCrystalModel", true], ["OnionExpShellModel", true], ["VesicleModel", true], ["MultiShellModel", true], ["RaspBerryModel", true], ["CoreShellEllipsoidModel", true], ["CappedCylinderModel", true], ["CylinderModel", true], ["SphericalSLDModel", true], ["StackedDisksModel", true], ["LamellarPSHGModel", true], ["CoreShellBicelleModel", true], ["RectangularHollowPrismModel", true], ["LamellarPSModel", true], ["EllipsoidModel", true], ["SphereModel", true], ["ParallelepipedModel", true], ["TriaxialEllipsoidModel", true], ["LamellarModel", true], ["RectangularPrismModel", true], ["PringlesModel", true], ["CoreShellCylinderModel", true], ["BinaryHSModel", true], ["FlexibleCylinderModel", true], ["SCCrystalModel", true], ["FlexCylEllipXModel", true], ["LinearPearlsModel", true], ["CoreShellModel", true]], "Structure Factor": [["SquareWellStructure", true], ["HayterMSAStructure", true], ["HardsphereStructure", true], ["StickyHSStructure", true]], "Shape-Independent": [["TwoPowerLawModel", true], ["GelFitModel", true], ["DABModel", true], ["PowerLawAbsModel", true], ["PorodModel", true], ["MassFractalModel", true], ["TeubnerStreyModel", true], ["DebyeModel", true], ["MassSurfaceFractal", true], ["Core2ndMomentModel", true], ["TwoLorentzianModel", true], ["UnifiedPowerRgModel", true], ["PolymerExclVolume", true], ["BEPolyelectrolyte", true], ["GuinierModel", true], ["GuinierPorodModel", true], ["CorrLengthModel", true], ["StarPolymer", true], ["FractalModel", true], ["RPA10Model", true], ["PeakLorentzModel", true], ["BroadPeakModel", true], ["PeakGaussModel", true], ["FractalCoreShellModel", true], ["Poly_GaussCoil", true], ["SurfaceFractalModel", true], ["GaussLorentzGelModel", true], ["LorentzModel", true]], "Uncategorized": [["ReflectivityModel", true], ["ReflectivityIIModel", true], ["LineModel", true], ["MicelleSphCoreModel", true]]} 
  • sasview/local_config.py

    r4bf54044 rcaf3baa6  
    3434'''If you found this software useful to your work please remember to acknowledge  
    3535its use in your publications as suggested below and reference the SasView website:  
    36 http://www.sasview.org/. Please also consider letting us know by sending us the  
     36http://www.sasview.org/index.html. Please also consider letting us know by sending us the  
    3737reference to your work. This will help us to ensure the long term support and  
    3838development of the software. 
    3939''' 
    4040_acknowledgement_publications = \ 
    41 '''This work benefited from software developed by the DANSE project under NSF  
    42 award DMR-0520547 and currently maintained by NIST, UMD, ORNL, ISIS, ESS  
     41'''This work originally developed as part of the DANSE project funded by the NSF 
     42under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS  
    4343and ILL. 
    4444''' 
  • src/sas/dataloader/readers/cansas_reader.py

    rd26dea0 r9dedf40  
    105105    base_ns = "{cansas1d/1.0}" 
    106106 
    107     logging = None 
    108     errors = None 
     107    logging = [] 
     108    errors = [] 
    109109 
    110110    type_name = "canSAS" 
     
    120120    def __init__(self): 
    121121        ## List of errors 
    122         self.errors = set() 
    123         self.logging = [] 
     122        self.errors = [] 
    124123        self.encoding = None 
    125124 
     
    253252        for error in self.errors: 
    254253            data1d.errors.append(error) 
    255         self.errors.clear() 
     254        del self.errors[:] 
    256255        numpy.trim_zeros(data1d.x) 
    257256        numpy.trim_zeros(data1d.y) 
     
    302301        attr = node.attrib 
    303302        value_unit = '' 
    304         err_msg = None 
    305303        if 'unit' in attr and new_current_level.get('unit') is not None: 
    306304            try: 
     
    324322                        value_unit = local_unit 
    325323                        err_msg = "Unit converter is not available.\n" 
     324                        self.errors.append(err_msg) 
    326325                else: 
    327326                    value_unit = local_unit 
     
    334333                            ".format(data1d.{0})" 
    335334                exec intermediate.format(unitname, "{0}", "{1}") 
     335                self.errors.append(err_msg) 
    336336                value_unit = local_unit 
    337337            except: 
     
    340340                err_msg += "\"{0}\" unit [{1}]" 
    341341                err_msg = err_msg.format(tagname, local_unit) 
     342                self.errors.append(err_msg) 
    342343                value_unit = local_unit 
    343344        elif 'unit' in attr: 
    344345            value_unit = attr['unit'] 
    345         if err_msg: 
    346             self.errors.add(err_msg) 
    347346        node_value = "float({0})".format(node_value) 
    348347        return node_value, value_unit 
     
    356355        """ 
    357356        if data1d == None: 
    358             self.errors = set() 
     357            self.errors = [] 
    359358            x_vals = numpy.empty(0) 
    360359            y_vals = numpy.empty(0) 
     
    698697            node.append(point) 
    699698            self.write_node(point, "Q", datainfo.x[i], 
    700                             {'unit': datainfo._xunit}) 
     699                            {'unit': datainfo.x_unit}) 
    701700            if len(datainfo.y) >= i: 
    702701                self.write_node(point, "I", datainfo.y[i], 
    703                                 {'unit': datainfo._yunit}) 
     702                                {'unit': datainfo.y_unit}) 
    704703            if datainfo.dy != None and len(datainfo.dy) > i: 
    705704                self.write_node(point, "Idev", datainfo.dy[i], 
    706                                 {'unit': datainfo._yunit}) 
     705                                {'unit': datainfo.y_unit}) 
    707706            if datainfo.dx != None and len(datainfo.dx) > i: 
    708707                self.write_node(point, "Qdev", datainfo.dx[i], 
    709                                 {'unit': datainfo._xunit}) 
     708                                {'unit': datainfo.x_unit}) 
    710709            if datainfo.dxw != None and len(datainfo.dxw) > i: 
    711710                self.write_node(point, "dQw", datainfo.dxw[i], 
    712                                 {'unit': datainfo._xunit}) 
     711                                {'unit': datainfo.x_unit}) 
    713712            if datainfo.dxl != None and len(datainfo.dxl) > i: 
    714713                self.write_node(point, "dQl", datainfo.dxl[i], 
    715                                 {'unit': datainfo._xunit}) 
     714                                {'unit': datainfo.x_unit}) 
    716715 
    717716    def _write_trans_spectrum(self, datainfo, entry_node): 
     
    11701169                            err_mess += " %s unit [%s]; expecting [%s]\n  %s" \ 
    11711170                                % (variable, units, local_unit, exc_value) 
    1172                             self.errors.add(err_mess) 
     1171                            self.errors.append(err_mess) 
    11731172                            if optional: 
    11741173                                logging.info(err_mess) 
     
    11791178                        % (variable, units) 
    11801179                        err_mess += " expecting [%s]" % local_unit 
    1181                         self.errors.add(err_mess) 
     1180                        self.errors.append(err_mess) 
    11821181                        if optional: 
    11831182                            logging.info(err_mess) 
  • src/sas/guiframe/config.py

    r4bf54044 rf53cd30  
    3131'''If you found this software useful to your work please remember to acknowledge  
    3232its use in your publications as suggested below and reference the SasView website:  
    33 http://www.sasview.org/. Please also consider letting us know by sending us the  
     33http://www.sasview.org/index.html. Please also consider letting us know by sending us the  
    3434reference to your work. This will help us to ensure the long term support and  
    3535development of the software. 
    3636''' 
    3737_acknowledgement_publications = \ 
    38 '''This work benefited from software developed by the DANSE project under NSF  
    39 award DMR-0520547 and currently maintained by NIST, UMD, ORNL, ISIS, ESS  
     38'''This work originally developed as part of the DANSE project funded by the NSF 
     39under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS  
    4040and ILL. 
    4141''' 
  • src/sas/guiframe/local_perspectives/data_loader/data_loader.py

    rd26dea0 rb9dbd6b  
    204204            except: 
    205205                any_error = True 
    206             if any_error or error_message != "": 
    207                 if error_message == "": 
    208                     error = "Error: " + str(sys.exc_info()[1]) + "\n" 
    209                     error += "while loading Data: \n%s\n" % str(basename) 
    210                     error_message += "The data file you selected could not be loaded.\n" 
    211                     error_message += "Make sure the content of your file" 
    212                     error_message += " is properly formatted.\n\n" 
    213                     error_message += "When contacting the SasView team, mention the" 
    214                     error_message += " following:\n%s" % str(error) 
    215                 elif data_error: 
    216                     base_message = "Errors occurred while loading " 
    217                     base_message += "{0}\n".format(basename) 
    218                     base_message += "The data file loaded but with errors.\n" 
    219                     error_message = base_message + error_message 
    220                 else: 
    221                     error_message += "%s\n" % str(p_file) 
    222                 info = "error" 
    223          
    224         if any_error or error_message: 
     206        if any_error or error_message != "": 
     207            if error_message == "": 
     208                error = "Error: " + str(sys.exc_value) + "\n" 
     209                error += "while loading Data: \n%s\n" % str(p_file) 
     210                error_message = "The data file you selected could not be loaded.\n" 
     211                error_message += "Make sure the content of your file" 
     212                error_message += " is properly formatted.\n\n" 
     213                error_message += "When contacting the SasView team, mention the" 
     214                error_message += " following:\n%s" % str(error) 
     215            elif data_error: 
     216                base_message = "Errors occurred while loading {0}\n".format(p_file) 
     217                base_message += "The data file loaded but with errors.\n" 
     218                error_message = base_message + error_message 
     219            else: 
     220                error_message += "%s\n" % str(p_file) 
     221            info = "error" 
    225222            self.load_update(output=output, message=error_message, info=info) 
     223 
    226224        else: 
    227225            message = "Loading Data Complete! " 
    228226        message += log_msg 
    229227        self.load_complete(output=output, error_message=error_message, 
    230                            message=message, path=path, info='warning') 
     228                           message=message, path=path, info=info) 
    231229 
    232230    def load_update(self, output=None, message="", info="warning"): 
     
    235233        """ 
    236234        if message != "": 
    237             wx.PostEvent(self.parent, StatusEvent(status=message, info=info, 
     235            wx.PostEvent(self.parent, StatusEvent(status=message, info='info', 
    238236                                                  type="progress")) 
    239237    def load_complete(self, output, message="", error_message="", path=None, 
Note: See TracChangeset for help on using the changeset viewer.