Beispiel #1
0


if __name__ == "__main__":


    ### COMMAND LINE ARGUMENTS

    # Init the command line arguments parser
    arg_parser = argparse.ArgumentParser(description="Run the trajectory solver on the given FTPdetectinfo file. It is assumed that only one meteor per file is given.")

    arg_parser.add_argument('ftpdetectinfo_path', nargs=1, metavar='FTP_PATH', type=str, \
        help='Path to the FTPdetectinfo file. It is assumed that the CameraSites.txt and CameraTimeOffsets.txt are in the same folder.')

    # Add other solver options
    arg_parser = addSolverOptions(arg_parser, skip_velpart=True)

    arg_parser.add_argument('-p', '--velpart', metavar='VELOCITY_PART', \
        help='Fixed part from the beginning of the meteor on which the initial velocity estimation using the sliding fit will start. Default is 0.4 (40 percent), but for noisier data this might be bumped up to 0.5.', \
        type=float, default=0.4)

    # Parse the command line arguments
    cml_args = arg_parser.parse_args()

    #########################

    ### Parse command line arguments ###

    ftpdetectinfo_path = os.path.abspath(cml_args.ftpdetectinfo_path[0])

    dir_path = os.path.dirname(ftpdetectinfo_path)
Beispiel #2
0
    import argparse

    ### COMMAND LINE ARGUMENTS

    # Init the command line arguments parser
    arg_parser = argparse.ArgumentParser(
        description=
        """ Re-run the Monte Carlo trajectory solver on a trajectory pickle file.""",
        formatter_class=argparse.RawTextHelpFormatter)

    arg_parser.add_argument('input_file',
                            type=str,
                            help='Path to the .pickle file.')

    # Add other solver options
    arg_parser = addSolverOptions(arg_parser)

    arg_parser.add_argument('-a', '--onlyplot', \
        help='Do not recompute the trajectory, just show and save the plots.', action="store_true")

    # Parse the command line arguments
    cml_args = arg_parser.parse_args()

    ############################

    ### Parse command line arguments ###

    max_toffset = None
    if cml_args.maxtoffset:
        max_toffset = cml_args.maxtoffset[0]