Last change
on this file since 8e674ccf was
6ff2eb3,
checked in by Piotr Rozyczko <rozyczko@…>, 8 years ago
|
Magnetic angles image widget
|
-
Property mode set to
100644
|
File size:
1.8 KB
|
Rev | Line | |
---|
[1bc27f1] | 1 | """ |
---|
| 2 | Container class for fitting widget state storage |
---|
| 3 | """ |
---|
[f7f5796] | 4 | class FitPage(object): |
---|
| 5 | """ |
---|
| 6 | Container for all data related to the current fit page |
---|
| 7 | """ |
---|
[6066a3f] | 8 | MIN_RANGE = 0 |
---|
| 9 | MAX_RANGE = 1 |
---|
| 10 | NPTS = 2 |
---|
| 11 | NPTS_FIT = 3 |
---|
| 12 | LOG_POINTS = 4 |
---|
| 13 | WEIGHTING = 5 |
---|
| 14 | SMEARING_OPTION = 6 |
---|
| 15 | SMEARING_ACCURACY = 7 |
---|
| 16 | SMEARING_MIN = 8 |
---|
| 17 | SMEARING_MAX = 9 |
---|
| 18 | def __init__(self): |
---|
[f7f5796] | 19 | """ |
---|
| 20 | Define the dictionary |
---|
| 21 | """ |
---|
| 22 | # Main tab |
---|
| 23 | self.current_category = "" |
---|
| 24 | self.current_model = "" |
---|
| 25 | self.current_factor = "" |
---|
| 26 | |
---|
| 27 | self.page_id = 0 |
---|
[672b8ab] | 28 | self.data_is_loaded = False |
---|
[f7f5796] | 29 | self.filename = "" |
---|
[672b8ab] | 30 | self.data = None |
---|
| 31 | self.parameters_to_fit = [] |
---|
[6964d44] | 32 | self.kernel_module = None |
---|
[6066a3f] | 33 | |
---|
[f7f5796] | 34 | # QModels |
---|
| 35 | self.param_model = None |
---|
| 36 | self.poly_model = None |
---|
| 37 | self.magnetism_model = None |
---|
| 38 | |
---|
| 39 | # Displayed values - tab #1 |
---|
| 40 | self.is_polydisperse = False |
---|
| 41 | self.is2D = False |
---|
| 42 | self.is_magnetism = False |
---|
| 43 | self.displayed_values = {} |
---|
| 44 | self.chi2 = None |
---|
| 45 | |
---|
| 46 | # Fit options - tab #2 |
---|
| 47 | self.fit_options = {} |
---|
| 48 | # Smearing options - tab #3 |
---|
[6ff2eb3] | 49 | # Should this be just part of self.fit_options? |
---|
[f7f5796] | 50 | self.smearing_options = {} |
---|
| 51 | |
---|
[6ff2eb3] | 52 | # Polydispersity - tab #4 |
---|
| 53 | #self.poly |
---|
| 54 | |
---|
| 55 | # Magnetism - tab #5 |
---|
| 56 | #self.magnetism |
---|
| 57 | |
---|
| 58 | # Algorithm |
---|
| 59 | self.algorithm = None |
---|
| 60 | self.algorithm_options = {} |
---|
| 61 | |
---|
[672b8ab] | 62 | def save(self): |
---|
| 63 | """ |
---|
| 64 | Serialize the current state |
---|
| 65 | """ |
---|
| 66 | pass |
---|
| 67 | |
---|
| 68 | def load(self, location): |
---|
| 69 | """ |
---|
| 70 | Retrieve serialized state from specified location |
---|
| 71 | """ |
---|
| 72 | pass |
---|
| 73 | |
---|
| 74 | def saveAsXML(self): |
---|
| 75 | """ |
---|
| 76 | Serialize the current state |
---|
| 77 | """ |
---|
| 78 | # Connect to PageState.to_xml(), which serializes |
---|
| 79 | # to the existing XML with file I(Q) |
---|
| 80 | pass |
---|
| 81 | |
---|
Note: See
TracBrowser
for help on using the repository browser.