Exemplo n.º 1
0
def get_turbulenceProfile_information(configuration,
                                      air_mass,
                                      tas,
                                      pix_arc,
                                      shwfs_centroids,
                                      input_matrix=False):

    conf = capt.turbulence_profiler(configuration)
    results = conf.perform_turbulence_profiling(air_mass, tas, pix_arc,
                                                shwfs_centroids)

    generate_matrix = capt.turbulence_profiler.make_covariance_matrix(
        conf,
        air_mass,
        tas,
        conf.layer_alt,
        results.r0,
        results.L0,
        results.tt_track,
        results.lgs_track,
        results.shwfs_shift,
        results.shwfs_rot,
        l3s1_transform=False,
        target_array='Covariance Matrix',
        tt_track_present=results.tt_track_present,
        offset_present=results.offset_present)

    return results, generate_matrix
def generate_covariance(configuration,
                        air_mass,
                        tas,
                        pix_arc,
                        shwfs_centroids,
                        input_matrix=False):

    conf = capt.turbulence_profiler(configuration)

    roi = capt.turbulence_profiler.make_covariance_roi(conf,
                                                       conf.pupil_mask,
                                                       air_mass,
                                                       tas,
                                                       conf.gs_alt,
                                                       conf.layer_alt,
                                                       conf.guess_r0,
                                                       conf.guess_L0,
                                                       conf.tt_track,
                                                       False,
                                                       conf.shwfs_shift,
                                                       conf.shwfs_rot,
                                                       l3s1_transform=False,
                                                       tt_track_present=False,
                                                       lgs_track_present=False,
                                                       offset_present=True)
    mat = 0

    # mat = capt.turbulence_profiler.make_covariance_matrix(
    #     conf, conf.pupil_mask, air_mass, tas, conf.gs_alt, conf.layer_alt, conf.guess_r0, conf.guess_L0, conf.tt_track,
    #     False, conf.shwfs_shift, conf.shwfs_rot, l3s1_transform=False, target_array='Covariance Map ROI',
    #     tt_track_present=False, lgs_track_present=False, offset_present=False)

    return mat, roi
Exemplo n.º 3
0
def get_turb_profile(turb_conf,
                     air_mass,
                     tas,
                     pix_arc,
                     shwfs_centroids,
                     input_matrix=False):
    turb_conf = capt.turbulence_profiler(turb_conf)
    turb_results = turb_conf.perform_turbulence_profiling(
        air_mass, tas, pix_arc, shwfs_centroids)
    return turb_results
Exemplo n.º 4
0
def get_turbulenceProfile_information(configuration,
                                      air_mass,
                                      tas,
                                      pix_arc,
                                      shwfs_centroids,
                                      input_matrix=False):

    conf = capt.turbulence_profiler(configuration)
    input_matrix = capt.turbulence_profiler.make_covariance_matrix(
        conf, conf.pupil_mask, air_mass, tas, conf.gs_alt, numpy.array([0]),
        numpy.array([0.8]), conf.guess_L0, conf.tt_track, None,
        conf.shwfs_shift, conf.shwfs_rot)

    conf = capt.turbulence_profiler(configuration)
    results = conf.perform_turbulence_profiling(air_mass,
                                                tas,
                                                pix_arc,
                                                shwfs_centroids,
                                                cov_matrix=input_matrix)

    return results
def generate_covariance(configuration,
                        air_mass,
                        tas,
                        pix_arc,
                        shwfs_centroids,
                        input_matrix=False):

    conf = capt.turbulence_profiler(configuration)

    st = time.time()
    mat = capt.turbulence_profiler.make_covariance_matrix(
        conf,
        conf.pupil_mask,
        air_mass,
        tas,
        conf.gs_alt,
        conf.layer_alt,
        conf.guess_r0,
        conf.guess_L0,
        conf.tt_track,
        False,
        conf.shwfs_shift,
        conf.shwfs_rot,
        l3s1_transform=False,
        target_array='Covariance Matrix',
        tt_track_present=False,
        offset_present=False)
    print(time.time() - st)

    roi = numpy.nan
    roi = capt.turbulence_profiler.make_covariance_roi(conf,
                                                       conf.pupil_mask,
                                                       air_mass,
                                                       tas,
                                                       conf.gs_alt,
                                                       conf.layer_alt,
                                                       conf.guess_r0,
                                                       conf.guess_L0,
                                                       conf.tt_track,
                                                       False,
                                                       conf.shwfs_shift,
                                                       conf.shwfs_rot,
                                                       l3s1_transform=False,
                                                       tt_track_present=True,
                                                       offset_present=False)

    pyplot.figure()
    pyplot.imshow(mat)
    pyplot.figure()
    pyplot.imshow(roi)
    return mat, roi