Destination parameter flags for all functions which produce default output waves

An example is imagethreshold, which produces M_imagethresh. This output wave has to be declared every time, it would simplify things if the /D=(wavename) flag could be used here, especially if you dont want to rename M_imagethresh all the time.

Also, and I suspect there is some deep-seated functionality issue here, I don't understand why I have to declare this output wave every time after I call the function.

Any other wave, you declare it once, and if you change it somehow, Igor has no problem. With M_imagethresh, Igor somehow forgets that this wave got changed and will continue using the old version unless you re-declare it after the change. That seems very inconsistent and confusing to me...
daggaz wrote:
An example is imagethreshold, which produces M_imagethresh. This output wave has to be declared every time, it would simplify things if the /D=(wavename) flag could be used here, especially if you dont want to rename M_imagethresh all the time..


I agree that, ideally, any operation that creates an output wave should let you specify its name. More recent operations do this and we have retrofitted some older operations to support it also.

Quote:

Any other wave, you declare it once, and if you change it somehow, Igor has no problem. With M_imagethresh, Igor somehow forgets that this wave got changed and will continue using the old version unless you re-declare it after the change. That seems very inconsistent and confusing to me...


You always have to create a wave reference AFTER the wave has been created.

It's important to understand that a wave declaration has both a compile-time behavior (telling Igor that the symbol references a wave as opposed to a variable or data folder) and a runtime behavior (telling Igor the specific wave that the wave reference should point to). For the runtime behavior to work the wave declaration must occur after the wave has been created.

Under limited circumstances Igor automatically creates a wave reference.

It's worthwhile to carefully reread this help topic. Then things should make more sense. It takes a bit of iteration through reading and programming before it all sinks in.
DisplayHelpTopic "Wave References"