Example #1
0
os.system("rm smooth_dir/smooth_*.fits")

### Go through the folders, identify and reduce each smooth image
smooth_files_list = []

stars_to_try = ["ltt4364","eg131"]

for star in stars_to_try:
    count = 1

    for i in range(len(folders_to_search)):
        file_path_current = file_path + folders_to_search[i]

        ### Find any smooth star exposures
        ccdlist_info = iraf.ccdlist(file_path_current + "*.fits", Stdout = 1)
        ccdlist_info = functions.ccdlist_extract(ccdlist_info)
        ccdlist_match = functions.ccdlist_identify(ccdlist_info,star)

        ### Reduce any such exposures
        if len(ccdlist_match) > 0:
            for j in range(len(ccdlist_match)):
                file_name = ccdlist_info[ccdlist_match[j]][2] + ".fits"
                file_path_temp = file_path_current + "temp/"
                file_path_reduced = file_path_current + "reduced/"
                print "currently reducing image " + file_path_current + file_name

                smooth_files_list,count = reduce_image(file_path_current,file_name,file_path_reduced,smooth_files_list,count)

    ### If exposures were found for starX, then break the for loop
    if count > 1:
        break
Example #2
0
########################
### Start of program ###
########################

### Set file_path
file_path = sys.argv[1]
#file_path = "/priv/miner3/hat-south/george/Honours/data/wifes/2010/"
file_path_temp = file_path + "temp/"
file_path_reduced = file_path + "reduced/"

############################################
### Open file_path and find all SpecPhot ###
############################################

### Get a list of fits files with objects begining in "HD"
object_list = functions.ccdlist_extract(iraf.ccdlist(file_path +"*.fits",Stdout = 1))
HD_match = functions.ccdlist_identify_HD(object_list)

HD_match = []
for i in range(len(object_list)):
    HD_match.append(i)

### Open those images and check if NOTES says "RV Standard"
SP_match = check_head(HD_match,"NOTES","SpecPhot")

### Write the file_names to temp textfile
SP_list = open(file_path_temp + "SpecPhot_list","w")
for i in range(len(SP_match)):
    file_name = object_list[SP_match[i]][2] + "\n"
    SP_list.write(file_name)