-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiff_db_tmp.py
More file actions
69 lines (58 loc) · 1.79 KB
/
diff_db_tmp.py
File metadata and controls
69 lines (58 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/python
import os, sys;
import numpy as np;
from matplotlib import pyplot as plt;
from compare_db import compare_db
if __name__=='__main__' :
ver = 3;
#dbname = 'all_pandas_correct_label';
dbname = 'pb2a_hwpss_ver3';
outname = f'hwpss/output_ver{ver}/db/diff_db_{dbname}';
#ver = 10.2;
#dbname = 'pb2a_wiregrid_hwpss_v3';
#outname = f'output_ver{ver}/db/diff_db_{dbname}';
dbnames =[
'data/pb2a-20211004/pb2a_mapping.db',
f'hwpss/output_ver{ver}/db/{dbname}.db',
#f'output_ver{ver}/db/{dbname}.db',
];
tablenames=[
'pb2a_focalplane',
#'hwpss',
'pb2a_hwpss',
#'pb2a_focalplane',
];
columns=[
'pol_angle,pixel_type,bolo_name,pixel_name,bolo_type,band,pixel_handedness'#,theta_det',
];
if len(columns)==1 : columns = [columns[0] for i in range(len(dbnames))];
suffixes=[
'',
'_1',
];
varnames=[
'bolo_name', # The output diff_db.csv has the detectors with different bolo_name
'pol_angle',
'pixel_type', 'pixel_name', 'bolo_type', 'band', 'pixel_handedness',
];
selections=[
"hardware_map_commit_hash='13decf63ba87f93ae31ae0b3e76dd020c91babd6'",
'',
];
dropNan=[
False,
False,
];
compare_db(
dbnames = dbnames,
tablenames = tablenames,
columns = columns,
varnames = varnames,
selections = selections,
suffixes = suffixes,
dropNan = dropNan,
primarycolumn='readout_name',
outname=outname,
doPlotAll = True,
);
pass;