Skip to content
Draft

Dev #13

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions SERI-QC_with_QCFIT/dataFiles/blankQA0
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Site Identifier:
--- Latitude:
--- Longitude:
--- Elevation:
--- Time Zone:

---Low Airmass-- ---Med Airmass-- --High Airmass--
-MAX- -LFT RGT- -MAX- -LFT RGT- -MAX- -LFT RGT-
KN KT S P S P KN KT S P S P KN KT S P S P

JAN: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
FEB: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
MAR: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
APR: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
MAY: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
JUN: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
JUL: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
AUG: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
SEP: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
OCT: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
NOV: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00
DEC: 00-000 0-00 0-00; 00-000 0-00 0-00; 00-000 0-00 0-00

DEFAULT CONFIGURATION
Integration (minutes):
Data Folder:
Plane:
3-Component Filter:
Comments:
34 changes: 27 additions & 7 deletions SERI-QC_with_QCFIT/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,40 @@ def close():

def getPath(format):
root = tk.Tk()
root.withdraw()
root.title("Select Input File")
root.resizable(False, False)

# Keep a small visible host window centered so macOS places the file dialog correctly.
root.update_idletasks()
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
dialog_width = 360
dialog_height = 120
center_x = int((screen_width - dialog_width) / 2)
center_y = int((screen_height - dialog_height) / 2)
root.geometry(f"{dialog_width}x{dialog_height}+{center_x}+{center_y}")
tk.Label(root, text="Opening file browser...", padx=20, pady=20).pack()

# Bring host to the front before opening the native dialog.
root.lift()
root.attributes('-topmost', True)
root.update()
if format == "qc0":
path = tkinter.filedialog.askopenfilename(parent=root, initialdir="/", title='Upload QC0 file',
filetypes=(("QC0 files", "*.QC0"), ("all files", "*.*")))
root.attributes('-topmost', False)

path = ""
if format == "qa0":
path = tkinter.filedialog.askopenfilename(parent=root, initialdir=os.getcwd(), title='Upload QA0 file',
filetypes=(("QA0 files", "*.QA0"), ("all files", "*.*")))
if format == "csv":
path = tkinter.filedialog.askopenfilename(parent=root, initialdir="/", title='Upload CSV file',
path = tkinter.filedialog.askopenfilename(parent=root, initialdir=os.getcwd(), title='Upload CSV file',
filetypes=(("csv files", "*.csv"), ("all files", "*.*")))

root.destroy()

if len(path) < 1:
messagebox.showerror("Error", "File not provided. Please Try Again.")
root.after(3, root.destroy())
sys.exit()
root.after(1, root.destroy())

return path


Expand Down
Loading