Skip to content

Commit

Permalink
Add pipeline count to the query possibilities.
Browse files Browse the repository at this point in the history
  • Loading branch information
saravia committed Feb 22, 2016
1 parent 4a04950 commit 7079f09
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
application: rgflags
version: 0-1-1
version: 0-1-2
runtime: python27
api_version: 1
threadsafe: true
Expand Down
101 changes: 101 additions & 0 deletions index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
indexes:

# AUTOGENERATED

# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run. If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED"). If you want to manage some indexes
# manually, move them above the marker line. The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.

- kind: Star
properties:
- name: DeltaNu_c
- name: DeltaNu_p
- name: deprDipoles_p
- name: fastRot_p
- name: quarters
- name: DeltaNu_n

- kind: Star
properties:
- name: DeltaNu_c
- name: DeltaNu_p
- name: quarters
- name: DeltaNu_n

- kind: Star
properties:
- name: DeltaP_c
- name: DeltaP_p
- name: deprDipoles_p
- name: fastRot_p
- name: quarters
- name: DeltaP_n

- kind: Star
properties:
- name: DeltaP_c
- name: DeltaP_p
- name: evolState_c
- name: evolState_n
- name: evolState_p
- name: quarters
- name: DeltaP_n

- kind: Star
properties:
- name: DeltaP_c
- name: DeltaP_p
- name: fastRot_p
- name: DeltaP_n

- kind: Star
properties:
- name: DeltaP_c
- name: DeltaP_p
- name: quarters
- name: DeltaP_n

- kind: Star
properties:
- name: deprDipoles_p
- name: evolState_c
- name: evolState_n
- name: evolState_p
- name: numax_c
- name: numax_p
- name: quarters
- name: numax_n

- kind: Star
properties:
- name: deprDipoles_p
- name: fastRot_p
- name: numax_c
- name: numax_p
- name: quarters
- name: numax_n

- kind: Star
properties:
- name: fastRot_p
- name: numax_c
- name: numax_p
- name: quarters
- name: numax_n

- kind: Star
properties:
- name: numax_c
- name: numax_p
- name: numax_n

