teareduce 0.6.5__py3-none-any.whl → 0.6.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,7 @@ import platform
19
19
  from rich import print
20
20
  from rich_argparse import RichHelpFormatter
21
21
 
22
+ from .askextension import ask_extension_input_image
22
23
  from .definitions import DEFAULT_FONT_FAMILY
23
24
  from .definitions import DEFAULT_FONT_SIZE
24
25
  from .definitions import DEFAULT_TK_WINDOW_SIZE_X
@@ -85,17 +86,14 @@ def main():
85
86
  root.withdraw() # Hide the root window
86
87
  args.input_fits = filedialog.askopenfilename(
87
88
  title="Select FITS file to be cleaned",
89
+ initialdir=os.getcwd(),
88
90
  filetypes=[("FITS files", "*.fits *.fit *.fts"), ("All files", "*.*")],
89
91
  )
90
92
  if not args.input_fits:
91
93
  print("No input FITS file selected. Exiting.")
92
94
  exit(1)
93
95
  print(f"Selected input FITS file: {args.input_fits}")
94
- args.extension = simpledialog.askstring(
95
- "Select Extension",
96
- f"\nEnter extension number or name for file:\n{Path(args.input_fits).name}",
97
- initialvalue=args.extension,
98
- )
96
+ args.extension = ask_extension_input_image(args.input_fits, imgshape=None)
99
97
  # Ask for auxiliary file if not provided
100
98
  if args.auxfile is None:
101
99
  use_auxfile = tk.messagebox.askyesno(
@@ -116,11 +114,7 @@ def main():
116
114
  use_auxfile = True
117
115
  if use_auxfile:
118
116
  print(f"Selected auxiliary FITS file: {args.auxfile}")
119
- args.extension_auxfile = simpledialog.askstring(
120
- "Select Extension for Auxiliary File",
121
- f"\nEnter extension number or name for auxiliary file:\n{Path(args.auxfile).name}",
122
- initialvalue=args.extension_auxfile,
123
- )
117
+ args.extension_auxfile = ask_extension_input_image(args.auxfile, imgshape=None)
124
118
  root.destroy()
125
119
 
126
120
  # Check that input files, and the corresponding extensions, exist