How can you bypass the dialog and automate loading Fits file data into Wave data?

Hi

I am struggling with finding a way to load Fits file data into Wave data without using a dialog.  I need to load large volumes of spectral images and it would take far too long to do it manually.  

I have looked into Parsefilepath to try to extract the files but that command seems to only select the strings associated with the names of the files.

I am new to Igor so any help would be greatly appreciated!

   

I guess you are using the FITS Loader.ipf WaveMetrics procedure.

You need to call LoadOneFITS() from your own code that loops over the files you are trying to load. My guess is that you would like to load all the FITS files from a given disk folder. The structure of the code required will be the same as our example: DisplayHelpTopic "Loading All of the Files in a Folder". Since you need a file refnum as input to LoadOneFITS(), you need to call Open on each file in the list. If you provide a file name and symbolic path to Open, you won't get a dialog (which is what you were asking in the first place :)

If you are using the LoadWave operation, either directly or via another procedure, it displays an Open File dialog only if you do not fully-specify the file to be loaded.

The Parameters section of the help for LoadWave explains what it means for a file to be fully specified. In brief, you need to supply either a full path or use /P=<symbolic path> and supply a file name.

If you are not familiar with symbolic paths, execute:

DisplayHelpTopic "Symbolic Paths"

As John mentioned, for an example:

DisplayHelpTopic "Loading All of the Files in a Folder"