-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakeShapeCut.py
More file actions
34 lines (24 loc) · 959 Bytes
/
makeShapeCut.py
File metadata and controls
34 lines (24 loc) · 959 Bytes
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
'''
AUTHOR
Alexa Villaume, UCSC
PURPOSE
To find the point-source objects in a catalog and make a
cut to only include them
INPUT PARAMETERS
The catalog for the cuts to be made ont
FILES CREATED
Shape cut catalog
NOTES
This is very incomplete. As of now you need to know where to make the
cut. Plan to make this more complete and interactive.
'''
# Make histogram of a_world values and cut below peak
output = open("shapecutCatalog.txt" , "w")
with open('temp.txt', 'r') as f:
for object in (raw.strip().split() for raw in f):
if float(object[11]) < 2e-4:
output.write("%10s" % object[0] + "%12s" % object[1] + "%12s" % object[2]
+ "%10s" % object[3] + "%13s" % object[4] + "%10s" % object[5]
+ "%13s" % object[6]+ "%10s" % object[7] + "%13s" % object[8]
+ "%10s" % object[9] + "%13s" % object[10] + "%13s" % object[11] +
"%13s" % object[12] + "\n")