Scaling waves for long ranges on log axis plots
jjweimer
I am trying to generate a theoretical curve that extends over nine orders of magnitude in x. Features of interest appear at 10^9, 10^13, and 10^16 in the scale. Using linear scales on the data waves, I loose resolution on features at the low end. I suspect that I have one of two options:
* Create an explicit x wave that is scaled logarithmically.
* Increase the number of data points in my scaled wave to recover the resolution at the lowest end.
Independently, I might wish for a new built-in feature to SetScale that would scale the x by logarithmic steps increments. Perhaps the x-scaling could even be designated by a function call (much as the TransformAxis package creates a new scaling axis).
SetScale/F=ScaleFunction x, ...
Function ScaleFunction(p) : SetScale Function
variable p
return log(p)
end
Function ScaleFunction(p) : SetScale Function
variable p
return log(p)
end
Is this idea worth any thought?
I'd support the request for log wave scaling. However, I'm aware that this will cause a lot of trouble 'below the surface'.
HJ
April 9, 2018 at 01:55 pm - Permalink
SetScale/I x log(startx),log(endx),xwave
xwave = 10^x
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
April 9, 2018 at 04:13 pm - Permalink
variable ep0, tau, xx
variable rtnv
rtnv = ep0/((xx^2*tau^2) + 1)
return rtnv
end
Function Update_Waves()
wave xe, eprd
variable ep0, tau, dep
variable ynD
// molecular (dipolar)
ControlInfo/W=Inputs check_d
ynD = v_value
ControlInfo/W=Inputs slider_ep0
ep0 = v_value
ControlInfo/W=Inputs slider_tau
tau = 10^(v_value)
eprd = ynD*calc_epdipole(ep0, tau, xe[p])
...
end
The graph shows eprd vs xe (and others). I generated xe as
xe = 10^(8 + p*(2e-4))
over 45001 points.The inherent ability to set the scale on waves by a function would be cool.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
April 9, 2018 at 04:35 pm - Permalink