Igor to Python Module
Jump to navigation
Jump to search
Igor | Python | Igor Pro | Python | Igor Pro Example | Python Example | % Complete | Comments/Caveats/Notes |
---|---|---|---|---|---|---|---|
?:
|
Question()
|
WaveName = Expression ? TrueExpression : FalseExpression
|
WaveName=Question(ExpressionStr,TrueExpressionStr, FalseExpressionStr)
|
w=w[p]==0 ? Nan : w(p)
|
w=Question("w[p]==0", "none","w[p]")
|
Conception | I have written some code in there. |
cmpstr() | cmpstr() | cmpstr(string1,string2)
|
cmpstr(string1,string2)
|
if (cmpstr(string1,string2)==1)
|
if ((cmpstr(string1,string2)==1):
|
50% | |
Make | MakeWave() | Make Options WaveName;Command1;Command2
|
WaveName=MakeWave(OptionStr,CommandStr='',ImplictWaveName='')
|
Make\O\D w=sine(p)
|
w=MakeWave("\O\D","w=sin(p)")
|
In Progress | In the Python module, you cannot make multiple Wave Commands; I need to come up with a custom dtype for Waves |
num2str() | num2str() | num2str(number)
|
num2str(number)
|
print num2str(number)
|
print(num2str(number))
|
100% | |
for[1]
|
for
|
for(VariableType Item:WaveName)
Commands endfor |
for Item in WaveName1D[2]:
Commands |
for(String s:TextWave1D)
|
for s in TexWave1D[2] :
|
Conception | |
for [2]
|
Gfor()
|
for(VariableType Item:WaveName)
|
IgorCommands="""Igor Commands"""
|
for(String s:TextWave0)
|
IgorCommands="""print s""" [3]
|
Conception | Need a IgorParser for IgorCommands |
for | Pfor() | for(VariableType Item:WaveName)
|
PythonComands="""PythonCommands"""
|
for(String s:TextWave0)</code)
|
PythonCommands="""print(s)"""
Pfor(s,Textwave0,PythonCommands) |
Conception | Need Function to clean up Python 'Commands |
for | for with LinearizeWave()[4] | for(VariableType Item:WaveName)
|
for Item in LinearizeWave(WaveName): [5]
|
for(String s:TextWave0)
|
for s in LinearizeWave(TextWave0):
|
Conception | This is probably the best option. In order to parse it, I need to identify the wave as a wave. |
Wave Format
- Waves seem like a complex data format.
- p = seems to be a reserved row indexing variable
- q = seems to be a reserved column indexing variable
Parts of a Wave
- WaveName
- ImplicitWaveName
- Xarray
- Yarray
- Tarray
To Do
- Make a Wave a custom data type in Python
WaveNames=[WaveName1, WaveName2, WaveName3] # Through Arrays (Too confusiont
WaveNames=MakeWave(OptionsStr,CommandStr,ImpicitNames)
WaveFormat
WaveName=[ImplictNameStr,XArray, Array] # Array format
WaveName={
'implicit':ImplicitWaveNameStr, # defines an implicit string for a wave name
'scaling':{
'x':RowArray, # reserved indice variable p
'y':ColumnsArray, # reserved indice variable q
'z':LayersArray, # reserved indice variable s
't':ChunkArray, # reserved indice variable r
},
'data':DataArray #1D-4D Array
}
RowArray initially has numbers as p
- see https://www.wavemetrics.net/doc/igorman/II-06%20MultiDim%20Waves.pdf
- see https://www.educba.com/numpy-3d-array/
- https://stackoverflow.com/questions/22981845/3-dimensional-array-in-numpy