Skip to content
Snippets Groups Projects

Draft: Resolve "Développer un component dynamique pour afficher une courbe x,y"

@@ -212,6 +212,7 @@ def create_app():
x_column = request.args.get('xcolumn')
y_column = request.args.get('ycolumn')
hdu = request.args.get('hdu')
hdu = int(hdu)
result = dict()
if file_name is None:
return {"message": "Parameter filename is mandatory"}, 400
@@ -225,7 +226,7 @@ def create_app():
file_path = utils.get_file_path(dname, file_name)
with fits.open(file_path) as hdulist:
data = hdulist[1].data
data = hdulist[hdu].data
result = {
"x" : [ float(el) for el in list(data[x_column])],
"y":[ float(el) for el in list(data[y_column])]
Loading