pagestate

sans.perspectives.fitting.pagestate

class sans.perspectives.fitting.pagestate.PageState(parent=None, model=None, data=None)

Bases: object

Contains information to reconstruct a page of the fitpanel.

clone()

Create a new copy of the current object

fromXML(file=None, node=None)

Load fitting state from a file

Parameters:
  • file – .fitv file
  • node – node of a XML document to read from
report(figs=None, canvases=None)

Invoke report dialog panel

: param figs: list of pylab figures [list]

set_plot_state(figs, canvases)

Build image state that wx.html understand by plotting, putting it into wx.FileSystem image object

set_report_string()

Get the values (strings) from __str__ for report

toXML(file='fitting_state.fitv', doc=None, entry_node=None)

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.

Parameters:
  • file – file to write to
  • doc – XML document object [optional]
  • entry_node – XML node within the XML document at which we will append the data [optional]
class sans.perspectives.fitting.pagestate.Reader(call_back=None, cansas=True)

Bases: sans.dataloader.readers.cansas_reader.Reader

Class to load a .fitv fitting file

get_state()
read(path)

Load a new P(r) inversion state from file

Parameters:path – file path
write(filename, datainfo=None, fitstate=None)

Write the content of a Data1D as a CanSAS XML file only for standalone

Parameters:
  • filename – name of the file to write
  • datainfo – Data1D object
  • fitstate – PageState object
write_toXML(datainfo=None, state=None)

Write toXML, a helper for write() , could be used by guimanager._on_save()

: return: xml doc

sans.perspectives.fitting.pagestate.parse_entry_helper(node, item)

Create a numpy list from value extrated from the node

Parameters:
  • node – node from each the value is stored
  • item – list name of three strings.the two first are name of data attribute and the third one is the type of the value of that attribute. type can be string, float, bool, etc.

: return: numpy array

Table Of Contents

Previous topic

models

Next topic

simfitpage

This Page