teareduce 0.6.6__py3-none-any.whl → 0.6.7__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.
@@ -372,9 +372,9 @@ class CosmicRayCleanerApp(ImageDisplay):
372
372
  # --- DeepCR button
373
373
  self.run_deepcr_button = tkbutton.new(
374
374
  self.button_frame1,
375
- text="Run DeepCR",
375
+ text="Run deepCR",
376
376
  command=self.run_deepcr,
377
- help_text="Run the DeepCR algorithm to detect cosmic rays in the image.",
377
+ help_text="Run the deepCR algorithm to detect cosmic rays in the image.",
378
378
  )
379
379
  self.run_deepcr_button.pack(side=tk.LEFT, padx=5)
380
380
  # --- Cosmic-CoNN button
@@ -677,7 +677,7 @@ class CosmicRayCleanerApp(ImageDisplay):
677
677
  "Dilation", "Enter Dilation (min=0):", initialvalue=0, minvalue=0
678
678
  )
679
679
  self.process_detected_cr(dilation=dilation)
680
- self.cleandata_deepcr = None # Invalidate previous DeepCR cleaned data
680
+ self.cleandata_deepcr = None # Invalidate previous deepCR cleaned data
681
681
  self.cleandata_lacosmic = None # Invalidate previous L.A.Cosmic cleaned data
682
682
  self.cleandata_pycosmic = None # Invalidate previous PyCosmic cleaned data
683
683
  except Exception as e:
@@ -1189,7 +1189,7 @@ class CosmicRayCleanerApp(ImageDisplay):
1189
1189
  self.save_crmask_button.config(state=tk.NORMAL)
1190
1190
 
1191
1191
  def run_deepcr(self):
1192
- """Run DeepCR to detect cosmic rays."""
1192
+ """Run deepCR to detect cosmic rays."""
1193
1193
  if np.any(self.mask_crfound):
