Wednesday, March 2, 2016

Find files in a dir

for file in os.listdir(thisdir):
    if file.endswith("_galfit.fits"):
        image, header = fits.getdata(file, 3, header=True)  
        blagh blagh blagh

Source: Stack overflow

No comments:

Post a Comment