DSPPeriodogram ignores range flag if segment flag is used

The built-in Igor function DSPPeriodogram has what seems to me to be a bug. I'm using Igor Pro 6.2.2.2 on Win XP.

The syntax of the function is
DSPPeriodogram [/dB /dBR=ref /COHR /DLSG /NODC=val /NOR=value /Q /SEGN={ptsPerSegment , overlapPts } /R=[start, end ] /R=(startX, endX) /WIN=windowKind /Z ] srcWave [, srcWave2 ]

The /R flag is a typical range flag, either by point number [] or by x-value (). If the /SEGN flag is not used, the function respects the range flag, and only operates on that part of the source wave.

However, if the /SEGN flag is used, then the entire source wave is used, regardless of the presence or contents of the /R range flag. I expected that the range flag would limit the operation to part of the source wave, if the /SEGN flag is used.

To reproduce:
•make/n=100001 aa
•dspperiodogram/SEGN={1024,0} aa
Evaluating the periodogram using 98 segments
•dspperiodogram/SEGN={1024,0}/R=[0,50001] aa
Evaluating the periodogram using 98 segments
•dspperiodogram/SEGN={1024,0}/R=[0,1] aa
Evaluating the periodogram using 98 segments
Hello Hiller,

This is not a bug; the /SEGN flag is intended to work on the full input so when you use it, the /R flag is ignored.

I'll make sure that this is stated explicitly in the documentation.

A.G.
WaveMetrics, Inc.
Respectfully, it seems to me more logical to have the DSPPeriodogram respect the range flag. There's certainly no advantage to ignoring the flag - if the user didn't want to use the whole range, he'd just leave it off. And there are times when it is useful. For example if I want the power spectral density of an audio signal over a certain time range, say over a particular passage. Otherwise I'd have to copy the section to a temporary wave to use this function.

Since the documentation at this point is ambiguous, you can choose which way to resolve this. And I'd humbly suggest that you add this capability for those who need it, and which doesn't affect other users.
Thanks for the feedback. I will add it to the list for IP7.

A.G.
WaveMetrics, Inc.
Update: This has been implemented and is available in the latest IP6 beta.

A.G.
WaveMetrics, Inc.
Igor wrote:
Update: This has been implemented and is available in the latest IP6 beta.


I'm confused - the current beta lists June 19 as the build date. Do you mean the latest Igor nightly build?
741 wrote:

I'm confused


The change, which has been requested by several customers has already been implemented and is available in the beta. Obviously it is also available in the nightly build. The OP reported using 6.2.2.2 so I think they would benefit more from the beta which is a complete package as opposed to updating only the application.

A.G.
WaveMetrics, Inc.