예제 #1
0
파일: gnss.py 프로젝트: vpuenteg/where
def write_session_report(rundate, tech):
    dsets = dict()
    for _, dset, report_data in report.reports("remover_data"):
        dset.add_float("keep_idx", val=report_data["keep_idx"])
        dsets[dset.dataset_name] = dset

    with files.open("output_gnss_session_report", mode="wt") as fid:
        header(fid)
        rejected_satellites_per_station(fid, dsets)
        rejected_satellites(fid, dsets)
        rejected_stations(fid, dsets)
예제 #2
0
파일: sisre.py 프로젝트: vpuenteg/where
def write_session_report(rundate, tech):

    dsets = dict()
    for _, dset, report_data in report.reports("remover_data"):
        remover_name = report_data["remover_name"]
        station = dset.dataset_name
        dset_station = dsets.setdefault("removers",
                                        dict()).setdefault(station, dset)
        dset_station.add_float(
            "keep_idx_{}".format(remover_name),
            val=report_data["keep_idx"])  # TODO: What is keep_idx?

    for _, dset, report_data in report.reports("orbit_data"):
        dsets.setdefault("orbit", dict())[report_data["station"]] = dset

    session = list(dsets["orbit"].keys())[0]
    if not session:
        return 0

    dset = dsets["orbit"][session]
    sisre_report.sisre_report(dset)
예제 #3
0
파일: gnss.py 프로젝트: vpuenteg/where
def header(fid):
    _, _, title = next(report.reports("title"))

    fid.write("""---
title: {title}
author: Where v{version} [{user}]
date: {nowdate:%Y-%m-%d}
---
""".format(title=title["text"],
           version=where.__version__,
           user=config.analysis.user.str,
           nowdate=datetime.now()))

    fid.write("# bla bla bla\n")
예제 #4
0
def write_session_report(rundate, tech):
    dsets = dict()
    for _, dset, report_data in report.reports("remover_data"):
        remover_name = report_data["remover_name"]
        station = dset.dataset_name
        dset_station = dsets.setdefault("removers",
                                        dict()).setdefault(station, dset)
        dset_station.add_float(
            "keep_idx_{}".format(remover_name),
            val=report_data["keep_idx"])  # TODO: What is keep_idx?

    for _, dset, report_data in report.reports("orbit_data"):
        dsets.setdefault("orbit", dict())[report_data["station"]] = dset

    with files.open("output_gnss_session_report", mode="wt") as fid:
        header(fid)
        write_config(fid)
        unhealthy_satellites(fid, dsets)
        eclipse_satellites(fid, dsets)
        # rejected_satellites_per_station(fid, dsets)
        # rejected_satellite_observations(fid, dsets)
        # rejected_station_observations(fid, dsets)
        statistics(fid, dsets)
예제 #5
0
def get_cells():
    slide_type = itertools.chain(["slide", "fragment"], itertools.cycle(["subslide", "fragment"]))
    for report_name, _, report_data in report.reports():
        #        print(report_name, report_data)
        _, report_type = report_name.split("/")
        if report_type == "header":
            slide_type = itertools.chain(["slide", "fragment"], itertools.cycle(["subslide", "fragment"]))
        if report_type == "model":
            slide_type = itertools.cycle(["subslide", "fragment"])
        if "__doc__" in report_data and report_data["__doc__"]:
            yield nbbase.new_markdown_cell(report_data["__doc__"], metadata=_meta_slideshow("fragment"))
        if "__code__" in report_data:
            yield nbbase.new_code_cell(report_data["__code__"], metadata=_meta_slideshow("fragment"))
        else:
            parser = CELL_PARSER.get(report_type)
            if parser:
                yield nbbase.new_markdown_cell(parser(report_data["text"]), metadata=_meta_slideshow(next(slide_type)))
예제 #6
0
def header(fid):
    _, _, title = next(report.reports("title"))

    fid.write("""---
title: {title}
author: Where v{version} [{user}]
date: {nowdate:%Y-%m-%d}
---
""".format(title=title["text"],
           version=where.__version__,
           user=config.analysis.user.str,
           nowdate=datetime.now()))

    fid.write("\\newpage\n")
    fid.write("#SISRE analysis\n")

    fid.write("\\begin{equation}\n")
    fid.write(
        "     \\text{SISRE(orb)}^s = \sqrt{w_r^2 \cdot \Delta {r^s}^2 + w_{a,c}^2 \cdot (\Delta {a^s}^2 + \Delta {c^s}^2)}\n"
    )
    fid.write("  \\label{eq:sisre_orb}\n")
    fid.write("\\end{equation}\n")
    fid.write("\n")
    fid.write("\\begin{equation}\n")
    fid.write(
        "     \\text{SISRE}^s = \sqrt{(w_r \cdot \Delta r^s - \Delta t^s)^2 + w_{a,c}^2 \cdot (\Delta {a^s}^2 + \Delta {c^s}^2)}\n"
    )
    fid.write("  \\label{eq:sisre}\n")
    fid.write("\\end{equation}\n")
    fid.write("\n")
    fid.write("\\begin{tabular}{lll}\n")
    fid.write("with\\\n")
    fid.write(
        " & $\\text{SISRE(orb)}^s$  & Orbit-only SISRE for satellite $s$, \\\\\n"
    )
    fid.write(" & $\\text{SISRE}^s$       & SISRE for satellite $s$, \\\\\n")
    fid.write(
        " &$\Delta a^s$, $\Delta c^s$, $\Delta r^s$   & Satellite coordinate differences between broadcast and precise \\\\\n"
    )
    fid.write(
        " &                        & ephemeris in along-track, cross-track and radial for satellite $s$,\\\\\n"
    )
    fid.write(
        " &$w_r$                   & SISRE weight factor for radial errors (see Table \\ref{tab:sisre_weight_factors}),\\\\\n"
    )
    fid.write(
        " &$w_{a,c}$               & SISRE weight factor for along-track and cross-track errors \\\\\n"
    )
    fid.write(
        " &                        & (see Table \\ref{tab:sisre_weight_factors}).\\\\\n"
    )
    fid.write("\end{tabular}\n")
    fid.write("\n")
    fid.write("\\begin{table}[!ht]\n")
    fid.write("\\begin{center}\n")
    fid.write("  \\begin{tabular}[c]{lll}\n")
    fid.write("    \hline\n")
    fid.write("    System       & $w_r$  & $w_{a,c}^2$ \\\\\n")
    fid.write("    \hline\n")
    fid.write("    GPS          & $0.98$ & $1/49$ \\\\\n")
    fid.write("    GLONASS      & $0.98$ & $1/45$ \\\\\n")
    fid.write("    Galileo      & $0.98$ & $1/61$ \\\\\n")
    fid.write("    QZSS         & $0.99$ & $1/126$ \\\\\n")
    fid.write("    BeiDou (MEO) & $0.98$ & $1/54$ \\\\\n")
    fid.write("    \hline\n")
    fid.write("  \end{tabular}\n")
    fid.write(
        "  \caption[SISRE weight factors for radial ($w_r$) and along-track and cross-track errors ($w_{a,c}$)]{SISRE weight factors for radial ($w_r$) and along-track and cross-track ($w_{a,c}$) errors }\n"
    )
    fid.write("  \label{tab:sisre_weight_factors}\n")
    fid.write("\end{center}\n")
    fid.write("\end{table}\n")
    fid.write("\\newpage\n")