Changeset 882cfec in sasview for src/sas/sasgui/perspectives
- Timestamp:
- Nov 28, 2017 7:56:33 AM (7 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b6b81a3, 19b5c886, fb7c816, 814ee32
- Parents:
- 45bfe3f1 (diff), c926a97 (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:
- Paul Kienzle <pkienzle@…> (11/28/17 07:56:33)
- git-committer:
- GitHub <noreply@…> (11/28/17 07:56:33)
- Location:
- src/sas/sasgui/perspectives
- Files:
-
- 11 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/media/fitting.rst
r3bd677b rc926a97 18 18 19 19 Polarisation/Magnetic Scattering <magnetism/magnetism> 20 21 Oriented Particles <orientation/orientation> 20 22 21 23 Information on the SasView Optimisers <optimizer> -
src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py
ra1b8fee r20fa5fe 113 113 def compute(self): 114 114 """ 115 ex cuting computation115 executing computation 116 116 """ 117 117 #elapsed = time.time() - self.starttime -
src/sas/sasgui/perspectives/calculator/media/sas_calculator_help.rst
r5ed76f8 r1b67f3e 26 26 intensity from the particle is 27 27 28 .. image:: gen_i.png 28 .. math:: 29 30 I(\vec Q) = \frac{1}{V}\left| 31 \sum_j^N v_j \beta_j \exp(i\vec Q \cdot \vec r_j)\right|^2 29 32 30 33 Equation 1. … … 46 49 atomic structure (such as taken from a PDB file) to get the right normalization. 47 50 48 *NOTE! $\beta_j$displayed in the GUI may be incorrect but this will not51 *NOTE!* $\beta_j$ *displayed in the GUI may be incorrect but this will not 49 52 affect the scattering computation if the correction of the total volume V is made.* 50 53 … … 56 59 ^^^^^^^^^^^^^^^^^^^ 57 60 58 For magnetic scattering, only the magnetization component, $ M_\perp$,59 perpendicular to the scattering vector $ Q$ contributes to the magnetic61 For magnetic scattering, only the magnetization component, $\mathbf{M}_\perp$, 62 perpendicular to the scattering vector $\vec Q$ contributes to the magnetic 60 63 scattering length. 61 64 … … 64 67 The magnetic scattering length density is then 65 68 66 .. image:: dm_eq.png 69 .. math:: 70 71 \beta_M = \frac{\gamma r_0}{2 \mu_B}\sigma \cdot \mathbf{M}_\perp 72 = D_M\sigma \cdot \mathbf{M}_\perp 67 73 68 74 where the gyromagnetic ratio is $\gamma = -1.913$, $\mu_B$ is the Bohr … … 81 87 .. image:: gen_mag_pic.png 82 88 83 Now let us assume that the angles of the *Q* vector and the spin-axis (x')84 to the x-axis are $\phi$ and $\theta_\text{up}$ respectively (see above). Then,89 Now let us assume that the angles of the $\vec Q$ vector and the spin-axis ($x'$) 90 to the $x$-axis are $\phi$ and $\theta_\text{up}$ respectively (see above). Then, 85 91 depending upon the polarization (spin) state of neutrons, the scattering 86 92 length densities, including the nuclear scattering length density ($\beta_N$) … … 89 95 * for non-spin-flips 90 96 91 .. image:: sld1.png 97 .. math:: 98 \beta_{\pm\pm} = \beta_N \mp D_M M_{\perp x'} 92 99 93 100 * for spin-flips 94 101 95 .. image:: sld2.png 102 .. math:: 103 \beta_{\pm\mp} = - D_M(M_{\perp y'} \pm i M_{\perp z'}) 96 104 97 105 where 98 106 99 .. image:: mxp.png107 .. math:: 100 108 101 .. image:: myp.png 109 M_{\perp x'} &= M_{0q_x}\cos\theta_\text{up} + M_{0q_y}\sin\theta_\text{up} \\ 110 M_{\perp y'} &= M_{0q_y}\cos\theta_\text{up} - M_{0q_x}\sin\theta_\text{up} \\ 111 M_{\perp z'} &= M_{0z} \\ 112 M_{0q_x} &= (M_{0x}\cos\phi - M_{0y}\sin\phi)\cos\phi \\ 113 M_{0q_y} &= (M_{0y}\sin\phi - M_{0y}\cos\phi)\sin\phi 102 114 103 .. image:: mzp.png 104 105 .. image:: mqx.png 106 107 .. image:: mqy.png 108 109 Here the $M0_x$, $M0_y$ and $M0_z$ are the $x$, $y$ and $z$ 110 components of the magnetisation vector in the laboratory $xyz$ frame. 115 Here the $M_{0x}$, $M_{0y}$ and $M_{0z}$ are 116 the $x$, $y$ and $z$ components of the magnetisation vector in the 117 laboratory $x$-$y$-$z$ frame. 111 118 112 119 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 148 155 uses the Debye equation below providing a 1D output 149 156 150 .. image:: gen_debye_eq.png 157 .. math:: 158 159 I(|\vec Q|) = \frac{1}{V}\sum_j^N v_j\beta_j \sum_k^N v_k \beta_k 160 \frac{\sin(|\vec Q||\vec r_j - \vec r_k|)}{|\vec Q||\vec r_j - \vec r_k|} 151 161 152 162 where $v_j \beta_j \equiv b_j$ is the scattering -
src/sas/sasgui/perspectives/calculator/model_editor.py
r69363c7 r2469df7 338 338 list_fnames = os.listdir(self.plugin_dir) 339 339 # fake existing regular model name list 340 m_list = [model .name+ ".py" for model in self.model_list]340 m_list = [model + ".py" for model in self.model_list] 341 341 list_fnames.append(m_list) 342 342 if t_fname in list_fnames and title != mname: … … 344 344 msg = "Name exists already." 345 345 346 if self.good_name == False:346 if not self.good_name: 347 347 self.name_tcl.SetBackgroundColour('pink') 348 348 info = 'Error' -
src/sas/sasgui/perspectives/calculator/resolcal_thread.py
r959eb01 r20fa5fe 44 44 def compute(self): 45 45 """ 46 ex cuting computation46 executing computation 47 47 """ 48 48 self.image = map(self.func, self.qx, self.qy, -
src/sas/sasgui/perspectives/fitting/fitproblem.py
r251ef684 r20fa5fe 1 1 """ 2 2 Inferface containing information to store data, model, range of data, etc... 3 and retr eive this information. This is an inferface3 and retrieve this information. This is an inferface 4 4 for a fitProblem i.e relationship between data and model. 5 5 """ … … 56 56 """ 57 57 :param flag: bool.When flag is 1 get the computer smear value. When 58 flag is 0 i ngore smear value.58 flag is 0 ignore smear value. 59 59 """ 60 60 self.smearer_enable = flag … … 305 305 """ 306 306 :param flag: bool.When flag is 1 get the computer smear value. When 307 flag is 0 i ngore smear value.307 flag is 0 ignore smear value. 308 308 """ 309 309 self._smear_on = flag -
src/sas/sasgui/perspectives/fitting/fitting.py
r9706d88 r20fa5fe 763 763 the current page and set value. 764 764 :param value: integer 0 or 1 765 :param uid: the id related to a page conta ning fitting information765 :param uid: the id related to a page containing fitting information 766 766 """ 767 767 if uid in self.page_finder.keys(): … … 778 778 Used by simfitpage.py to reset a parameter given the string constrainst. 779 779 780 :param modelname: the name o tthe model for with the parameter780 :param modelname: the name of the model for with the parameter 781 781 has to reset 782 782 :param value: can be a string in this case. 783 :param names: the param ter name783 :param names: the parameter name 784 784 """ 785 785 sim_page_id = self.sim_page.uid … … 797 797 name into model name and parameter name example: :: 798 798 799 param aterset (item) = M1.A799 parameterset (item) = M1.A 800 800 Will return model_name = M1 , parameter name = A 801 801 … … 1117 1117 def store_data(self, uid, data_list=None, caption=None): 1118 1118 """ 1119 Rec ieve a list of data and store them ans well as a caption of1119 Receive a list of data and store them ans well as a caption of 1120 1120 the fit page where they come from. 1121 1121 :param uid: if related to a fit page … … 1196 1196 for a given interactor. 1197 1197 1198 :param event: contains type of slicer , param aters for updating1198 :param event: contains type of slicer , parameters for updating 1199 1199 the panel and panel_name to find the slicer 's panel concerned. 1200 1200 """ -
src/sas/sasgui/perspectives/fitting/fitting_widgets.py
r959eb01 r20fa5fe 64 64 selection_sizer.Add(self.data_2d_selected, (iy, ix), 65 65 (1, 1), wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 66 #contruction the sizer conta ning button66 #contruction the sizer containing button 67 67 button_sizer.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 68 68 button_sizer.Add(button_cancel, 0, -
src/sas/sasgui/perspectives/fitting/gpu_options.py
r3bd677b r20fa5fe 88 88 self.option_button = {} 89 89 self.buttons = [] 90 #Check if SAS_OPENCL is already set as enviro mentalvariable90 #Check if SAS_OPENCL is already set as environment variable 91 91 self.sas_opencl = os.environ.get("SAS_OPENCL", "") 92 92 -
src/sas/sasgui/perspectives/fitting/simfitpage.py
r0a3c740 r20fa5fe 976 976 param_cbox = self.constraints_list[-1].param_cbox 977 977 param_cbox.Clear() 978 # insert only fittable param aters978 # insert only fittable parameters 979 979 for param in param_list: 980 980 param_cbox.Append(str(param), model) -
src/sas/sasgui/perspectives/invariant/invariant_details.py
r959eb01 r20fa5fe 422 422 except: 423 423 scale = RECTANGLE_SCALE 424 self.warning_msg += "Rec ieve an invalid scale for %s\n"424 self.warning_msg += "Receive an invalid scale for %s\n" 425 425 self.warning_msg += "check this value : %s\n" % str(percentage) 426 426 return scale -
src/sas/sasgui/perspectives/invariant/invariant_panel.py
r7432acb r2469df7 707 707 708 708 # reset power_out to default to get ready for another '_on_text' 709 if self.is_power_out == True:709 if self.is_power_out: 710 710 self.state.container = copy.deepcopy(self.inv_container) 711 711 self.state.timestamp = self._get_time_stamp() -
src/sas/sasgui/perspectives/invariant/invariant_state.py
r1fa4f736 r2469df7 655 655 : return: None 656 656 """ 657 if self.cansas == True:657 if self.cansas: 658 658 return self._read_cansas(path) 659 659 else: … … 763 763 """ 764 764 # Sanity check 765 if self.cansas == True:765 if self.cansas: 766 766 doc = self.write_toXML(datainfo, invstate) 767 767 # Write the XML document -
src/sas/sasgui/perspectives/pr/explore_dialog.py
r959eb01 r20fa5fe 93 93 94 94 :TODO: Would be nice to add printing and log/linear scales. 95 The current ver ison of plottools no longer plays well with95 The current version of plottools no longer plays well with 96 96 plots outside of guiframe. Guiframe team needs to fix this. 97 97 """ -
src/sas/sasgui/perspectives/pr/inversion_state.py
r1fa4f736 r2469df7 389 389 390 390 """ 391 if self.cansas == True:391 if self.cansas: 392 392 return self._read_cansas(path) 393 393 else: … … 505 505 """ 506 506 # Sanity check 507 if self.cansas == True:507 if self.cansas: 508 508 doc = self.write_toXML(datainfo, prstate) 509 509 # Write the XML document -
src/sas/sasgui/perspectives/pr/pr.py
rcb62bd5 r2469df7 407 407 y[i] = value 408 408 409 if self._normalize_output == True:409 if self._normalize_output: 410 410 y = y / total 411 411 dy = dy / total 412 elif self._scale_output_unity == True:412 elif self._scale_output_unity: 413 413 y = y / pmax 414 414 dy = dy / pmax … … 544 544 lines = buff.split('\n') 545 545 for line in lines: 546 if data_started == True:546 if data_started: 547 547 try: 548 548 toks = line.split()
Note: See TracChangeset
for help on using the changeset viewer.