def find_optimal_box(box, display=False):
    actual_area = ACQUISITION_BOX_SIZE * ACQUISITION_BOX_SIZE # arcseconds^2
    
    scidata = box.get_data()

    best_box = find_optimal(scidata,
                            measure_box,
                            get_box_error_func(actual_area, box.unbinned_pixel_scale()))

    if display:
        plotting.put_plot(plot_box_measurement, (box, best_box))
    
    return MosaicTile(box, best_box)
Beispiel #2
0
def find_optimal_slit(acqimage, slitxpos, slitypos, display):
    actual_width = acqimage.get_mask_width()
    
    scidata = acqimage.get_science_data()

    best_slit = find_optimal(scidata,
                             measure_slit,
                             get_error_func(actual_width, acqimage.unbinned_pixel_scale()),
                             slitxpos,
                             slitypos)

    if display:
        plotting.put_plot(plot_slit_measurement, (acqimage, best_slit))
    
    return best_slit