# Changeset db24ec1 in sasview

Ignore:
Timestamp:
Oct 3, 2018 8:21:44 AM (5 months ago)
Branches:
master, Prep4Release4_2_1, py37-all, py37-sascalc, py37-sasgui, pytest, setup_clean_up, simplify-c-build, ticket-1094-headless, ticket-1205-fit-weights, ticket-1220, unittest-saveload
Children:
ffbf35ee, e4e9162, cf1be88, b9cc210, 5ae083b
Parents:
9849f8a (diff), aba4559 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Tim Snow <tim.snow@…> (10/03/18 08:21:44)
git-committer:
Message:

Merge pull request #185 from SasView?/ticket-1183-parameter-reset

Ticket 1183: Don't clear parameters on structure box content reset

Files:
14 edited

Unmodified
Removed
• ## src/sas/sasgui/perspectives/fitting/fitpage.py

 rdabcaf7 fitting  a model and one data """ from __future__ import print_function import sys import wx if saved_pars: self.get_paste_params(saved_pars) # Make sure the model parameters correspond to the fit parameters self._update_paramv_on_fit() if event is not None:
• ## src/sas/sasgui/perspectives/fitting/fitting.py

 raf7d2e5 Update custom model list in the fitpage combo box """ custom_model = 'Plugin Models' try: # Update edit menus if not new_pmodel_list: return # Set the new plugin model list for all fit pages # Redraws to a page not in focus are showing up as if they are # in the current page tab. current_page_index = self.fit_panel.GetSelection() current_page = self.fit_panel.GetCurrentPage() last_drawn_page = current_page # Set the new plugin model list for all fit pages; anticipating # categories, the updated plugin may be in either the form factor # or the structure factor combo boxes for uid, page in self.fit_panel.opened_pages.iteritems(): if hasattr(page, "formfactorbox"): page.model_list_box = new_pmodel_list mod_cat = page.categorybox.GetStringSelection() if mod_cat == custom_model: box = page.formfactorbox model_name = box.GetValue() model = (box.GetClientData(box.GetCurrentSelection()) if model_name else None) page._show_combox_helper() new_index = box.FindString(model_name) new_model = (box.GetClientData(new_index) if new_index >= 0 else None) if new_index >= 0: box.SetStringSelection(model_name) else: box.SetStringSelection('') if model and new_model != model: page._on_select_model(keep_pars=True) if hasattr(page, "structurebox"): selected_name = page.structurebox.GetStringSelection() page.structurebox.Clear() page.initialize_combox() index = page.structurebox.FindString(selected_name) if index == -1: index = 0 page.structurebox.SetSelection(index) page._on_select_model() pbox = getattr(page, "formfactorbox", None) sbox = getattr(page, "structurebox", None) if pbox is None: continue # Set the new model list for the page page.model_list_box = new_pmodel_list # Grab names of the P and S models from the page.  Need to do # this before resetting the form factor box since that clears # the structure factor box. old_struct = old_form = None form_name = pbox.GetValue() struct_name = sbox.GetStringSelection() if form_name: old_form = pbox.GetClientData(pbox.GetCurrentSelection()) if struct_name: old_struct = sbox.GetClientData(sbox.GetCurrentSelection()) # Reset form factor combo box.  We are doing this for all # categories not just plugins since eventually the category # manager will allow plugin models to be anywhere. page._show_combox_helper() form_index = pbox.FindString(form_name) pbox.SetSelection(form_index) new_form = (pbox.GetClientData(form_index) if form_index != wx.NOT_FOUND else None) #print("form: %r"%form_name, old_form, new_form) # Reset structure factor combo box; even if the model list # hasn't changed, the model may have.  Show the structure # factor combobox if the selected model is a form factor. sbox.Clear() page.initialize_combox() if new_form is not None and getattr(new_form, 'is_form_factor', False): sbox.Show() sbox.Enable() page.text2.Show() page.text2.Enable() struct_index = sbox.FindString(struct_name) sbox.SetSelection(struct_index) new_struct = (sbox.GetClientData(struct_index) if struct_index != wx.NOT_FOUND else None) #print("struct: %r"%struct_name, old_struct, new_struct) # Update the page if P or S has changed if old_form != new_form or old_struct != new_struct: #print("triggering model update") page._on_select_model(keep_pars=True) last_drawn_page = page # If last drawn is not the current, then switch the current to the # last drawn then switch back.  Very ugly. if last_drawn_page != current_page: for page_index in range(self.fit_panel.PageCount): if self.fit_panel.GetPage(page_index) == last_drawn_page: self.fit_panel.SetSelection(page_index) break self.fit_panel.SetSelection(current_page_index) except Exception: logger.error("update_custom_combo: %s", sys.exc_value)

 r0347c89 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Also see https://github.com/SasView/sasview/blob/master/installers/license.txt

