Commit fe4c9763 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add verbose mode to inspect

parent 4ad99fa6
...@@ -71,7 +71,8 @@ parser.add_argument("--data-model", type=str, help="Data model", default=None) ...@@ -71,7 +71,8 @@ parser.add_argument("--data-model", type=str, help="Data model", default=None)
parser.add_argument("--batch-id", type=str, help="Batch ID", default=None) parser.add_argument("--batch-id", type=str, help="Batch ID", default=None)
# reset prc_status # reset prc_status
parser.add_argument("--reset", type=int, help="Reset prc_status", default=None) parser.add_argument("--reset", type=int, help="Reset prc_status", default=None)
# additional options
parser.add_argument("--verbose", action="store_true", help="Verbose mode", default=False)
args = parser.parse_args() args = parser.parse_args()
# from csst_dag import DotDict # from csst_dag import DotDict
...@@ -121,6 +122,8 @@ for stats_type, stats_keys in dict( ...@@ -121,6 +122,8 @@ for stats_type, stats_keys in dict(
detector=["dataset", "instrument", "obs_type", "obs_group", "detector", "prc_status"], detector=["dataset", "instrument", "obs_type", "obs_group", "detector", "prc_status"],
obs_id=["dataset", "instrument", "obs_type", "obs_group", "obs_id", "prc_status"], obs_id=["dataset", "instrument", "obs_type", "obs_group", "obs_id", "prc_status"],
).items(): ).items():
if args.verbose:
data_basis.pprint_all()
print("\n>>> STATS DIM: ", stats_type) print("\n>>> STATS DIM: ", stats_type)
u_data, c_data = np.unique(data_basis[stats_keys], return_counts=True) u_data, c_data = np.unique(data_basis[stats_keys], return_counts=True)
u_table = table.Table(u_data) u_table = table.Table(u_data)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment