Create a map of IgorPro functions in procedure files
HTML IGOR Pro Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
JSONFromFuncFile.ipf
LICENSE
README.md
display.html
funcMap.json
getProcs.sh
output.gif

README.md

MapIgorCode

Create a map of IgorPro functions in procedure files

--

Aim make a map of all the functions in Igor procedure files to enable the location of appropriate code for other projects.

This is a solution for macOS. It uses shell commands, Igor and lastly d3.js to display the map. It uses work by other people that I have appropiated.

  • In the terminal, cd to the directory containing the *.ipf files you want to map. Execute:
grep "^[ \t]*Function" *.ipf | grep -oE '[ \t]+[A-Za-z_0-9]+\(' | tr -d " " | tr -d "(" > output
for i in `cat output`; do grep -ie "$i" *.ipf | grep -w "Function" >> funcfile.txt ; done
sed -i -e 's/.ipf:Function /  /g' funcfile.txt
  • Use JSONFromFuncFile.ipf, point Igor to funcfile.txt
  • The resulting file, funcMap.json can be used with display.html to see the map.

Working example of Igor code map

Notes

  1. The tab character is used in sed. Use ctrl+v and tab to get it if copy paste or .sh does not work.
  2. The d3.js example is from here and working example.
  3. Only Functions are mapped, Static Functions and other stuff are not, but feel free to modify.
  4. Converting tsv to json using this Igor code works but is a bit quick and dirty: might not work in all cases.