1194
1194
  overwrite = messagebox.askyesno(
1195
1195
  "Overwrite Cosmic Ray Mask",
@@ -1198,23 +1198,23 @@ class CosmicRayCleanerApp(ImageDisplay):
1198
1198
  if not overwrite:
1199
1199
  return
1200
1200
  self.run_deepcr_button.config(state=tk.DISABLED)
1201
- print("[bold green]Executing DeepCR...[/bold green]")
1202
- # Initialize the DeepCR model
1201
+ print("[bold green]Executing deepCR...[/bold green]")
1202
+ # Initialize the deepCR model
1203
1203
  mdl = deepCR.deepCR(mask=self.deepcr_params["mask"]["value"])
1204
1204
  # Ask for threshold value and update parameter
1205
1205
  threshold = simpledialog.askfloat(
1206
1206
  "Threshold",
1207
- "Enter DeepCR probability threshold (0.0 - 1.0):",
1207
+ "Enter deepCR probability threshold (0.0 - 1.0):",
1208
1208
  initialvalue=self.deepcr_params["threshold"]["value"],
1209
1209
  minvalue=0.0,
1210
1210
  maxvalue=1.0,
1211
1211
  )
1212
1212
  if threshold is None:
1213
- print("Threshold input cancelled. DeepCR detection skipped!")
1213
+ print("Threshold input cancelled. deepCR detection skipped!")
1214
1214
  self.run_deepcr_button.config(state=tk.NORMAL)
1215
1215
  return
1216
1216
  self.deepcr_params["threshold"]["value"] = threshold
1217
- print(f"Running DeepCR version: {deepCR.__version__} (please wait...)", end="")
1217
+ print(f"Running deepCR version: {deepCR.__version__} (please wait...)", end="")
1218
1218
  self.mask_crfound, self.cleandata_deepcr = mdl.clean(
1219
1219
  self.data,
1220
1220
  threshold=self.deepcr_params["threshold"]["value"],
@@ -1224,16 +1224,16 @@ class CosmicRayCleanerApp(ImageDisplay):
1224
1224
  # Process the mask: dilation and labeling
1225
1225
  dilation = simpledialog.askinteger(
1226
1226
  "Dilation",
1227
- "Note: Applying dilation will prevent the use of the DeepCR cleaned data.\n\n" "Enter Dilation (min=0):",
1227
+ "Note: Applying dilation will prevent the use of the deepCR cleaned data.\n\n" "Enter Dilation (min=0):",
1228
1228
  initialvalue=self.deepcr_params["dilation"]["value"],
1229
1229
  minvalue=0,
1230
1230
  )
1231
1231
  if dilation is None:
1232
- print("Dilation input cancelled. DeepCR detection skipped!")
1232
+ print("Dilation input cancelled. deepCR detection skipped!")
1233
1233
  self.run_deepcr_button.config(state=tk.NORMAL)
1234
1234
  return
1235
1235
  if dilation > 0:
1236
- self.cleandata_deepcr = None # Invalidate DeepCR cleaned data if dilation applied
1236
+ self.cleandata_deepcr = None # Invalidate deepCR cleaned data if dilation applied
1237
1237
  self.deepcr_params["dilation"]["value"] = dilation
1238
1238
  self.process_detected_cr(dilation=self.deepcr_params["dilation"]["value"])
1239
1239
  # Invalidate previous cleaned data from other methods
@@ -135,9 +135,9 @@ VALID_CLEANING_METHODS = {
135
135
  "surface interp.": "a-plane",
136
136
  "median": "a-median",
137
137
  "mean": "a-mean",
138
- "lacosmic": "lacosmic",
139
- "pycosmic": "pycosmic",
140
- "deepcr": "deepcr",
138
+ "L.A.Cosmic": "lacosmic",
139
+ "PyCosmic": "pycosmic",
140
+ "deepCR": "deepcr",
141
141
  "maskfill": "maskfill",
142
142
  "auxdata": "auxdata",
143
143
  }
@@ -70,7 +70,7 @@ class InterpolationEditor:
70
70
  cleandata_pycosmic : array-like or None
71
71
  Cleaned data from PyCosmic, if available.
72
72
  cleandata_deepcr : array-like or None
73
- Cleaned data from DeepCR, if available.
73
+ Cleaned data from deepCR, if available.
74
74
  xmin : float
75
75
  Minimum x value of the data. From 1 to NAXIS1.
76
76
  xmax : float
@@ -106,7 +106,7 @@ class InterpolationEditor:
106
106
  cleandata_pycosmic : array-like or None
107
107
  Cleaned data from PyCosmic, if available.
108
108
  cleandata_deepcr : array-like or None
109
- Cleaned data from DeepCR, if available.
109
+ Cleaned data from deepCR, if available.
110
110
  dict_interp_methods : dict
111
111
  Mapping of interpolation method names to their codes.
112
112
  cleaning_method : str or None
@@ -182,17 +182,17 @@ class InterpolationEditor:
182
182
  state = "normal"
183
183
  # Skip replace by L.A.Cosmic values if last dilation is not zero
184
184
  # or cleandata_lacosmic is not available
185
- if interp_method == "lacosmic":
185
+ if interp_method == "L.A.Cosmic":
186
186
  if self.last_dilation != 0:
187
187
  state = "disabled"
188
188
  if self.cleandata_lacosmic is None:
189
189
  state = "disabled"
190
190
  # Skip replace by PyCosmic values if cleandata_pycosmic is not available
191
- elif interp_method == "pycosmic":
191
+ elif interp_method == "PyCosmic":
192
192
  if self.cleandata_pycosmic is None:
193
193
  state = "disabled"
194
- # Skip replace by DeepCR values if cleandata_deepcr is not available
195
- elif interp_method == "deepcr":
194
+ # Skip replace by deepCR values if cleandata_deepcr is not available
195
+ elif interp_method == "deepCR":
196
196
  if self.cleandata_deepcr is None:
197
197
  state = "disabled"
198
198
  # Skip auxdata method if auxdata is not available
@@ -475,7 +475,7 @@ class InterpolationEditor:
475
475
  self.entry_maskfill_operator.config(state="disabled")
476
476
  self.entry_maskfill_smooth.config(state="disabled")
477
477
  self.entry_maskfill_verbose.config(state="disabled")
478
- elif selected_method in ["lacosmic", "pycosmic", "deepcr", "auxdata"]:
478
+ elif selected_method in ["L.A.Cosmic", "PyCosmic", "deepCR", "auxdata"]:
479
479
  self.entry_npoints.config(state="disabled")
480
480
  self.entry_degree.config(state="disabled")
481
481
  self.entry_maskfill_size.config(state="disabled")
@@ -91,7 +91,7 @@ class ReviewCosmicRay(ImageDisplay):
91
91
  cleandata_pycosmic: 2D numpy array or None
92
92
  The cleaned image data from PyCosmic.
93
93
  cleandata_deepcr: 2D numpy array or None
94
- The cleaned image data from DeepCR.
94
+ The cleaned image data from deepCR.
95
95
  cr_labels : 2D numpy array
96
96
  Labels of connected cosmic ray pixel groups.
97
97
  num_features : int
@@ -167,7 +167,7 @@ class ReviewCosmicRay(ImageDisplay):
167
167
  cleandata_pycosmic: 2D numpy array or None
168
168
  The cleaned image data from PyCosmic.
169
169
  cleandata_deepcr: 2D numpy array or None
170
- The cleaned image data from DeepCR.
170
+ The cleaned image data from deepCR.
171
171
  cr_labels : 2D numpy array
172
172
  Labels of connected cosmic ray pixel groups.
173
173
  num_features : int
@@ -360,7 +360,7 @@ class ReviewCosmicRay(ImageDisplay):
360
360
  # --- Interpolation using L.A.Cosmic button
361
361
  self.interp_l_button = tkbutton.new(
362
362
  self.button_frame3,
363
- text="[l]acosmic",
363
+ text="[L].A.Cosmic",
364
364
  command=self.use_lacosmic,
365
365
  help_text="Use L.A.Cosmic interpolation for the current cosmic ray.",
366
366
  )
@@ -384,7 +384,7 @@ class ReviewCosmicRay(ImageDisplay):
384
384
  self.button_frame3,
385
385
  text="deepCR",
386
386
  command=self.use_deepcr,
387
- help_text="Use DeepCR interpolation for the current cosmic ray.",
387
+ help_text="Use deepCR interpolation for the current cosmic ray.",
388
388
  )
389
389
  self.interp_deepcr_button.pack(side=tk.LEFT, padx=5)
390
390
  if self.cleandata_deepcr is None:
@@ -745,11 +745,11 @@ class ReviewCosmicRay(ImageDisplay):
745
745
  self.update_display(cleaned=True)
746
746
 
747
747
  def use_deepcr(self):
748
- """Use DeepCR cleaned data to clean a cosmic ray."""
748
+ """Use deepCR cleaned data to clean a cosmic ray."""
749
749
  if self.cleandata_deepcr is None:
750
- print("DeepCR cleaned data not available.")
750
+ print("deepCR cleaned data not available.")
751
751
  return
752
- print(f"DeepCR interpolation of cosmic ray {self.cr_index}")
752
+ print(f"deepCR interpolation of cosmic ray {self.cr_index}")
753
753
  ycr_list, xcr_list = np.where(self.cr_labels == self.cr_index)
754
754
  for iy, ix in zip(ycr_list, xcr_list):
755
755
  self.data[iy, ix] = self.cleandata_deepcr[iy, ix]
teareduce/version.py CHANGED
@@ -9,7 +9,7 @@
9
9
  #
10
10
  """Module to define the version of the teareduce package."""
11
11
 
12
- VERSION = '0.6.6'
12
+ VERSION = '0.6.7'
13
13
 
14
14
 
15
15
  def main():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: teareduce
3
- Version: 0.6.6
3
+ Version: 0.6.7
4
4
  Summary: Utilities for astronomical data reduction
5
5
  Author-email: Nicolás Cardiel <cardiel@ucm.es>
6
6
  License: GPL-3.0-or-later
@@ -39,7 +39,7 @@ Dynamic: license-file
39
39
 
40
40
  # teareduce
41
41
 
42
- [![Teareduce's PyPI version](https://badge.fury.io/py/teareduce.svg)](https://badge.fury.io/py/teareduce)
42
+ [![Teareduce's PyPI version](https://badge.fury.io/py/teareduce.svg?kill_cache=1)](https://badge.fury.io/py/teareduce)
43
43
 
44
44
  Utilities for astronomical data reduction.
45
45
 
@@ -72,13 +72,6 @@ $ . venv_teareduce/bin/activate
72
72
  (venv_teareduce) $
73
73
  ```
74
74
 
75
- If you are planning to use **tea-cleanest**, you need to install this package
76
- with extra dependencies. In this case employ:
77
-
78
- ```shell
79
- (venv_teareduce) $ pip install 'teareduce[cleanest]'
80
- ```
81
-
82
75
  ### Installing the package
83
76
 
84
77
  The latest stable version is available via de [PyPI repository](https://pypi.org/project/teareduce/):
@@ -96,6 +89,20 @@ The latest development version is available through [GitHub](https://github.com/
96
89
  (venv_teareduce) $ pip install git+https://github.com/nicocardiel/teareduce.git@main#egg=teareduce
97
90
  ```
98
91
 
92
+ If you are planning to use **tea-cleanest**, you need to install this package
93
+ with extra dependencies. In this case employ:
94
+
95
+ ```shell
96
+ (venv_teareduce) $ pip install 'teareduce[cleanest]'
97
+ ```
98
+
99
+ In addition, in order to make use of the **PyCosmic** algorithm with
100
+ `tea-cleanest`, you need to install that package. This can be done using:
101
+
102
+ ```shell
103
+ (venv_teareduce) $ pip install git+https://github.com/nicocardiel/PyCosmic.git@test
104
+ ```
105
+
99
106
  ### Testing the installation
100
107
 
101
108
  ```shell
@@ -106,7 +113,7 @@ The latest development version is available through [GitHub](https://github.com/
106
113
  (venv_teareduce) $ ipython
107
114
  In [1]: import teareduce as tea
108
115
  In [2]: print(tea.__version__)
109
- 0.5.9
116
+ 0.6.6
110
117
  ```
111
118
 
112
119
  Note that in PyPI there is a package called **tea** that provides utilities
@@ -15,7 +15,7 @@ teareduce/sdistortion.py,sha256=z7GX7MMkWhexUJn4VqsSOXLNsZTSdoaCzl9ukW1XlaA,5912
15
15
  teareduce/simulateccdexposure.py,sha256=cdbpca6GVuM3d7R1LGzlIZZvjTq_jzrlkk_Cli7aouQ,24636
16
16
  teareduce/sliceregion.py,sha256=Jdf8XvmGaY_vaY1cneTaRtSOYPxpUsJm9cXJDDMa0YM,18626
17
17
  teareduce/statsummary.py,sha256=vtM0ZtKI1-uw6zZyNwDkBGDS_hOdBcFCtpMzdSrLwIw,5418
18
- teareduce/version.py,sha256=BmttN-OFIHBPLpMVvra9qYVBs5IgEuSYtkX_lx5o5Mg,419
18
+ teareduce/version.py,sha256=8psShacK0WzaM79p4Rair67yUDV-GOTkCBpwHQK6J2M,419
19
19
  teareduce/wavecal.py,sha256=nu0iYM2475pJr3btODa5T8XKgNVA-kc8Fsio9Oe2biY,68582
20
20
  teareduce/write_array_to_fits.py,sha256=kWDrEH9coJ1yIu56oQJpWtDqJL4c8HGmssE9jle4e94,617
21
21
  teareduce/zscale.py,sha256=SDgmcDD2N5GvDn46JADCgTQJPBF_N_jSKMHoeTz9Nsw,1152
@@ -23,8 +23,8 @@ teareduce/cleanest/__init__.py,sha256=1rcfu97uqj3R-OZbU9HHLYaTzWkS-poRFBBy8nuH7p
23
23
  teareduce/cleanest/__main__.py,sha256=sTMk3vEfGYcF58MjVZaycWk3jRLIS1vYK2qp40EcTNA,5904
24
24
  teareduce/cleanest/askextension.py,sha256=Q6mGLA6ajUcDU4gsVA4P78GsPei0c7iZK1f7SfK9iVo,3014
25
25
  teareduce/cleanest/centerchildparent.py,sha256=wHxOvNrrQ-KBLZAbtQ9bJAxYhGOzqYBF4LgdIQk7UF8,1285
26
- teareduce/cleanest/cosmicraycleanerapp.py,sha256=6Qlc4A-PlFj_2gEwAX8_6xkacrAjsetORe_BCA5EawQ,80965
27
- teareduce/cleanest/definitions.py,sha256=LkU5AaL49TZH3N3ke84ilRmH2ev2Naf9Bi8SpMaPIpo,7780
26
+ teareduce/cleanest/cosmicraycleanerapp.py,sha256=cI2Ywu93zq3MMSIpbFSP3n4JxAdkr2aogJuNgnCzX5A,80965
27
+ teareduce/cleanest/definitions.py,sha256=pq_ZYEn16nvNMdvkOD71PB0Y4p1tIaNJFYd8hsq59Nc,7782
28
28
  teareduce/cleanest/dilatemask.py,sha256=I5tHAv5VEO6V0Wed8Ar20uLt4F9P-tgjmLL5BAaFvgM,1276
29
29
  teareduce/cleanest/find_closest_true.py,sha256=mWdIvhipzAXDRKfePDrP7f0lP4U48cckpHiKwiB4jHI,1320
30
30
  teareduce/cleanest/gausskernel2d_elliptical.py,sha256=f6AT0ZHmLCd83NAIyyJ8ODlihMeeTkmvNnUSK3vjP9I,1606
@@ -33,12 +33,12 @@ teareduce/cleanest/interpolate.py,sha256=eB9pVkEyJsNorKKV4Dx-j0UldBV6bgWSQBosYka
33
33
  teareduce/cleanest/interpolation_a.py,sha256=iyAEbh0Bf74OfAVhZjSvP3cO7pDC8eVDrVnDUd18FZQ,4030
34
34
  teareduce/cleanest/interpolation_x.py,sha256=MZhtlZZuMLvLnOK0EsLkJM3_dpyNHsxQL_BU1vLt9Lw,3767
35
35
  teareduce/cleanest/interpolation_y.py,sha256=ZX1Uv3FOxoLHtuR_yspcSA5B81CK_J0oNJ1ztzp0l5g,3782
36
- teareduce/cleanest/interpolationeditor.py,sha256=89xMDrCrPtKykdePHv1clHHqV24T0lfNsgC0QrpUtKY,20604
36
+ teareduce/cleanest/interpolationeditor.py,sha256=W6FCa8YvaPMyRcX6q_WrRzEjs5Hb4t0rzepMir5tFlA,20608
37
37
  teareduce/cleanest/lacosmicpad.py,sha256=Ox6XpgZ7O_HmSth-6IiTY09NuskqMu0NfMjZBTbb1h0,7607
38
38
  teareduce/cleanest/mergemasks.py,sha256=TdbfQl5ETxtyFfod0WCD7Czzmgt-WxYOk3hpLqGNOTQ,2620
39
39
  teareduce/cleanest/modalprogressbar.py,sha256=uwd-p92PvOVJnbXd-B8DRcBZ--keKpr4ZN9PLeqm1Ws,6449
40
40
  teareduce/cleanest/parametereditor.py,sha256=XvJuvwhkeGyqZHESz0rdkAydBqnJQmKP2YwUz1H4bzE,41818
41
- teareduce/cleanest/reviewcosmicray.py,sha256=e0tpyHAPwr_F8arcFGvT-s9cOXJBFfTdsWfYgcEu_mU,40559
41
+ teareduce/cleanest/reviewcosmicray.py,sha256=4onD7sUwgHaFPhrnNkLK3ivNA68Qc_DS3RC6G0n1xW4,40561
42
42
  teareduce/cleanest/trackedbutton.py,sha256=r6Mzhb24c3HaJdvGGGFLn7cF9n4TgsKYc_yfcYIyB4g,2348
43
43
  teareduce/cookbook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  teareduce/cookbook/get_cookbook_file.py,sha256=vde-iNii2lm1QII8GmLRsFsKNxkdsd7njCBE-8Z7io0,1088
@@ -46,9 +46,9 @@ teareduce/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  teareduce/tests/test_cleanest.py,sha256=6dRqkw1RQMKsFrC8cEweMvTD6wXhiDv3P4PS57-HEqI,5598
47
47
  teareduce/tests/test_sliceregion.py,sha256=S7Zoh2eEBFIEbfsXgWBEMCf7pottjw2oLhqlZJQkAwg,3785
48
48
  teareduce/tests/test_version.py,sha256=mKLnbXyvVNc1pATq5PxR8qeoFMPAFL_GilFV6IHLOi0,172
49
- teareduce-0.6.6.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
50
- teareduce-0.6.6.dist-info/METADATA,sha256=ft_m9sDNfyHZF_9SLIOlMVSx6nNY6pcTMQM4HJHg4mw,3826
51
- teareduce-0.6.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
52
- teareduce-0.6.6.dist-info/entry_points.txt,sha256=6yBvig5jTL2ugqz5SF767AiszzrHKGRASsX1II84kqA,66
53
- teareduce-0.6.6.dist-info/top_level.txt,sha256=7OkwtX9zNRkGJ7ACgjk4ESgC74qUYcS5O2qcO0v-Si4,10
54
- teareduce-0.6.6.dist-info/RECORD,,
49
+ teareduce-0.6.7.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
50
+ teareduce-0.6.7.dist-info/METADATA,sha256=wobVWo_cxUm1u_YWE6fp8o7YzwCEN0Ya5UsNR62E1M8,4081
51
+ teareduce-0.6.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
52
+ teareduce-0.6.7.dist-info/entry_points.txt,sha256=6yBvig5jTL2ugqz5SF767AiszzrHKGRASsX1II84kqA,66
53
+ teareduce-0.6.7.dist-info/top_level.txt,sha256=7OkwtX9zNRkGJ7ACgjk4ESgC74qUYcS5O2qcO0v-Si4,10
54
+ teareduce-0.6.7.dist-info/RECORD,,