<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_parameters(infile='../parameters/EQcorrscan_parameters.txt'):
 """ Read the default parameters from file. :type infile: str :param infile: Full path to parameter file. :returns: parameters read from file. :rtype: :class:`eqcorrscan.utils.parameters.EQcorrscanParameters` """

    try:
        import ConfigParser
    except ImportError:
        import configparser as ConfigParser
    import ast
    f = open(infile, 'r')
    print('Reading parameters with the following header:')
    for line in f:
        if line[0] == '#':
            print(line.rstrip('\n').lstrip('\n'))
    f.close()
    config = ConfigParser.ConfigParser()
    config.read(infile)
    # Slightly tricky list reading
    template_names = list(ast.literal_eval(config.get("eqcorrscan_pars",
                                                      "template_names")))
    parameters = \
        EQcorrscanParameters(template_names=template_names,
                             lowcut=config.get("eqcorrscan_pars", "lowcut"),
                             highcut=config.get("eqcorrscan_pars", "highcut"),
                             filt_order=config.get("eqcorrscan_pars",
                                                   "filt_order"),
                             samp_rate=config.get("eqcorrscan_pars",
                                                  "samp_rate"),
                             debug=config.get("eqcorrscan_pars", "debug"),
                             startdate=config.get("eqcorrscan_pars",
                                                  "startdate"),
                             enddate=config.get("eqcorrscan_pars", "enddate"),
                             archive=config.get("eqcorrscan_pars", "archive"),
                             arc_type=config.get("eqcorrscan_pars",
                                                 "arc_type"),
                             cores=config.get("eqcorrscan_pars", "cores"),
                             plotvar=config.getboolean("eqcorrscan_pars",
                                                       "plotvar"),
                             plotdir=config.get("eqcorrscan_pars", "plotdir"),
                             plot_format=config.get("eqcorrscan_pars",
                                                    "plot_format"),
                             tempdir=ast.literal_eval(config.
                                                      get("eqcorrscan_pars",
                                                          "tempdir")),
                             threshold=config.get("eqcorrscan_pars",
                                                  "threshold"),
                             threshold_type=config.get("eqcorrscan_pars",
                                                       "threshold_type"),
                             trigger_interval=config.get("eqcorrscan_pars",
                                                         "trigger_interval")
                             )

    return parameters