I'm using a program named 'SExtractor' which takes astronomical images in imput and subtracts the skyglow giving as output the same image corrected. More specifically the output it's composed by four files per run: the original image, the corrected one, the subtraction and a text file with scientific parameters. The images I'm talking about are .fits files, very common in astronomy, and can be open with professional softwares like DS9.
Returning to the question, (sorry if I make it here but the software developer's guide it's still incomplete and I have found nothing more about this program on the web) I need to analyze about 1000 files and as you can imagine it will be a tedious work to select them manually! To run this program I just need to go to the terminal and write
sextractor image.fit where
image.fit is the image I want to analyze. My images are all in the same directory as
image_002.fit etc and I'd like to loop
sextractor to analyze them automatically.
I tried typing
image_003.fit and so on, but it gives me the error
too many imput files. I get the same error if I type
sextractor *.fit. It works fine in any case with just two images but, as the guide says, in this case I get a sort of combination of the two files and this is not what I'm looking for because I need to analyze each image singularly!
I wonder if there is a way to analyze all the files automatically. I tried a for-loop in C (the only language I know something about) but I don't know how to perform it with a series of files which differs for a number (image_001, image_002, etc). I also tried to make a text file with the list of all the images but if I type
sextractor list.txt the program doesn't run because it says it wants
.fits files. I don't know how to do this!
Sorry for the long question, I hope I've been clear enough, write me for any doubts. Thank you for the attenction!