Fortran How to change data from linear scale to log scale

Click For Summary
The discussion focuses on converting laser intensity (IL) data from a linear scale to a logarithmic scale to analyze its relationship with growth rate (m). A participant initially plotted IL against m but found the output unacceptable, prompting a reevaluation of the scaling method. Clarification is sought on the mathematical operations required for converting IL values to a log scale, specifically how to represent values like 10^15 and 10^18 in a logarithmic format. Additionally, there is confusion regarding the differences between plotting intensity on a log scale versus using the natural logarithm, as well as the implementation of these plots in MATLAB. The conversation emphasizes the need for clear mathematical understanding and practical application of logarithmic scaling in data visualization.
Amany Gouda
Messages
29
Reaction score
0
I am trying to calculate and draw a relation between (IL) and the Growth rate (m).
I have used Il as range from 10^15 to 10^18 in the calculation and when I draw the relation (x-axis ) is Il and (y-axis ) is m. I converted the IL to be in log scale.
I noticed unacceptable output.
So, I am going to repeat the calculation again by by using IL in log scale.
is there any mathematical relation can be used to make this conversion for IL.
Thank you
 
Technology news on Phys.org
"IL?"
 
Bystander said:
"IL?"
IL: Laser intensity ranging from 10^15 to 10^18.
 
Amany Gouda said:
I am trying to calculate and draw a relation between (IL) and the Growth rate (m).
I have used Il as range from 10^15 to 10^18 in the calculation and when I draw the relation (x-axis ) is Il and (y-axis ) is m. I converted the IL to be in log scale.
I noticed unacceptable output.
So, I am going to repeat the calculation again by by using IL in log scale.
is there any mathematical relation can be used to make this conversion for IL.
As I understand it, you have a data set of unknown origin which is a collection of ordered pairs: (IL, m). You have plotted this (a scatter graph?) and obtained a plot that is "unacceptable" for some reason.

You now want to re-scale the x-axis on a log scale and you want to know a mathematical operation that can take an unscaled value for IL and convert it to a scaled value. So, for instance, 10^15 is represented as 15 and 10^18 is represented as 18.

What operations have you considered so far?
 
[I've put some of your words in boldface for emphasis.]
Amany Gouda said:
[...] I converted the IL to be in log scale.
I noticed unacceptable output.
So, I am going to repeat the calculation again by by using IL in log scale.

But you already converted IL to log scale? I think you should clarify this.
 
Hi all,
I have experimental data that obey mono- or biexponential behavior (without or with offset): I = I0*exp(-t/T2), I = I0*exp(-t/T2) + offset1, I = I1*exp(-t/T2_1)+I2*exp(-t/T2_2), I = I1*exp(-t/T2_1)+I2*exp(-t/T2_2) + offset2. I is intensity, t is time, T2, T2_1 and T2_2 are time constants. I1 and I2 reflect fractions of T2_1 and T2_2 components, respectively. I'd like to ask a question about plotting in semilog scale. What is the difference between plotting intensity on a log scale (and the horizontal axis is time) and plotting ln(intensity) vs time (ln - natural logarithm, or base "e" logarithm)? I don't understand the first one - plotting intensity on a log scale. I know that, for example, in Matlab there are functions loglog, semilogx, semilogy, but again, I don't understand, how they work. What mathematical formulas should I use to implement conversion from standard scale to semilogy scale (when y-axis is in log scale) if I want to do such conversion manually? Moreover, from the Matlab help for semilogy function: "semilogy(Y) creates a plot using a base 10 logarithmic scale for the y-axis and a linear scale for the x-axis". Why do they use base 10 logarithmic scale and not base "e" logarithmic scale? If I want to use semilogy function, but with "e" base logarithm (natural logarithm), how can I implement this, for example, in Matlab? On the other side, plotting ln(intensity) is clear, because in this case I just take natural logarithm of my original intensity values, and then plot these ln(intensity) vs time. I also found the site http://measurebiology.org/wiki/Understanding_log_plots, where topic is "Understanding log plots". On that site, authors show examples of plotting in log scale using Matlab. In the section "Linear vs. log scale", the authors wrote the following: "There are two ways to make a log-log plot in MATLAB. The first is to use the plot command to plot log(y) vs. log(x) on a linear scale.
plot( log10(x), log10(y))
Alternatively, you can use the loglog command to make a plot with log-scale axes:
loglog( x, y)"
Then they show corresponding graphs. These two plots look the same.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 0 ·
Replies
0
Views
625
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
7
Views
3K
  • · Replies 9 ·
Replies
9
Views
5K