-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiff_db.py
More file actions
60 lines (50 loc) · 1.49 KB
/
diff_db.py
File metadata and controls
60 lines (50 loc) · 1.49 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
#!/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 = 10.2;
outname = f'output_ver{ver}/db/diff_db';
dbnames =[
'data/pb2a-20211004/pb2a_mapping.db',
f'output_ver{ver}/db/pb2a_wiregrid_ver{ver}.db',
];
tablenames=[
'pb2a_focalplane',
'pb2a_wiregrid',
];
columns=[
'pol_angle,pixel_type,bolo_name,pixel_name,bolo_type,band,pixel_handedness',
];
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;