diff --git a/scripts/aggregate_dataset_histos.py b/scripts/aggregate_dataset_histos.py index 0dc3b17..0724a8e 100644 --- a/scripts/aggregate_dataset_histos.py +++ b/scripts/aggregate_dataset_histos.py @@ -1,17 +1,17 @@ """Aggregate the dataset's job's histograms, by sampling.""" -import math - import argparse -import h5py # type: ignore import json import logging -import numpy as np +import math import pickle import random from pathlib import Path from typing import Iterator +import h5py # type: ignore +import numpy as np + SKIP_KEYS = ["filelist"] HISTO_TYPES = [ "PrimaryZenith", @@ -107,8 +107,6 @@ def main() -> None: help="the destination directory to write a json file containing aggregated histograms", ) args = parser.parse_args() - args.path: Path # typehint to aid IDE - args.dest_dir: Path # ^^^ _main(args) diff --git a/scripts/display_histos.py b/scripts/display_histos.py index 3d96239..d20b1b5 100644 --- a/scripts/display_histos.py +++ b/scripts/display_histos.py @@ -1,14 +1,14 @@ """Display the histograms in a file.""" +import argparse +import json import math +import pickle +from pathlib import Path -import argparse import h5py # type: ignore -import json import matplotlib.pyplot as plt import numpy as np -import pickle -from pathlib import Path def from_hdf5(fpath: Path): @@ -95,7 +95,6 @@ def main(): help="the dataset directory to grab pickled histograms", ) args = parser.parse_args() - args.path: Path # typehint to aid IDE # get histograms if args.path.suffix in [".pickle", ".pkl"]: