How to display band structure?

Helo,

How to display band structure?
When I use the "display band structrue", the dialog often show me that " Could not find any definition of the curves value in the wave notes, have you set the current datafolder correctly?". I don't what's the problem about my data or the program. I have already had two files whthin one same experiment. One is ".asc" and the other is ".sp2".


Thanks,

haoyu
You must be using a procedure package prepared by an Igor user- we don't provide any such dialog. You will need to ask the author of that package how it should be used.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
johnweeks wrote:
You must be using a procedure package prepared by an Igor user- we don't provide any such dialog. You will need to ask the author of that package how it should be used.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com

Yes, I know I should ask the author of that package. How to find who is the author of that package may be a problem. Maybe you have other ways you can tell me.
Here is another question, when I input the commend "concatenate{wave1,wave2,wave3.......}, tripletwave", how can I input so many waves name, you know the dialog only permit about 400 characters. Is there some action or sentence can make a short for these waves like {wave1,wave2,wave3......wave1022,wave1023}, it will be ok perfect to run.

Thanks

haoyu
whaoyu wrote:
Yes, I know I should ask the author of that package. How to find who is the author of that package may be a problem. Maybe you have other ways you can tell me.


Where did you get the package ... from this site (IgorExchange) or elsewhere? Packages that are posted here have the author's link at the top of the page.

whaoyu wrote:
...Is there some action or sentence can make a short for these waves like {wave1,wave2,wave3......wave1022,wave1023}, it will be ok perfect to run.


You should use WaveListStr to hold the list of your wave names as follows ...

string WaveListStr ="wave1;wave2;wave3;....;waveN;"
concatenate WaveListStr, tripletwave


--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
jjweimer wrote:
whaoyu wrote:
Yes, I know I should ask the author of that package. How to find who is the author of that package may be a problem. Maybe you have other ways you can tell me.


Where did you get the package ... from this site (IgorExchange) or elsewhere? Packages that are posted here have the author's link at the top of the page.

whaoyu wrote:
...Is there some action or sentence can make a short for these waves like {wave1,wave2,wave3......wave1022,wave1023}, it will be ok perfect to run.


You should use WaveListStr to hold the list of your wave names as follows ...

string WaveListStr ="wave1;wave2;wave3;....;waveN;"
concatenate WaveListStr, tripletwave


--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville



Thank you! I am a new user of Igor and have a try.
string WaveListStr ="wave1;wave2;wave3;....;waveN;"
concatenate WaveListStr, tripletwave


--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville[/quote]


When I use the sentence above, the program display the dialog "can't overwrite self."
What is the problem with the application or my sentence here?

Haoyu
whaoyu wrote:

string WaveListStr ="wave1;wave2;wave3;....;waveN;"
concatenate WaveListStr, tripletwave


When I use the sentence above, the program display the dialog "can't overwrite self."
What is the problem with the application or my sentence here?


I cannot be sure. My example is a generic one that you must design specifically for your case. Copying the lines directly in to a procedure will not work. Alternatively, you are missing some flag in the concatenate operation, perhaps one that allows you to overwrite the destination wave.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
jjweimer wrote:
whaoyu wrote:

string WaveListStr ="wave1;wave2;wave3;....;waveN;"
concatenate WaveListStr, tripletwave


When I use the sentence above, the program display the dialog "can't overwrite self."
What is the problem with the application or my sentence here?


I cannot be sure. My example is a generic one that you must design specifically for your case. Copying the lines directly in to a procedure will not work. Alternatively, you are missing some flag in the concatenate operation, perhaps one that allows you to overwrite the destination wave.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville


Yes, I just had a try. Here is some problems, when I use a short sentence like "string waveliststr="wave1;wave2;"" "concatenate waveliststr, destwave", it can be work well, but if I use a little long sentence like"string waveliststr="wave1;wave2;......;wave1023;"" "concatenate waveliststr, destwave" , the program would not work well and displayed "can't overwrite self". Maybe there is something wrong with the place"wave1;wave2;...;wave1023" which I think may not mean the waves from 0 to 1023. Do you have some solutions?


