- Timestamp:
- Jan 3, 2012 8:15:48 AM (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:
- e38e335
- Parents:
- c668b1b
- Location:
- plottools/src/danse/common/plottools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
plottools/src/danse/common/plottools/PlotPanel.py
r2365c0b r8d27cac 1611 1611 _xscale = 'log' 1612 1612 self.graph._xaxis_transformed("%s" % xname, "%s" % xunits) 1613 if(self.xLabel == "log10(x^(4))"): 1614 item.transformX(transform.toX4, transform.errToX4) 1615 xunits = convertUnit(4,xunits) 1616 self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits) 1617 _xscale = 'log' 1613 1618 if(self.yLabel == "ln(y)"): 1614 1619 item.transformY(transform.toLogX, transform.errToLogX) … … 1629 1634 yunits = convertUnit(-1, yunits) 1630 1635 self.graph._yaxis_transformed("1/%s" % yname, "%s" % yunits) 1636 if(self.yLabel == "y*x^(4)"): 1637 item.transformY(transform.toYX4, transform.errToYX4) 1638 xunits = convertUnit(4, xunits) 1639 self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname,xname), 1640 "%s%s" % (yunits,xunits)) 1631 1641 if(self.yLabel == "1/sqrt(y)"): 1632 1642 item.transformY(transform.toOneOverSqrtX, … … 1647 1657 xunits = convertUnit(4, xunits) 1648 1658 self.graph._yaxis_transformed("\ln (%s \ \ %s^{4})" % (yname,xname), 1659 "%s%s" % (yunits,xunits)) 1660 if(self.yLabel == "log10(y*x^(4))"): 1661 item.transformY(transform.toYX4, transform.errToYX4) 1662 xunits = convertUnit(4, xunits) 1663 _yscale = 'log' 1664 self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname,xname), 1649 1665 "%s%s" % (yunits,xunits)) 1650 1666 if(self.viewModel == "Guinier lny vs x^(2)"): -
plottools/src/danse/common/plottools/PropertyDialog.py
r2365c0b r8d27cac 62 62 self.xvalue.Insert("ln(x)", 3) 63 63 self.xvalue.Insert("log10(x)", 4) 64 self.xvalue.Insert("log10(x^(4))", 5) 64 65 65 66 # scale value for y … … 69 70 self.yvalue.Insert("ln(y)", 2) 70 71 self.yvalue.Insert("y^(2)", 3) 71 self.yvalue.Insert("1/sqrt(y)", 4) 72 self.yvalue.Insert("log10(y)", 5) 73 self.yvalue.Insert("ln(y*x)", 6) 74 self.yvalue.Insert("ln(y*x^(2))", 7) 75 self.yvalue.Insert("ln(y*x^(4))", 8) 72 self.yvalue.Insert("y*x^(4)", 4) 73 self.yvalue.Insert("1/sqrt(y)", 5) 74 self.yvalue.Insert("log10(y)", 6) 75 self.yvalue.Insert("ln(y*x)", 7) 76 self.yvalue.Insert("ln(y*x^(2))", 8) 77 self.yvalue.Insert("ln(y*x^(4))", 9) 78 self.yvalue.Insert("log10(y*x^(4))", 10) 76 79 # type of view or model used 77 80 self.view.SetValue("--") -
plottools/src/danse/common/plottools/transform.py
r2365c0b r8d27cac 118 118 else: 119 119 raise ValueError,"transform.toLogYX4: input error" 120 121 def toYX4(y, x): 122 """ 123 """ 124 return math.pow(x, 4) * y 120 125 121 126 def toLogXY(y, x): … … 360 365 return err 361 366 367 def errToYX4(x, y=None, dx=None, dy=None): 368 """ 369 error for (y*x^(4)) 370 371 :param x: float value 372 373 """ 374 # Check that the point on the graph is positive 375 # within errors 376 377 if dx == None: 378 dx = 0 379 if dy == None: 380 dy = 0 381 err = math.sqrt((dy * pow(x, 4))**2 + (4 * y * dx * math.pow(x, 3))**2) 382 return err 362 383
Note: See TracChangeset
for help on using the changeset viewer.