Ignore:
Timestamp:
Mar 26, 2017 9:33:16 PM (7 years ago)
Author:
andyfaff
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
ed2276f
Parents:
9146ed9
Message:

MAINT: import numpy as np

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/fitDialog.py

    rdd5bf63 r9a5097c  
    22from plottables import Theory1D 
    33import math 
    4 import numpy 
     4import numpy as np 
    55import fittings 
    66import transform 
     
    482482 
    483483                if self.xLabel.lower() == "log10(x)": 
    484                     tempdy = numpy.asarray(tempdy) 
     484                    tempdy = np.asarray(tempdy) 
    485485                    tempdy[tempdy == 0] = 1 
    486486                    chisqr, out, cov = fittings.sasfit(self.model, 
     
    491491                                                       math.log10(xmax)) 
    492492                else: 
    493                     tempdy = numpy.asarray(tempdy) 
     493                    tempdy = np.asarray(tempdy) 
    494494                    tempdy[tempdy == 0] = 1 
    495495                    chisqr, out, cov = fittings.sasfit(self.model, 
     
    572572        if self.rg_on: 
    573573            if self.Rg_tctr.IsShown(): 
    574                 rg = numpy.sqrt(-3 * float(cstA)) 
     574                rg = np.sqrt(-3 * float(cstA)) 
    575575                value = format_number(rg) 
    576576                self.Rg_tctr.SetValue(value) 
    577577                if self.I0_tctr.IsShown(): 
    578                     val = numpy.exp(cstB) 
     578                    val = np.exp(cstB) 
    579579                    self.I0_tctr.SetValue(format_number(val)) 
    580580            if self.Rgerr_tctr.IsShown(): 
     
    585585                self.Rgerr_tctr.SetValue(value) 
    586586                if self.I0err_tctr.IsShown(): 
    587                     val = numpy.abs(numpy.exp(cstB) * errB) 
     587                    val = np.abs(np.exp(cstB) * errB) 
    588588                    self.I0err_tctr.SetValue(format_number(val)) 
    589589            if self.Diameter_tctr.IsShown(): 
    590                 rg = numpy.sqrt(-2 * float(cstA)) 
    591                 _diam = 4 * numpy.sqrt(-float(cstA)) 
     590                rg = np.sqrt(-2 * float(cstA)) 
     591                _diam = 4 * np.sqrt(-float(cstA)) 
    592592                value = format_number(_diam) 
    593593                self.Diameter_tctr.SetValue(value) 
Note: See TracChangeset for help on using the changeset viewer.