Bases: object
Class to hold the state information of the InversionControl panel.
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
Default values
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
Pretty print
: return: string representing the state
list of weak references to the object (if defined)
Check string ‘%’ for html format
deepcopy the state
Load invariant states from a file
: param file: .inv file : param node: node of a XML document to read from
Build image state that wx.html understand by plotting, putting it into wx.FileSystem image object
: extrap_high,extra_low: low/high extrapolations are possible extra-plots
Get the values (strings) from __str__ for report
Set the state list
: param name: name of the state component : param value: value of the state component
Writes the state of the InversionControl panel to file, as XML.
Compatible with standalone writing, or appending to an already existing XML document. In that case, the XML document is required. An optional entry node in the XML document may also be given.
: param file: file to write to : param doc: XML document object [optional] : param entry_node: XML node within the XML document at which
we will append the data [optional]
Bases: sans.dataloader.readers.cansas_reader.Reader
Class to load a .inv invariant file
Initialize the call-back method to be called after we load a file
: param call_back: call-back method : param cansas: True = files will be written/read in CanSAS format
False = write CanSAS format
Parse a SASentry
Parameters: | node – SASentry node |
---|---|
Returns: | Data1D object |
Read an invariant result from an XML node
: param entry: XML node to read from : return: InvariantState object
Load data and invariant information from a CanSAS XML file.
: param path: file path : return: Data1D object if a single SASentry was found,
or a list of Data1D objects if multiple entries were found, or None of nothing was found
: raise RuntimeError: when the file can’t be opened : raise ValueError: when the length of the data vectors are inconsistent
Load a new invariant state from file. The invariant node is assumed to be the top element.
: param path: file path : return: None
Get the content of a xpath location and store the result. The value is treated as a string.
The xpath location might or might not exist. If it does not exist, nothing is done
Parameters: |
|
---|---|
Returns: | return a list of errors |
Get the content of a xpath location and store the result. Check that the units are compatible with the destination. The value is expected to be a float.
The xpath location might or might not exist. If it does not exist, nothing is done
Parameters: |
|
---|---|
Raises ValueError: | |
raised when the units are not recognized |
Create an XML document to contain the content of a Data1D
Parameters: | datainfo – Data1D object |
---|
Load a new invariant state from file
: param path: file path : return: None
Write the content of a Data1D as a CanSAS XML file
: param filename: name of the file to write : param datainfo: Data1D object : param invstate: InvariantState object
Write toXML, a helper for write()
: return: xml doc