Commit b79c283b authored by Félix Hartmann's avatar Félix Hartmann
Browse files

Cleaning and minor fixes.

parent 318016a8
......@@ -506,7 +506,6 @@ def show_image_list():
if tk_toplevel_listimages is None:
tk_toplevel_listimages = Tk.Toplevel(master=root)
tk_toplevel_listimages.title(_("List of open images"))
# tk_toplevel_listimages.title(_("Liste des images ouvertes"))
topsbar = Tk.Scrollbar(tk_toplevel_listimages, orient=Tk.VERTICAL)
listb = Tk.Listbox(master=tk_toplevel_listimages,
......@@ -640,7 +639,6 @@ def _export_xytemps_to_csv():
parent=root,
filetypes=[("Comma Separated Value, csv","*.csv")],
title=_("Export skeleton"),
#title=_("Export squelette"),
initialfile=proposed_filename,
initialdir=base_dir_path)
......@@ -1127,7 +1125,6 @@ def export_one_tige():
tige_name = h5store.get_tiges_names(hdf5file, hdf_tige_id)
proposed_filename = "tige_%s_image_%i.csv"%(tige_name, cur_image+1)
start_title = _("Export data from organ")
#start_title = _("Export de données de l'organe")
outfileName = filedialog.asksaveasfilename(
parent=toptige,
filetypes=[("Comma Separated Value, csv","*.csv")],
......@@ -1205,31 +1202,26 @@ def show_tige_options():
#Case pour changer nom de la tige
idframe = Tk.Frame(toptige)
Tk.Label(idframe, text=_("Organ name:")).pack(fill='x', expand=True)
#Tk.Label(idframe, text=_("Nom de l'organe :")).pack(fill='x', expand=True)
tktigeid = Tk.Entry(idframe)
tktigeid.insert(0, str(tige_name))
tktigeid.pack(fill='x', expand=True)
Tk.Label(idframe, text=_("Threshold sensitivity:")).pack(fill='x', expand=True)
#Tk.Label(idframe, text=_("Sensibilité du seuil :")).pack(fill='x' expand=True)
#Tk.Label(idframe, text=_("Sensibilité du seuil\n (offset n x seuil):")).pack(fill='x' expand=True)
tk_tige_offset = Tk.DoubleVar()
if seuil is not None:
tk_tige_offset.set(seuil)
#label = Tk.Label(idframe, textvariable=tk_tige_offset).pack(fill='x', expand=True)
w2 = Tk.Scale(idframe, from_=-5, to=5, resolution=0.1, variable=tk_tige_offset,
orient=Tk.HORIZONTAL)
w2.pack(fill='x', expand=True)
Tk.Button(idframe, text=_("Save"), command=save_tige_options).pack(fill='x', expand=True)
#Tk.Button(idframe, text="Sauvegarder", command=save_tige_options).pack(fill='x', expand=True)
Tk.Button(idframe, text=_("Save"),
command=save_tige_options).pack(fill='x', expand=True)
idframe.pack(fill='x', expand=True)
start_text = _("Export organ at")
#start_text = _("Exporter l'organe à")
end_text = _("to csv.")
tigebutton_export = Tk.Button(master=toptige,
text=start_text+" t=%i "%(cur_image+1)+end_text,
......@@ -1607,10 +1599,8 @@ def show_growth_rate():
# Creating the figure
start_title = _("Estimation of the growth rate for organ")
#start_title = _("Estimation du taux de croissance pour l'organe")
fig_growth_rate = mpl.figure(start_title + " %i"%(cur_tige+1), figsize=(12, 10))
# grid = mpl.GridSpec(3, 3, wspace=.4, hspace=.4)
grid = mpl.GridSpec(3, 3)
# Subplot with tige profiles
......@@ -2664,7 +2654,7 @@ def show_gamma(tige_id=None, pas=0.3):
RER_unit_tex = growth_data["RER_unit_tex"].astype(str)
if RER_unit_tex != gamma_unit_tex:
msg = _("""Units of relative growth rate and gamma do not match. """
"""Compute the growth rate again..""")
"""Compute the growth rate again.""")
# msg = _("""Les unités de taux de croissance et de gamma ne """
# """correspondent pas. Recalculez la croissance.""")
messagebox.showerror(strings["Unit mismatch"], msg)
......@@ -3486,7 +3476,7 @@ class Interekt:
#Plot menu
plotmenu = Tk.Menu(menubar, tearoff=0)
plotmenu.add_command(label=_("Time series"), command=plot_moyenne)
menubar.add_cascade(label="Figures", menu=plotmenu)
menubar.add_cascade(label=_("Figures"), menu=plotmenu)
#Options menu
options_menu = Tk.Menu(menubar)
......@@ -4494,7 +4484,8 @@ class Interekt:
if process:
reset_graph_data()
# Launching conversion
convert_pkl_to_hdf(files[0], output_hdf5_file)
convert_pkl_to_hdf(files[0], output_hdf5_file,
display_message=True)
# Loading the newly created file
load_hdf5_file(hdf5file)
......@@ -4695,7 +4686,7 @@ if __name__ == '__main__':
# If a data file has been given in command line
if len(sys.argv) > 1 and '.h5' in sys.argv[1]:
hdf5file = sys.argv[1]
hdf5file = sys.argv[1]
def onclose():
root.destroy()
......
Supports Markdown
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