Changeset 5917637 in sasview for sanscalculator/src
- Timestamp:
- Jan 13, 2013 11:22:55 AM (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:
- 32aba6a
- Parents:
- 3657667
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sanscalculator/src/sans/calculator/sans_gen.py
r3657667 r5917637 295 295 raise ValueError, msg 296 296 297 def remove_null_points(self, remove=False ):297 def remove_null_points(self, remove=False, recenter=False): 298 298 """ 299 299 Removes any mx, my, and mz = 0 points … … 310 310 self.my = self.my[is_nonzero] 311 311 self.mz = self.mz[is_nonzero] 312 self.pos_x -= (min(self.pos_x) + max(self.pos_x)) / 2.0 313 self.pos_y -= (min(self.pos_y) + max(self.pos_y)) / 2.0 314 self.pos_z -= (min(self.pos_z) + max(self.pos_z)) / 2.0 312 if recenter: 313 self.pos_x -= (min(self.pos_x) + max(self.pos_x)) / 2.0 314 self.pos_y -= (min(self.pos_y) + max(self.pos_y)) / 2.0 315 self.pos_z -= (min(self.pos_z) + max(self.pos_z)) / 2.0 315 316 316 317 def get_magsld(self): … … 542 543 except: 543 544 pass 544 # print pix_symbol, pos_x545 pos_x -= (min(pos_x) + max(pos_x)) / 2.0546 pos_y -= (min(pos_y) + max(pos_y)) / 2.0547 pos_z -= (min(pos_z) + max(pos_z)) / 2.0545 #re-centering 546 #pos_x -= (min(pos_x) + max(pos_x)) / 2.0 547 #pos_y -= (min(pos_y) + max(pos_y)) / 2.0 548 #pos_z -= (min(pos_z) + max(pos_z)) / 2.0 548 549 549 550 output = MagSLD(pos_x, pos_y, pos_z, sld_n, sld_mx, sld_my, sld_mz) … … 645 646 # Skip non-data lines 646 647 pass 647 648 pos_x -= (min(pos_x) + max(pos_x)) / 2.0 649 pos_y -= (min(pos_y) + max(pos_y)) / 2.0 650 pos_z -= (min(pos_z) + max(pos_z)) / 2.0 648 649 # re-center 650 #pos_x -= (min(pos_x) + max(pos_x)) / 2.0 651 #pos_y -= (min(pos_y) + max(pos_y)) / 2.0 652 #pos_z -= (min(pos_z) + max(pos_z)) / 2.0 651 653 652 654 output = MagSLD(pos_x, pos_y, pos_z, sld_n,
Note: See TracChangeset
for help on using the changeset viewer.