generated from erosita/uds
clean
This commit is contained in:
@@ -39,7 +39,7 @@ from ridge.config import *
|
||||
plotme=False
|
||||
enkey = sys.argv[1]
|
||||
outkey = sys.argv[2]
|
||||
#outkey = "BKG"
|
||||
|
||||
|
||||
fn="detcnts.{}.fits".format(enkey)
|
||||
|
||||
@@ -56,8 +56,6 @@ with open(proddir+fn.replace(".fits",".crabmodel.pkl"), 'rb') as fp:
|
||||
crabmodel, z = pickle.load(fp)
|
||||
p = np.poly1d(z)
|
||||
crabmodel_keys = list(crabmodel.keys())
|
||||
#print(crabmodel)
|
||||
#sys.exit()
|
||||
|
||||
crab_rev_max = np.max(list(crabmodel.keys()))
|
||||
print("Crab is defined untill orbit {}".format(crab_rev_max))
|
||||
@@ -100,8 +98,6 @@ sx=int(hdulist[0].header['NAXIS1'])
|
||||
sy=int(hdulist[0].header['NAXIS2'])
|
||||
|
||||
|
||||
#d = fits.getdata(datadir+fn)
|
||||
#df = pd.DataFrame(np.array(d).byteswap().newbyteorder())
|
||||
|
||||
with fits.open(datadir+fn) as data:
|
||||
df = pd.DataFrame(data[1].data)
|
||||
@@ -121,11 +117,7 @@ if(outkey=='ALL'):
|
||||
df = df.query('REV >= {} & REV< {} & CLEAN > 0.0 & PHASE > {} & PHASE < {}'.format(revmin,revmax,phmin,phmax))
|
||||
print("N={}".format(df.shape[0]))
|
||||
|
||||
"""
|
||||
GAL 70226 ScWs, 111.7 Ms
|
||||
BKG 61214 ScWs, 114.3 Ms
|
||||
Total 131440 ScWs, 225.9 Ms
|
||||
"""
|
||||
|
||||
|
||||
|
||||
# fill AITOF map indexes
|
||||
@@ -213,7 +205,7 @@ for i, row in df.iterrows():
|
||||
|
||||
print("N={} ScWs, {:.1f} Ms".format(len(resid0),np.sum(texp0)/1e6))
|
||||
|
||||
sigma=3
|
||||
|
||||
rev_min=np.min(rev0)
|
||||
rev_max=np.max(rev0)
|
||||
orbits=np.array(rev0)
|
||||
|
Reference in New Issue
Block a user