Exemplo n.º 1
0
centroid_stamp_half_width = 8
psf_stddev_init = 2
aperture_annulus_radius = 10
transit_parameters = params_b
star_positions = np.loadtxt('20160705_g.txt')

brightest_star_coords_init = np.array([186, 280])

output_path = 'outputs/20160705.npz'
force_recompute_photometry = True

# Calculate master dark/flat:
if not os.path.exists(master_dark_path) or not os.path.exists(
        master_flat_path):
    print('Calculating master flat:')
    generate_master_flat_and_dark(night_flat_paths, dark_30s_paths,
                                  master_flat_path, master_dark_path)

# Do photometry:

if not os.path.exists(output_path) or force_recompute_photometry:
    print('Calculating photometry:')
    phot_results = photometry(image_paths, master_dark_path, master_flat_path,
                              star_positions, aperture_radii,
                              centroid_stamp_half_width, psf_stddev_init,
                              aperture_annulus_radius, output_path,
                              brightest_star_coords_init)

else:
    phot_results = PhotometryResults.load(output_path)

# print('Calculating PCA...')
Exemplo n.º 2
0
target_centroid = np.array([[613], [750]])
comparison_flux_threshold = 0.1
aperture_radii = np.arange(10, 32, 2)
centroid_stamp_half_width = 30
psf_stddev_init = 30
aperture_annulus_radius = 10
transit_parameters = params_b

output_path = 'outputs/wasp85_20170131.npz'
force_recompute_photometry = False  # True

# Calculate master dark/flat:
if not os.path.exists(master_dark_path) or not os.path.exists(
        master_flat_path):
    print('Calculating master flat:')
    generate_master_flat_and_dark(flat_paths, dark_paths, master_flat_path,
                                  master_dark_path)

# Do photometry:

if not os.path.exists(output_path) or force_recompute_photometry:
    print('Calculating photometry:')
    phot_results = photometry(image_paths, master_dark_path, master_flat_path,
                              target_centroid, comparison_flux_threshold,
                              aperture_radii, centroid_stamp_half_width,
                              psf_stddev_init, aperture_annulus_radius,
                              output_path)

else:
    phot_results = PhotometryResults.load(output_path)

print('Calculating PCA...')