Plsek commited on
Commit
92a1036
·
1 Parent(s): e5f8008

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -16
app.py CHANGED
@@ -186,29 +186,35 @@ If you use this tool in your research, please cite <a href='https://arxiv.org/ab
186
  # (<a href='https://cxc.cfa.harvard.edu/ciao/ahelp/dmfilth.html'>dmfilth</a>). <br><br>\
187
 
188
 
189
- # _, col_1, col_2, col_3, _ = st.columns([bordersize, 2.0, 0.5, 0.5, bordersize])
190
 
191
- # with col:
192
- uploaded_file = st.file_uploader("Choose a FITS file", type=['fits'], on_change=reset_threshold)
193
-
194
- # with col_2:
195
- # st.markdown("### Examples")
196
- # NGC4649 = st.button("NGC4649")
197
-
198
- # with col_3:
199
- # st.markdown("""<style>[data-baseweb="select"] {margin-top: 26px;}</style>""", unsafe_allow_html=True)
200
- # NGC5813 = st.button("NGC5813")
201
-
202
- # if NGC4649:
203
- # uploaded_file = "NGC4649_example.fits"
204
- # elif NGC5813:
205
- # uploaded_file = "NGC5813_example.fits"
 
 
 
206
 
207
  # If file is uploaded, read in the data and plot it
208
  if uploaded_file is not None:
209
  data, wcs = load_file(uploaded_file)
210
  os.system(f'mkdir -p {uploaded_file.name.strip(".fits")}')
211
 
 
 
 
212
  if "data" not in locals():
213
  data = np.zeros((128,128))
214
 
 
186
  # (<a href='https://cxc.cfa.harvard.edu/ciao/ahelp/dmfilth.html'>dmfilth</a>). <br><br>\
187
 
188
 
189
+ _, col_1, col_2, _ = st.columns([bordersize, 2.5, 0.5, bordersize])
190
 
191
+ with col_1:
192
+ uploaded_file = st.file_uploader("Choose a FITS file", type=['fits'], on_change=reset_threshold)
193
+
194
+ with col_2:
195
+ example = st.button("Examples")
196
+
197
+ # with col_2:
198
+ # st.markdown("### Examples")
199
+ # NGC4649 = st.button("NGC4649")
200
+
201
+ # with col_3:
202
+ # st.markdown("""<style>[data-baseweb="select"] {margin-top: 26px;}</style>""", unsafe_allow_html=True)
203
+ # NGC5813 = st.button("NGC5813")
204
+
205
+ # if NGC4649:
206
+ # uploaded_file = "NGC4649_example.fits"
207
+ # elif NGC5813:
208
+ # uploaded_file = "NGC5813_example.fits"
209
 
210
  # If file is uploaded, read in the data and plot it
211
  if uploaded_file is not None:
212
  data, wcs = load_file(uploaded_file)
213
  os.system(f'mkdir -p {uploaded_file.name.strip(".fits")}')
214
 
215
+ if example is not None:
216
+ data, wcs = load_file("NGC4649_example.fits")
217
+
218
  if "data" not in locals():
219
  data = np.zeros((128,128))
220