Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Nov 14, 2024
1 parent c64829d commit 7d4434a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
10 changes: 4 additions & 6 deletions scripts/aggregate_dataset_histos.py
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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)

Expand Down
9 changes: 4 additions & 5 deletions scripts/display_histos.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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"]:
Expand Down

0 comments on commit 7d4434a

Please sign in to comment.