teareduce 0.4.3__tar.gz → 0.4.4__tar.gz

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.
Files changed (34) hide show
  1. {teareduce-0.4.3/src/teareduce.egg-info → teareduce-0.4.4}/PKG-INFO +21 -3
  2. {teareduce-0.4.3 → teareduce-0.4.4}/README.md +20 -2
  3. {teareduce-0.4.3 → teareduce-0.4.4}/pyproject.toml +2 -3
  4. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/imshow.py +18 -1
  5. teareduce-0.4.4/src/teareduce/tests/test_version.py +8 -0
  6. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/version.py +1 -1
  7. {teareduce-0.4.3 → teareduce-0.4.4/src/teareduce.egg-info}/PKG-INFO +21 -3
  8. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce.egg-info/SOURCES.txt +2 -1
  9. {teareduce-0.4.3 → teareduce-0.4.4}/LICENSE.txt +0 -0
  10. {teareduce-0.4.3 → teareduce-0.4.4}/setup.cfg +0 -0
  11. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/__init__.py +0 -0
  12. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/avoid_astropy_warnings.py +0 -0
  13. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/correct_pincushion_distortion.py +0 -0
  14. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/cosmicrays.py +0 -0
  15. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/ctext.py +0 -0
  16. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/draw_rectangle.py +0 -0
  17. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/elapsed_time.py +0 -0
  18. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/histogram1d.py +0 -0
  19. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/numsplines.py +0 -0
  20. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/peaks_spectrum.py +0 -0
  21. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/polfit.py +0 -0
  22. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/robust_std.py +0 -0
  23. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/sdistortion.py +0 -0
  24. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/simulateccdexposure.py +0 -0
  25. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/sliceregion.py +0 -0
  26. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/statsummary.py +0 -0
  27. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/tests/__init__.py +0 -0
  28. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/tests/test_sliceregion.py +0 -0
  29. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/wavecal.py +0 -0
  30. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/write_array_to_fits.py +0 -0
  31. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce/zscale.py +0 -0
  32. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce.egg-info/dependency_links.txt +0 -0
  33. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce.egg-info/requires.txt +0 -0
  34. {teareduce-0.4.3 → teareduce-0.4.4}/src/teareduce.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: teareduce
3
- Version: 0.4.3
3
+ Version: 0.4.4
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
@@ -30,7 +30,24 @@ Requires-Dist: pytest; extra == "test"
30
30
  Dynamic: license-file
31
31
 
32
32
  # teareduce
