Using GitHub Copilot to generate Igor Pro code

I have been experimenting with using GitHub Copilot from within VSCode to write Igor procedure code. This is pretty easy to do. I don't have a step-by-step tutorial, but generally speaking you need to have GitHub.com account and use VSCode with the GitHub Copilot Chat extension installed. You may need to enable Copilot usage in the GitHub Copilot settings page.

I have a personal paid monthly plan, which costs around $10 USD, but I believe that a certain amount of free monthly usage is allowed. A paid plan provides a certain amount of monthly usage above the free tier amount and you can set a budget to allow additional charges if you use the amount provided by the paid plan. My understanding is that the "premium" models require a paid plan, so if you are using a free plan you may not be able to use the same models I used to generate the code. It's possible that the free models would also do a good job--I haven't investigated different models very much. The monthly price varies depending on who is paying, and if your GitHub.com account is part of a team or organization account they may prevent you from using Copilot or set other restrictions.

I have not done very much configuration of the chat extension. At the bottom of the window, below where you write the prompt, I have "Local" selected for Delegate Session, "Agent" selected for Set Agent, and the model indicated below for Pick Model.

Caveats:

My general impression is that the quality of Igor code generated by Copilot is surprisingly high, but it also makes dumb mistakes that sometimes have serious consequences. If you are using AI to write important code (particularly for data analysis, data loading, etc.) you should carefully verify that the code itself is correct and that it does what you intend. You also must remember that in the best case AI does what you tell it to do, not what you want it to do. You may need to be overly precise in your instructions to avoid it doing the wrong thing, particularly in cases where the expectation is unclear. 

 

I plan to periodically use GitHub Copilot to write Igor Pro code in response to questions from users. I'll post my replies in the relevant threads and link to them from here.

 

Claude Opus 4.5:

 

 

For comparison, I tried Claude (at the free tier) some time ago to review an existing procedure. I was exceptionally pleased with the step-by-step analysis it presented to help me significantly improve what I had created. I can highly recommend it for such review processing. I cannot comment on its ability to generate Igor Pro code from scratch.

Otherwise, to support your bold statement, for anyone needing to write Igor Pro code to do something, consider as a first step asking here for advice. Think of the IgorExchange forum as a free resource with an ability to function as a high-level AI tuned specifically to all nuances of Igor Pro.