Changeset afd45674 in sasview for sanscalculator/src
- Timestamp:
- Jan 18, 2013 6:05:38 PM (12 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- afcb052
- Parents:
- 1c6c1b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sanscalculator/src/sans/calculator/sans_gen.py
rcd89c6f rafd45674 61 61 self.params['background'] = 0.0 62 62 self.params['solvent_SLD'] = 0.0 63 self.params['total_volume'] = 1.0 63 64 self.params['Up_frac_in'] = 1.0 64 65 self.params['Up_frac_out'] = 1.0 … … 70 71 self.details['background'] = ['[1/cm]', None, None] 71 72 self.details['solvent_SLD'] = ['1/A^(2)', None, None] 73 self.details['total_volume'] = ['A^(3)', None, None] 72 74 self.details['Up_frac_in'] = ['[u/(u+d)]', None, None] 73 75 self.details['Up_frac_out'] = ['[u/(u+d)]', None, None] … … 113 115 114 116 mod.genicom(model, len_q, x, y, i) 115 return self.params['scale'] * i + self.params['background'] 117 vol_correction = self.data_total_volume / self.params['total_volume'] 118 return self.params['scale'] * vol_correction * i + \ 119 self.params['background'] 116 120 117 121 def set_sld_data(self, sld_data=None): … … 129 133 self.data_mz = sld_data.sld_mz 130 134 self.data_vol = sld_data.vol_pix 135 self.data_total_volume = sum(sld_data.vol_pix) 136 self.params['total_volume'] = sum(sld_data.vol_pix) 131 137 132 138 def getProfile(self):
Note: See TracChangeset
for help on using the changeset viewer.