Haoyu
whaoyu wrote:

Yes, I just had a try. Here is some problems, when I use a short sentence like "string waveliststr="wave1;wave2;"" "concatenate waveliststr, destwave", it can be work well, but if I use a little long sentence like"string waveliststr="wave1;wave2;......;wave1023;"" "concatenate waveliststr, destwave" , the program would not work well and displayed "can't overwrite self". Maybe there is something wrong with the place"wave1;wave2;...;wave1023" which I think may not mean the waves from 0 to 1023. Do you have some solutions?


It sounds like you are literally typing ' string WaveListStr ="wave1;wave2;wave3;....;waveN;" '
The ellipsis ("....") is not part of the Igor language, it was a short hand used by J.J. to indicate all the waves. Your wave list has to contain literally all the waves you want to concatenate. if your waves are all in the current data folder and you want to concatentate them all, you can use:
waveliststring = wavelist("*", ";", "")


to assemble the list of waves. You must have already delcared waveliststring as a String variable.

Take a look at the wavelist function in the help browser for more details.

Hope this is helpful.
You may need to decide whether to use the /O flag or not. Otherwise, perhaps your destination wave some how included in the list of waves?

Also, what dimensionality do you want from your final concatenation? Please check the use of the /NP flag. Without it, you will create a matrix having N x 1023 dimensions, where N is the length of each wave. With it, you will create a wave with dimension 1 x (Nx1023) (a single "vector").

Other than this, I cannot recommend anything that could be wrong.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
jtigor wrote:
It sounds like you are literally typing ' string WaveListStr ="wave1;wave2;wave3;....;waveN;" '
The ellipsis ("....") is not part of the Igor language, it was a short hand used by J.J. to indicate all the waves. Your wave list has to contain literally all the waves you want to concatenate. if your waves are all in the current data folder and you want to concatentate them all, you can use:
waveliststring = wavelist("*", ";", "")



In this case, considering all possibilities for errors, the best choice might be ...

make/O/N=0 dWave
string theWaves
theWaves = WaveList("wave*",";","")
// use this when you want a matrix as the result
Concatenate/O theWaves, dWave
// use this when you want a "vector" wave as the result
Concatenate/O/NP theWaves, dWave


Here is a function that will do this, creating a result cat_wave ...

// how = 0 - matrix output
// how = 1 - vector output
Function SuperCat(how)
    variable how

    string theWaves
    make/O/N=0 cat_Wave
    theWaves = WaveList("wave*",";","")
    switch(how)
      case 0:
           Concatenate/O theWaves, cat_Wave
           break
      case 1:
           Concatenate/O/NP theWaves, cat_Wave
           break
    endswitch
    return 0
end


Copy the above function in to the procedure window. Make sure you are in the same data folder where your waves are located. Type SuperCat(0) or SuperCat(1) on the command line.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
whaoyu wrote:
Helo,

How to display band structure?
When I use the "display band structrue", the dialog often show me that " Could not find any definition of the curves value in the wave notes, have you set the current datafolder correctly?". I don't what's the problem about my data or the program. I have already had two files whthin one same experiment. One is ".asc" and the other is ".sp2".


Thanks,

haoyu


Are you asking about band structure as shown in http://www.wavemetrics.com/products/igorpro/gallery/user_jefferson.htm ?
That image was made by Paul Jefferson who graduated about 5 years ago. See if Tim Veal or Chris McConville at University of Warwick have his code.
If you're trying to do what igorbill linked to (which I assume you are), why don't you try a Load General Text to import the lines as a bunch of waves, then just plot those and set the k-axis ticks to a wave with the appropriate labels? That's what I do for plotting output from Wien2k (particularly nice because the output also includes the appropriate positions for the labels). If you're using something like abinit or VASP (this in particular was nasty when I was plotting with gnuplot), then some more work might be required, but it's worth a shot to see if you can do this without relying on a 3rd party procedure.