• ## docs/sphinx-docs/source/user/tutorial.rst

 r893d852 :download:Simultaneous 1D Fitting in Sasview  :download:Correlation Function Analysis in SasView

 rd3114cc SasView is free to download and use, including for commercial purposes. © 2009-2018 UMD, UTK, NIST, ORNL, ISIS, ESS, ANSTO, ILL, TUD, DLS © 2009-2018 UMD, UTK, NIST, ORNL, ISIS, ESS, ANSTO, ILL, TUD, DLS, BAM
• ## src/sas/sascalc/fit/pagestate.py

 r59873e1 if len(value.strip()) == 0: continue title = value + " [" + repo_time + "]" title = (value + " [" + repo_time + "] [SasView v" + SASVIEW_VERSION + "]") title_name = HEADER % title elif name == "data":

• ## src/sas/sasgui/guiframe/config.py

 r8ac05a5 '''M. Doucet et al. SasView Version 4.1.2, Zenodo, 10.5281/zenodo.825675''' _acknowledgement =  \ '''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: http://www.sasview.org/contact.html '''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, BAM and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: http://www.sasview.org/contact.html ''' _tudelft_url = "http://www.tnw.tudelft.nl/en/cooperation/facilities/reactor-instituut-delft/" _dls_url = "http://www.diamond.ac.uk/" _bam_url = "http://www.bam.de/" _danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" _inst_url = "http://www.utk.edu" _corner_image = os.path.join(icon_path, "angles_flat.png") _welcome_image = os.path.join(icon_path, "SVwelcome.png") _copyright = "(c) 2009 - 2018, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, and DLS" _copyright = "(c) 2009 - 2018, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS and BAM" marketplace_url = "http://marketplace.sasview.org/"
 r501712f Both analyses are performed in 3 stages: *  Extrapolation of the scattering curve to :math:Q = 0 and toward :math:Q = \infty *  Extrapolation of the scattering curve to :math:q = 0 and toward :math:q = \infty *  Smoothed merging of the two extrapolations into the original data *  Fourier / Hilbert Transform of the smoothed data to give the correlation ------------- To :math:Q = 0 To :math:q = 0 ................ the impact on any extrapolated parameters will be least significant. To :math:Q = \infty To :math:q = \infty ..................... - do they smoothly curve onto the ordinate at x = 0? (if not check the value of :math:\sigma is sensible) - are there ripples at x values corresponding to (2 :math:pi over) the two - are there ripples at x values corresponding to (2 :math:\pi over) the two q values at which the extrapolated and experimental data are merged? - are there any artefacts at x values corresponding to 2 :math:pi / q\ :sub:max in - are there any artefacts at x values corresponding to 2 :math:\pi / q\ :sub:max in the experimental data? - and lastly, do the significant features/peaks in the correlation functions -q^{4} I(q) The IDF is proportional to the second derivative of Î\ :sub:1\ (x). The IDF is proportional to the second derivative of Î\ :sub:1\ (x) and represents a superposition of thickness distributions from all the contributing lamellae. Hilbert *   Local Crystallinity :math:= L_c/L_p .. warning:: If the sample does not possess lamellar morphology then "Compute Parameters" will return garbage! Volume Fraction Profile ....................... The reader is directed to the references for information on these parameters. References Once the Q ranges have been set, click the "Calculate Bg" button to determine the background level. Alternatively, enter your own value into the box. If the box turns yellow this indicates that background subtraction has created some negative intensities. yellow this indicates that background subtraction has created some negative intensities. This may still be fine provided the peak intensity is very much greater than the background level. The important point is that the extrapolated dataset must approach zero at high-q. Now click the "Extrapolate" button to extrapolate the data. The graph window will update .. note:: This help document was last changed by Steve King, 26Sep2017 This help document was last changed by Steve King, 28Sep2017