Changeset 2365c0b in sasview
- Timestamp:
- Dec 29, 2011 6:57:07 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:
- 176fbf1
- Parents:
- aba60f4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
plottools/src/danse/common/plottools/PlotPanel.py
r2371363 r2365c0b 1600 1600 xunits = convertUnit(2,xunits) 1601 1601 self.graph._xaxis_transformed("%s^{2}" % xname, "%s" % xunits) 1602 if(self.xLabel == "x^(4)"): 1603 item.transformX(transform.toX4, transform.errToX4) 1604 xunits = convertUnit(4,xunits) 1605 self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits) 1602 1606 if(self.xLabel == "ln(x)"): 1603 1607 item.transformX(transform.toLogX,transform.errToLogX) -
plottools/src/danse/common/plottools/PropertyDialog.py
r82a54b8 r2365c0b 59 59 self.xvalue.Insert("x", 0) 60 60 self.xvalue.Insert("x^(2)", 1) 61 self.xvalue.Insert("ln(x)", 2) 62 self.xvalue.Insert("log10(x)", 3) 61 self.xvalue.Insert("x^(4)", 2) 62 self.xvalue.Insert("ln(x)", 3) 63 self.xvalue.Insert("log10(x)", 4) 63 64 64 65 # scale value for y -
plottools/src/danse/common/plottools/transform.py
r82a54b8 r2365c0b 49 49 else: 50 50 return math.sqrt(x) 51 51 52 def toX4(x, y=None): 53 """ 54 This function is used to load value on Plottable.View 55 56 Calculate x^(4) 57 58 :param x: float value 59 60 """ 61 return x * x * x * x 62 63 def fromX4(x, y=None): 64 """ 65 This function is used to load value on Plottable.View 66 Calculate square root of x 67 68 :param x: float value 69 70 """ 71 if not x >= 0 : 72 raise ValueError, "double square root of a negative value " 73 else: 74 return math.sqrt(math.sqrt(x)) 75 52 76 def toLogX(x, y=None): 53 77 """ … … 163 187 msg = "transform.errFromX2: can't compute error of negative x" 164 188 raise ValueError, msg 165 189 190 def errToX4(x, y=None, dx=None, dy=None): 191 """ 192 calculate error of x**4 193 194 :param x: float value 195 :param dx: float value 196 197 """ 198 if dx != None: 199 err = 4 * math.pow(x, 3) * dx 200 return math.fabs(err) 201 else: 202 return 0.0 203 204 def errFromX4(x, y=None, dx=None, dy=None): 205 """ 206 calculate error of x^1/4 207 208 :param x: float value 209 :param dx: float value 210 211 """ 212 if (x > 0): 213 if(dx != None): 214 err = dx/(4 * math.pow(x, 3/4)) 215 else: 216 err = 0 217 return math.fabs(err) 218 else: 219 msg = "transform.errFromX4: can't compute error of negative x" 220 raise ValueError, msg 221 166 222 def errToLog10X(x, y=None, dx=None, dy=None): 167 223 """ -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/plotting.py
r805e2e7 r2365c0b 220 220 flag_x = (panel.graph.prop["xunit"] is not None) and \ 221 221 (panel.graph.prop["xunit"].strip() != "") and\ 222 (x_unit != panel.graph.prop["xunit"]) 222 (x_unit != panel.graph.prop["xunit"]) and False 223 223 flag_y = (panel.graph.prop["yunit"] is not None) and \ 224 224 (panel.graph.prop["yunit"].strip() != "") and\ 225 (y_unit != panel.graph.prop["yunit"]) 225 (y_unit != panel.graph.prop["yunit"]) and False 226 226 if (flag_x and flag_y): 227 227 msg = "Cannot add %s" % str(data.name)
Note: See TracChangeset
for help on using the changeset viewer.