Ignore:
Timestamp:
Aug 25, 2017 12:06:09 PM (4 years ago)
Author:
odonnell
Message:

add uiso setter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIscriptable.py

    r3023 r3026  
    378378
    379379
    380 ############################################
    381 ############ CIF export helpers ############
    382 ############################################
    383 ## These functions are translated from
    384 ## exports/G2export_CIF.py
    385 ## They are used in G2Phase.export_CIF
    386 
    387 
    388 
    389380def make_empty_project(author=None, filename=None):
    390381    """Creates an dictionary in the style of GSASIIscriptable, for an empty
     
    12851276            return self.data[self.cia+2:self.cia+8]
    12861277
     1278    @uiso.setter
     1279    def uiso(self, value):
     1280        if self.adp_flag == 'I':
     1281            self.data[self.cia+1] = float(value)
     1282        else:
     1283            assert len(value) == 6
     1284            self.data[self.cia+2:self.cia+8] = [float(v) for v in value]
     1285
    12871286
    12881287class G2PwdrData(G2ObjectWrapper):
     
    17091708                # self._WriteAtomsNuclear(fp, parmDict, sigDict)
    17101709            else:
    1711                 raise Exception,"no export for "+str(self.data['General']['Type'])+" coordinates implemented"
     1710                raise Exception("no export for "+str(self.data['General']['Type'])+" coordinates implemented")
    17121711            # report cell contents
    17131712            cif.WriteComposition(fp, self.data, self.name, parmDict)
     
    19071906# Command Line Interface #
    19081907##########################
     1908# Each of these takes an argparse.Namespace object as their argument,
     1909# representing the parsed command-line arguments for the relevant subcommand.
     1910# The argument specification for each is in the subcommands dictionary (see
     1911# below)
    19091912
    19101913
Note: See TracChangeset for help on using the changeset viewer.