- kind: Star
properties:
- name: numax_c
- name: numax_p
- name: quarters
- name: numax_n
2 changes: 1 addition & 1 deletion src/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# You should change these if you are registering your own app on App Engine
APP_NAME = "RGFlags"
APP_VERSION = "0.1.1"
APP_VERSION = "0.1.2"
APP_URL = "https://rgflags.appspot.com"
ADMIN_EMAIL = "admin@rgflags.appspotmail.com"
APP_REPO = "https://github.molgen.mpg.de/MPS-SAGE/rgflags"
Expand Down
6 changes: 5 additions & 1 deletion src/seeding.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,30 @@ def post(self):
star.numax_p = parse_TF(col)
elif ppty == "numax_c":
star.numax_c = parse_c(col)
elif ppty == "numax_r":
elif ppty == "numax_r":
star.numax_r = parse_pips(col)
star.numax_n = len(parse_pips(col))
elif ppty == "DeltaNu_p":
star.DeltaNu_p = parse_TF(col)
elif ppty == "DeltaNu_c":
star.DeltaNu_c = parse_c(col)
elif ppty == "DeltaNu_r":
star.DeltaNu_r = parse_pips(col)
star.DeltaNu_n = len(parse_pips(col))
elif ppty == "DeltaP_p":
star.DeltaP_p = parse_TF(col)
elif ppty == "DeltaP_c":
star.DeltaP_c = parse_c(col)
elif ppty == "DeltaP_r":
star.DeltaP_r = parse_pips(col)
star.DeltaP_n = len(parse_pips(col))
elif ppty == "evolState_p":
star.evolState_p = parse_TF(col)
elif ppty == "evolState_c":
star.evolState_c = parse_c(col)
elif ppty == "evolState_r":
star.evolState_r = parse_pips(col)
star.evolState_n = len(parse_pips(col))
elif ppty == "fastRot_p":
star.fastRot_p = parse_TF(col)
elif ppty == "deprDipoles_p":
Expand Down
13 changes: 13 additions & 0 deletions src/starsdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,26 @@ def parse_checkbox(s):
# Suffixes:
# p = has been identified ( True / False)
# c = has been identified consistently (1), with outliers (2), with scattered results (3) or not identified (0)
# n = number of times identified
# r = list of references that identified it
class Star(ndb.Model):
KIC = ndb.IntegerProperty(required = True)
quarters = ndb.IntegerProperty(required = True)
numax_p = ndb.BooleanProperty(default = False)
numax_c = ndb.IntegerProperty(default = False)
numax_n = ndb.IntegerProperty(default = False)
numax_r = ndb.StringProperty(repeated = True)
DeltaNu_p = ndb.BooleanProperty(default = False)
DeltaNu_c = ndb.IntegerProperty(default = False)
DeltaNu_n = ndb.IntegerProperty(default = False)
DeltaNu_r = ndb.StringProperty(repeated = True)
DeltaP_p = ndb.BooleanProperty(default = False)
DeltaP_c = ndb.IntegerProperty(default = False)
DeltaP_n = ndb.IntegerProperty(default = False)
DeltaP_r = ndb.StringProperty(repeated = True)
evolState_p = ndb.BooleanProperty(default = False)
evolState_c = ndb.IntegerProperty(default = False)
evolState_n = ndb.IntegerProperty(default = False)
evolState_r = ndb.StringProperty(repeated = True)
fastRot_p = ndb.BooleanProperty(default = False)
deprDipoles_p = ndb.BooleanProperty(default = False)
Expand All @@ -63,12 +68,16 @@ def post(self):
"quarters" : int(self.request.get("quarters")),
"numax_p" : parse_checkbox(self.request.get("numax_p")),
"numax_c" : parse_pip_disp(self.request.get("numax_c")),
"numax_n" : int(self.request.get("numax_n")),
"DeltaNu_p" : parse_checkbox(self.request.get("DeltaNu_p")),
"DeltaNu_c" : parse_pip_disp(self.request.get("DeltaNu_c")),
"DeltaNu_n" : int(self.request.get("DeltaNu_n")),
"DeltaP_p" : parse_checkbox(self.request.get("DeltaP_p")),
"DeltaP_c" : parse_pip_disp(self.request.get("DeltaP_c")),
"DeltaP_n" : int(self.request.get("DeltaP_n")),
"evolState_p" : parse_checkbox(self.request.get("evolState_p")),
"evolState_c" : parse_pip_disp(self.request.get("evolState_c")),
"evolState_n" : int(self.request.get("evolState_n")),
"fastRot_p" : parse_checkbox(self.request.get("fastRot_p")),
"deprDipoles_p" : parse_checkbox(self.request.get("deprDipoles_p"))
}
Expand All @@ -78,15 +87,19 @@ def post(self):
if kw["numax_p"]:
stars = stars.filter(Star.numax_p == True)
stars = stars.filter(Star.numax_c == kw["numax_c"])
stars = stars.filter(Star.numax_n == kw["numax_n"])
if kw["DeltaNu_p"]:
stars = stars.filter(Star.DeltaNu_p == True)
stars = stars.filter(Star.DeltaNu_c == kw["DeltaNu_c"])
stars = stars.filter(Star.DeltaNu_n == kw["DeltaNu_n"])
if kw["DeltaP_p"]:
stars = stars.filter(Star.DeltaP_p == True)
stars = stars.filter(Star.DeltaP_c == kw["DeltaP_c"])
stars = stars.filter(Star.DeltaP_n == kw["DeltaP_n"])
if kw["evolState_p"]:
stars = stars.filter(Star.evolState_p == True)
stars = stars.filter(Star.evolState_c == kw["evolState_c"])
stars = stars.filter(Star.evolState_n == kw["evolState_n"])
if kw["fastRot_p"]:
stars = stars.filter(Star.fastRot_p == True)
if kw["deprDipoles_p"]:
Expand Down
36 changes: 32 additions & 4 deletions templates/root.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,20 @@ <h2 class="text-center">List of stars with given properties</h2>
$\nu_{\mathrm{max}}$ has been identified
</label>
</div>
<div class="col-sm-8">
<div class="col-sm-4">
<select name="numax_c" class="form-control">
<option value="consistently">Consistently</option>
<option value="outliers">With outliers</option>
<option value="scatter">Scattered results</option>
</select>
</div>
<div class="col-sm-2">
<input type="text" name="numax_n" class="form-control"
placeholder="Number of times" value="1">
</div>
<div class="col-sm-2">
<p>times</p>
</div>
</div>

<div class="form-group">
Expand All @@ -84,13 +91,20 @@ <h2 class="text-center">List of stars with given properties</h2>
$\Delta\nu$ has been identified
</label>
</div>
<div class="col-sm-8">
<div class="col-sm-4">
<select name="DeltaNu_c" class="form-control">
<option value="consistently">Consistently</option>
<option value="outliers">With outliers</option>
<option value="scatter">Scattered results</option>
</select>
</div>
<div class="col-sm-2">
<input type="text" name="DeltaNu_n" class="form-control"
placeholder="Number of times" value="1">
</div>
<div class="col-sm-2">
<p>times</p>
</div>
</div>

<div class="form-group">
Expand All @@ -100,13 +114,20 @@ <h2 class="text-center">List of stars with given properties</h2>
$\Delta P$ has been identified
</label>
</div>
<div class="col-sm-8">
<div class="col-sm-4">
<select name="DeltaP_c" class="form-control">
<option value="consistently">Consistently</option>
<option value="outliers">With outliers</option>
<option value="scatter">Scattered results</option>
</select>
</div>
<div class="col-sm-2">
<input type="text" name="DeltaP_n" class="form-control"
placeholder="Number of times" value="1">
</div>
<div class="col-sm-2">
<p>times</p>
</div>
</div>

<div class="form-group">
Expand All @@ -116,13 +137,20 @@ <h2 class="text-center">List of stars with given properties</h2>
Evolutionary state has been identified
</label>
</div>
<div class="col-sm-8">
<div class="col-sm-4">
<select name="evolState_c" class="form-control">
<option value="consistently">Consistently</option>
<option value="outliers">With outliers</option>
<option value="scatter">Scattered results</option>
</select>
</div>
<div class="col-sm-2">
<input type="text" name="evolState_n" class="form-control"
placeholder="Number of times" value="1">
</div>
<div class="col-sm-2">
<p>times</p>
</div>
</div>

<div class="form-group">
Expand Down

0 comments on commit 7079f09

Please sign in to comment.