33
- Utilities for astronomical data reduction
33
+
34
+ Utilities for astronomical data reduction.
35
+
36
+ This package is not intended to be a general-purpose image reduction code. It
37
+ only includes specific operations required in certain steps of the traditional
38
+ astronomical image reduction process that, at the time of its creation, were
39
+ not available in more established packages such as
40
+ [ccdproc](https://ccdproc.readthedocs.io/en/latest/). In addition, it also
41
+ offers alternative ways to perform certain tasks that we have found to be more
42
+ practical for use in Master’s level classes.
43
+
44
+
45
+ ## Documentation
46
+
47
+ The documentation for this package is available at [this
48
+ link](https://guaix.fis.ucm.es/~tea/teareduce-cookbook/_build/html/intro.html).
49
+ It includes Juypter notebooks that can be easily downloaded and demonstrate the
50
+ practical use of the defined functionality.
34
51
 
35
52
  ## Installing the code
36
53
 
@@ -72,5 +89,6 @@ The latest development version is available through [GitHub](https://github.com/
72
89
  (venv_teareduce) $ ipython
73
90
  In [1]: import teareduce as tea
74
91
  In [2]: print(tea.__version__)
75
- 0.2.1
92
+ 0.4.3
76
93
  ```
94
+
@@ -1,5 +1,22 @@
1
1
  # teareduce
2
- Utilities for astronomical data reduction
2
+
3
+ Utilities for astronomical data reduction.
4
+
5
+ This package is not intended to be a general-purpose image reduction code. It
6
+ only includes specific operations required in certain steps of the traditional
7
+ astronomical image reduction process that, at the time of its creation, were
8
+ not available in more established packages such as
9
+ [ccdproc](https://ccdproc.readthedocs.io/en/latest/). In addition, it also
10
+ offers alternative ways to perform certain tasks that we have found to be more
11
+ practical for use in Master’s level classes.
12
+
13
+
14
+ ## Documentation
15
+
16
+ The documentation for this package is available at [this
17
+ link](https://guaix.fis.ucm.es/~tea/teareduce-cookbook/_build/html/intro.html).
18
+ It includes Juypter notebooks that can be easily downloaded and demonstrate the
19
+ practical use of the defined functionality.
3
20
 
4
21
  ## Installing the code
5
22
 
@@ -41,5 +58,6 @@ The latest development version is available through [GitHub](https://github.com/
41
58
  (venv_teareduce) $ ipython
42
59
  In [1]: import teareduce as tea
43
60
  In [2]: print(tea.__version__)
44
- 0.2.1
61
+ 0.4.3
45
62
  ```
63
+
@@ -2,8 +2,7 @@
2
2
  # Minimum requirements for the build system to execute.
3
3
  # (include packages imported in the different modules; otherwise
4
4
  # a ModuleNotFoundError is raised when using $ pip install -e .)
5
- requires = ["setuptools >= 61.0.0", "wheel",
6
- "astropy", "matplotlib", "numpy>=1.22","scipy", "lmfit", "tqdm"]
5
+ requires = ["setuptools >= 61.0.0"]
7
6
  build-backend = "setuptools.build_meta"
8
7
 
9
8
  [project]
@@ -48,7 +47,7 @@ Homepage = "https://github.com/nicocardiel/teareduce"
48
47
  Repository = "https://github.com/nicocardiel/teareduce.git"
49
48
 
50
49
  [tool.setuptools.dynamic]
51
- version = {attr = "teareduce.__version__"}
50
+ version = {attr = "teareduce.version.VERSION"}
52
51
 
53
52
  # performs autodetection
54
53
  [tool.setuptools.packages.find]
@@ -101,6 +101,7 @@ def imshow(fig=None, ax=None, data=None,
101
101
  if ylabel is None:
102
102
  ylabel = 'Y axis (array index)'
103
103
 
104
+ wavecalib = False
104
105
  if crpix1 is not None and crval1 is not None and cdelt1 is not None and cunit1 is not None:
105
106
  if 'extent' in kwargs:
106
107
  raise ValueError('extent parameter can not be used with a wavelength calibration scale')
@@ -112,9 +113,12 @@ def imshow(fig=None, ax=None, data=None,
112
113
  u_pixel = Unit('pixel')
113
114
  xminwv = crval1 + (xmin * u_pixel - crpix1 + 1 * u_pixel) * cdelt1
114
115
  xmaxwv = crval1 + (xmax * u_pixel - crpix1 + 1 * u_pixel) * cdelt1
115
- extent = [xminwv.to(cunitx).value, xmaxwv.to(cunitx).value, ymin, ymax]
116
+ xminwv = xminwv.to(cunitx).value
117
+ xmaxwv = xmaxwv.to(cunitx).value
118
+ extent = [xminwv, xmaxwv, ymin, ymax]
116
119
  xlabel = f'Wavelength ({cunitx})'
117
120
  aspect = 'auto'
121
+ wavecalib = True
118
122
  else:
119
123
  if 'extent' in kwargs:
120
124
  extent = kwargs['extent']
@@ -143,6 +147,19 @@ def imshow(fig=None, ax=None, data=None,
143
147
  if title is not None:
144
148
  ax.set_title(title)
145
149
 
150
+ # if a wavelength calibration is provided, display the index scale
151
+ # on the top horizontal axis
152
+ if wavecalib:
153
+
154
+ def index2coord(i):
155
+ return xminwv + (xmaxwv - xminwv) * i / (naxis1 - 1)
156
+
157
+ def coord2index(x):
158
+ return (naxis1 - 1) * (x - xminwv) / (xmaxwv - xminwv)
159
+
160
+ ax_top = ax.secondary_xaxis('top', functions=(coord2index, index2coord))
161
+ ax_top.set_xlabel('X axis (array index)')
162
+
146
163
  if colorbar:
147
164
  divider = make_axes_locatable(ax)
148
165
  cax = divider.append_axes("right", size="5%", pad=0.05, axes_class=Axes)
@@ -0,0 +1,8 @@
1
+
2
+ from ..version import main, VERSION
3
+
4
+ def test_main(capsys):
5
+ msg = f"Version: {VERSION}\n"
6
+ main()
7
+ captured = capsys.readouterr()
8
+ assert captured.out == msg
@@ -9,7 +9,7 @@
9
9
  #
10
10
  """Module to define the version of the teareduce package."""
11
11
 
12
- VERSION = '0.4.3'
12
+ VERSION = '0.4.4'
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.4.3
3
+ Version: 0.4.4
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
@@ -30,7 +30,24 @@ Requires-Dist: pytest; extra == "test"
30
30
  Dynamic: license-file
31
31
 
32
32
  # teareduce
33
- Utilities for astronomical data reduction
33
+
34
+ Utilities for astronomical data reduction.
35
+
36
+ This package is not intended to be a general-purpose image reduction code. It
37
+ only includes specific operations required in certain steps of the traditional
38
+ astronomical image reduction process that, at the time of its creation, were
39
+ not available in more established packages such as
40
+ [ccdproc](https://ccdproc.readthedocs.io/en/latest/). In addition, it also
41
+ offers alternative ways to perform certain tasks that we have found to be more
42
+ practical for use in Master’s level classes.
43
+
44
+
45
+ ## Documentation
46
+
47
+ The documentation for this package is available at [this
48
+ link](https://guaix.fis.ucm.es/~tea/teareduce-cookbook/_build/html/intro.html).
49
+ It includes Juypter notebooks that can be easily downloaded and demonstrate the
50
+ practical use of the defined functionality.
34
51
 
35
52
  ## Installing the code
36
53
 
@@ -72,5 +89,6 @@ The latest development version is available through [GitHub](https://github.com/
72
89
  (venv_teareduce) $ ipython
73
90
  In [1]: import teareduce as tea
74
91
  In [2]: print(tea.__version__)
75
- 0.2.1
92
+ 0.4.3
76
93
  ```
94
+
@@ -28,4 +28,5 @@ src/teareduce.egg-info/dependency_links.txt
28
28
  src/teareduce.egg-info/requires.txt
29
29
  src/teareduce.egg-info/top_level.txt
30
30
  src/teareduce/tests/__init__.py
31
- src/teareduce/tests/test_sliceregion.py
31
+ src/teareduce/tests/test_sliceregion.py
32
+ src/teareduce/tests/test_version.py
File without changes
File without changes