Commit 71653eba authored by Arman Khalatyan's avatar Arman Khalatyan
Browse files

Update app.py

parent ad38a194
Pipeline #1165 passed with stages
in 11 minutes and 23 seconds
......@@ -12,7 +12,7 @@ import matplotlib as mpl
@st.cache
def get_data_sql():
def get_data_sql(Nstars=1000):
# init tap service
tap_service = vo.dal.TAPService('https://gaia.aip.de/tap')
#vo.utils.http.session.headers['Authorization'] = 'Your Token '
......@@ -20,8 +20,8 @@ def get_data_sql():
# manage the jobs yourself
jobs = []
limit = 100000
total = 200000
limit = Nstars
total = 2*Nstars
qstr="select source_id,xgal,ygal,zgal,rgal,ruwe,mg0,bprp0 from gdr2_contrib.starhorse as s where s.SH_OUTFLAG LIKE '00000' AND s.SH_GAIAFLAG LIKE '000' "
i=0
for offset in range(0, total, limit):
......@@ -144,9 +144,9 @@ def plot_figure_plotly(df,xname,yname):
st.title('The interactive maps')
st.write('## selected stars parameters')
N = st.slider("Pick a number", 1000, 1000000, 10000,100000)
df = get_data_sql()
map_cols=df.columns
N = st.slider("Pick a number", 1000, 100000, 10000,100000)
df = get_data_sql(N)
map_cols=['xgal','ygal','zgal','rgal','ruwe','mg0','bprp0']
Nstars=len(df)
st.markdown(f"N = **{Nstars}** stars selected by condition in **gendata()** function")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment