Changeset df9e0fc in sasview for fittingview/src/sans/perspectives/fitting
- Timestamp:
- Sep 29, 2011 3:36:29 PM (13 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:
- e9d9081
- Parents:
- 63a2371
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/fitting.py
r62258ee rdf9e0fc 1542 1542 instead of calling expansive CalcChisqr in guithread 1543 1543 """ 1544 data_copy = deepcopy(data) 1545 1544 data_copy = deepcopy(data) 1546 1545 # default chisqr 1547 1546 chisqr = None 1548 1547 #to compute chisq make sure data has valid data 1549 1548 # return None if data == None 1550 if not check_data_validity(data_copy) :1549 if not check_data_validity(data_copy) or data_copy == None: 1551 1550 return chisqr 1552 1551 1553 1552 # Get data: data I, theory I, and data dI in order 1554 1553 if data_copy.__class__.__name__ == "Data2D": … … 1562 1561 fn = data_copy.data[index] 1563 1562 theory_data = self.page_finder[page_id].get_theory_data(fid=data_copy.id) 1563 if theory_data== None: 1564 return chisqr 1564 1565 gn = theory_data.data[index] 1565 1566 en = data_copy.err_data[index] … … 1579 1580 fn = data_copy.y[index] 1580 1581 theory_data = self.page_finder[page_id].get_theory_data(fid=data_copy.id) 1582 if theory_data== None: 1583 return chisqr 1581 1584 gn = theory_data.y 1582 1585 en = dy[index] 1586 1583 1587 # residual 1584 1588 res = (fn - gn) / en
Note: See TracChangeset
for help on using the changeset viewer.