
Sine waves with proper scaling?

mkap
Hi folks! I'm trying to figure out how to best draw sine waves in Igor. I can set up and graph sine waves......but I can't figure out how to make the time axis make sense. How would I set up the scaling so that I can graph 50-1000 Hz sine waves and have the x axis in seconds?
Thanks for any clues! I feel like I must be failing to grasp something obvious here.
OK, I think I figgered it out. I set up a wave with 1000 points for each second, and used 1/500*PI as the scaling factor. This means that wave =sin PI*x is properly scaled. I'll set up another version with more points per second I guess.
July 18, 2025 at 03:36 pm - Permalink
Since you seem to have figured out your issue this may not be necessary, but maybe you want to have a look at setting up a proper time axis:
DisplayHelpTopic "Date/Time Axes"
July 19, 2025 at 05:35 am - Permalink
Thanks - I'm going to definitely check that out. As it turns out, my declaration of victory was premature - my solution above was totally whacky. I woke up the next morning and realized that I was making this way too complicated. No reason to do anything with PI in the scaling factor! (Was I drunk? Stoned? Both? And also tired? And maybe stupid on top of all of the above?)
Seriously, I don't know what I was thinking. Time is still time, after all.
July 19, 2025 at 08:24 am - Permalink
Right- time is time. If you want 1000 points spanning one second, and then fill it with a sine wave with a frequency of 1 second, do this:
The Getting Started help has a nice description of how the X scaling works. Plus, you can read about wave assignments and all the wonderful things you can do: DisplayHelpTopic "Waveform Arithmetic and Assignment"
Copy that Igor command and paste it into the command line.
July 21, 2025 at 09:29 am - Permalink