Changeset 45ffa5e in sasview for DataLoader
- Timestamp:
- Feb 3, 2011 2:56:24 PM (14 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:
- eb8474f
- Parents:
- 13913ec
- Location:
- DataLoader
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/extensions/smearer.cpp
rcd2ced80 r45ffa5e 167 167 double q, q_min, q_max, q_0; 168 168 get_bin_range(i, &q, &q_min, &q_max); 169 169 170 bool last_qpoint = true; 170 171 // Find q[0] value to normalize the weight later, … … 179 180 // Calculate bin size of q_j 180 181 get_bin_range(j, &q_j, &q_low, &q_high); 182 181 183 // Check q_low that can not be negative. 182 184 if (q_low < 0.0){ … … 185 187 // default parameter values 186 188 (*weights)[i*nbins+j] = 0.0; 189 // protect for negative q 190 if (q <= 0.0 || q_j <= 0.0){ 191 continue; 192 } 187 193 double shift_w = 0.0; 188 194 // Condition: zero slit smear. -
DataLoader/qsmearing.py
rd5751ac r45ffa5e 192 192 temp_last = last_bin 193 193 #iq_in_temp = iq_in 194 194 195 195 # Sanity check 196 196 if len(iq_in_temp) != self.nbins: … … 437 437 try: 438 438 offset = 3.0 * max(self.width) 439 _qmin_unsmeared = max([self.min, q_min - offset])440 _qmax_unsmeared = min([self.max, q_max + offset])439 _qmin_unsmeared = self.min 440 _qmax_unsmeared = self.max 441 441 except: 442 442 logging.error("_QSmearer.get_bin_range: %s" % sys.exc_value) … … 564 564 565 565 # nbins corrections due to the negative q value 566 nbins_low = nbins_low - len(data_x_ext[data_x_ext< 0])566 nbins_low = nbins_low - len(data_x_ext[data_x_ext<=0]) 567 567 return nbins_low, nbins_high, \ 568 568 new_width[data_x_ext>0], data_x_ext[data_x_ext>0]
Note: See TracChangeset
for help on using the changeset viewer.