07-24-2025 11:32 AM
Hello all.
I am sure this is probably a very basic question.
I am getting an array of length 1340- each value represents an intensity at a given pixel. Each pixel represents a wavelength in a y = mx + b form. So I initially had no problem using an intensity graph and setting the offset and multiplier within the graph's settings.
Now, however, I want to calculate the raman shift, which is more involved than the linear fit before:
I need to: create an array from 1 to 1340
Apply the y = mx + b to go from pixel length to wavelength
apply the above transformation (where lambda_ex is a constant) to each value.
Use these as an x axis to graph against my already acquired y-axis data.
Does anyone have any tips?
I did this but this results in an indicator array that I am not really able to further manipulate... Sorry, I am a noob to Labview
07-24-2025 11:53 AM
You do not need to scale the axes.
Use the LabVIEW Help -->Find Examples... drop down menu to open the LabVIEW Example Finder and search for the "XY Graph Data Types.vi" VI. It shows multiple ways to graph XY data.
07-24-2025 12:39 PM
Hi sean,
@seanMeredith wrote:
I need to: create an array from 1 to 1340
This loop will NOT create the desired array of 1…1340 as "i" starts with 0 and will have the value 1339 in the last iteration…
@seanMeredith wrote:
Apply the y = mx + b to go from pixel length to wavelength
I did this but this results in an indicator array that I am not really able to further manipulate... Sorry, I am a noob to Labview
Why don't you use basic math operations (like multiply and add) on your array? (Ever heard of "polymorphism" with respect to LabVIEW?)
What is "pixel length"?
07-24-2025 12:48 PM - edited 07-24-2025 12:50 PM
@seanMeredith wrote:
Hello all.
I am sure this is probably a very basic question.
I am getting an array of length 1340- each value represents an intensity at a given pixel. Each pixel represents a wavelength in a y = mx + b form. So I initially had no problem using an intensity graph and setting the offset and multiplier within the graph's settings.
Now, however, I want to calculate the raman shift, which is more involved than the linear fit before:
I need to: create an array from 1 to 1340
Apply the y = mx + b to go from pixel length to wavelength
apply the above transformation (where lambda_ex is a constant) to each value.
Use these as an x axis to graph against my already acquired y-axis data.
You seem to have a mix of several ambiguous problem and I cannot make sense of what you are saying.
Please attach a simple example containing typical data. Everybody here know how a FOR loop looks like, no need to attach silly pictures.