Re: I/O with file lists [message #71495 is a reply to message #71418] |
Tue, 22 June 2010 08:28   |
Nikola
Messages: 53 Registered: November 2009
|
Member |
|
|
On Jun 21, 8:48 pm, spacermase <thomsonmasonfis...@gmail.com> wrote:
> Hello all,
>
> I'm running an image conversion procedure, vcr2fits.pro, which
> requires two arguments, the image name and the name of the .fits file
> that will be created. Due to the large number of images that need to
> be converted, I'd like to be able to run it in batches, and have
> created lists of file names and output names (rather unimaginatively
> named input.list and output.list, respectively). This is probably a
> newbie question, but what's the best way to read these lists into IDL
> so vcr2fits can process them? With IRAF, for example, this is done by
> entering '...@input.list' and '...@output.list' into the input and output
> parameters- I am hoping that an equivalent exists for IDL.
>
> Suggestions?
If I understand correctly, you don't have a list with file names, but
you want to create it? If yes, I normally use FILE_SEARCH function to
generate a list of images that have to be processed:
list = FILE_SEARCH(directory+'*.fits')
Once you have it, you can run
FOR i = 0, nimages DO your_pro(list(i))
Check IDL help for the details of FILE_SEARCH:
http://star.pst.qub.ac.uk/idl/FILE_SEARCH.html
|
|
|