if len(indices[0]) != 2: print("SKIIIIIIIIIIIIPUH") continue # Initiate third sublist of F for distinguishing between different aperture radii F_3lst, sigmaF_3lst = [], [] for l, R in enumerate(r_range): # Lists for temporary storage of aperture sum values and corresponding shotnoise levels apsum_lst, shotnoise_lst = [], [] for ind in indices[0]: # Compute cumulative counts within aperture apsum = aper.apersum(data, xcoords[ind], ycoords[ind], R) apsum_lst.append(apsum) # Compute photon shot noise within aperture shotnoise = np.sqrt(apsum) shotnoise_lst.append(shotnoise) # Compute normalised flux differences for current aperture size F, sigmaF = fluxdiff_norm(apsum_lst[1], apsum_lst[0], shotnoise_lst[1], shotnoise_lst[0]) # Append results to third sublist F_3lst.append(F), sigmaF_3lst.append(sigmaF) # Append the third sublist to the second sublist F_2lst.append(F_3lst), sigmaF_2lst.append(sigmaF_3lst)
# TODO THERE MIGHT STILL BE THE POSSIBILITY THAT FALSE SOURCES ARE TAKEN INTO ACCOUNT, IF THERE ARE TWO WITHIN <=5 PIXELS PROXIMITY FROM EACH OTHER if len(indices[0]) != 2: print("Possible Artefact!") xcs_lstDEL = np.delete(xcs_lst, q, 0) continue # Initiate third sublist of F for distinguishing between different aperture radii F_3lst, sigmaF_3lst = [], [] for l, R in enumerate(r_range): # Lists for temporary storage of aperture sum values and corresponding shotnoise levels apsum_lst, shotnoise_lst = [], [] for ind in indices[0]: # Compute cumulative counts within aperture apsum = aper.apersum(data, xcs_lst[ind], ycs_lst[ind], R) apsum_lst.append(apsum) # Compute photon shot noise within aperture shotnoise = np.sqrt(apsum) shotnoise_lst.append(shotnoise) # Compute normalised flux differences for current aperture size F, sigmaF = fluxdiff_norm(apsum_lst[1], apsum_lst[0], shotnoise_lst[1], shotnoise_lst[0]) # Append results to third sublist F_3lst.append(F), sigmaF_3lst.append(sigmaF) # Append the third sublist to the second sublist F_2lst.append(F_3lst), sigmaF_2lst.append(sigmaF_3lst) print("\t\t\tF_2lst:\t{}".format(len(F_2lst)))