Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FineTooth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansel Neunzert
FineTooth
Commits
bb3e63b6
Commit
bb3e63b6
authored
Nov 2, 2016
by
Ansel Neunzert
Browse files
Options
Downloads
Patches
Plain Diff
Minor changes in auto comb find script to handle case of no combs
parent
e421080e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
autoCombFind.sh
+7
-5
7 additions, 5 deletions
autoCombFind.sh
findComb.py
+5
-2
5 additions, 2 deletions
findComb.py
with
12 additions
and
7 deletions
autoCombFind.sh
+
7
−
5
View file @
bb3e63b6
#!/bin/bash
#!/bin/bash
source
/home/aneunzert/
gwpybokeh
/bin/activate
source
/home/aneunzert/
test
/bin/activate
TEMP_DIR
=
~/public_html/latest/
TEMP_DIR
=
~/public_html/latest/
CONSEC
=
4
CONSEC
=
4
...
@@ -9,13 +9,15 @@ echo "Removing old file from temp directory..."
...
@@ -9,13 +9,15 @@ echo "Removing old file from temp directory..."
rm
$TEMP_DIR
/
*
rm
$TEMP_DIR
/
*
echo
"Finding latest spectrum file and copying to temp directory..."
echo
"Finding latest spectrum file and copying to temp directory..."
RECENTSPECT
=
$(
ls
~/public_html/comb_plots/combCheck
*
_
fscan_
cumulsince_2016-09-18/
*
|
grep
dat_ |
tail
-n1
)
RECENTSPECT
=
$(
ls
-tr
~/public_html/comb_plots/combCheck
*
_cumulsince_2016-09-18/
*
|
grep
dat_ |
tail
-n1
)
echo
$RECENTSPECT
>
$TEMP_DIR
/foundcombs.txt
echo
$RECENTSPECT
>
$TEMP_DIR
/foundcombs.txt
cp
$RECENTSPECT
$TEMP_DIR
cp
$RECENTSPECT
$TEMP_DIR
RECENTSPECT
=
$(
ls
-t
$TEMP_DIR
/
*
|
head
-n1
)
RECENTSPECT
=
$(
ls
-t
$TEMP_DIR
/
*
|
head
-n1
)
echo
"Running comb finding algorithm..."
echo
"Running comb finding algorithm..."
COMBSTATS
=
$(
python findComb.py
--inputfile
=
$RECENTSPECT
--knowncombfile
=
"preER10combs.txt"
--fmin
0
--fmax
100
--spacingmin
0.3
--spacingmax
20
--scalerange
10
--nmostcommoncombs
1000
--ntoppeaks
1000
--consecutive
$CONSEC
--checkrange
1
--printmaxstat
True
--printmax
10 |
tail
-n2
)
COMBSTATS
=
$(
python findComb.py
--inputfile
=
$RECENTSPECT
--knowncombfile
=
"preER10combnotes.txt"
--fmin
0
--fmax
100
--spacingmin
0.3
--spacingmax
20
--scalerange
30
--nmostcommoncombs
1000
--ntoppeaks
1000
--consecutive
$CONSEC
--checkrange
1
--printmaxstat
True
--printmax
10 |
tail
-n2
)
echo
$COMBSTATS
TAGCOMBS
=
$(
echo
"
$COMBSTATS
"
|
tail
-n1
)
TAGCOMBS
=
$(
echo
"
$COMBSTATS
"
|
tail
-n1
)
MAXSTAT
=
$(
echo
"
$COMBSTATS
"
|
head
-n1
)
MAXSTAT
=
$(
echo
"
$COMBSTATS
"
|
head
-n1
)
...
@@ -36,13 +38,13 @@ fi
...
@@ -36,13 +38,13 @@ fi
SUMMARY
=
"<h2> Unidentified comb alerts </h2>
SUMMARY
=
"<h2> Unidentified comb alerts </h2>
<p>Probability of unidentified comb(s) in the latest cumulative spectrum:
${
ALERTMSG
}
<p>Probability of unidentified comb(s) in the latest cumulative spectrum:
${
ALERTMSG
}
<br>Plot showing the top comb candidates (max 10): <span><a href='https://ldas-jobs.ligo-
w
a.caltech.edu/~aneunzert/latest/
H
1:LSC-DARM_OUT_DQ.html' target='_blank'>here</a></span>"
<br>Plot showing the top comb candidates (max 10): <span><a href='https://ldas-jobs.ligo-
l
a.caltech.edu/~aneunzert/latest/
L
1:LSC-DARM_OUT_DQ.html' target='_blank'>here</a></span>"
echo
"
$SUMMARY
"
>
$TEMP_DIR
/summary.txt
echo
"
$SUMMARY
"
>
$TEMP_DIR
/summary.txt
echo
"Plotting..."
echo
"Plotting..."
python chplot.py
--truefcutoff
=
True
--fmin
0
--fmax
100
--consecutive
$CONSEC
--checkrange
1
--overwrite
=
True
--scalerange
=
0
--knowncombfile
=
"preER10combs.txt"
--tagcombs
$TAGCOMBS
--inputfolder
$TEMP_DIR
python chplot.py
--truefcutoff
=
True
--fmin
0
--fmax
100
--consecutive
$CONSEC
--checkrange
1
--overwrite
=
True
--scalerange
=
0
$TAGCOMBS
--inputfolder
$TEMP_DIR
HTMLFILE
=
$(
ls
$TEMP_DIR
/
*
.html
)
HTMLFILE
=
$(
ls
$TEMP_DIR
/
*
.html
)
...
...
This diff is collapsed.
Click to expand it.
findComb.py
+
5
−
2
View file @
bb3e63b6
...
@@ -72,7 +72,7 @@ def main():
...
@@ -72,7 +72,7 @@ def main():
nConsecReq
=
args
.
consecutive
,
nCheckAdj
=
args
.
checkrange
,
verbose
=
args
.
verbose
,
showBeforeZeroing
=
args
.
showbeforezero
,
nConsecReq
=
args
.
consecutive
,
nCheckAdj
=
args
.
checkrange
,
verbose
=
args
.
verbose
,
showBeforeZeroing
=
args
.
showbeforezero
,
zeroInds
=
knownLineInds
,
threshold
=
args
.
threshold
)
zeroInds
=
knownLineInds
,
threshold
=
args
.
threshold
)
if
args
.
printmaxstat
:
if
args
.
printmaxstat
and
len
(
combs
)
>
0
:
print
(
combs
[
0
][
'
str
'
])
print
(
combs
[
0
][
'
str
'
])
if
args
.
printwithstat
:
if
args
.
printwithstat
:
...
@@ -84,7 +84,10 @@ def main():
...
@@ -84,7 +84,10 @@ def main():
n
=
min
(
args
.
printmax
,
len
(
combs
))
n
=
min
(
args
.
printmax
,
len
(
combs
))
for
i
in
combs
[:
n
]:
for
i
in
combs
[:
n
]:
l
+=
"
\"
{:.6f},{:.6f}
\"
"
.
format
(
i
[
'
sp
'
],
i
[
'
off
'
])
l
+=
"
\"
{:.6f},{:.6f}
\"
"
.
format
(
i
[
'
sp
'
],
i
[
'
off
'
])
print
(
l
)
if
len
(
l
)
>
0
:
print
(
"
--tagcombs
"
+
l
)
else
:
print
(
"
"
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment