teareduce 0.4.8__tar.gz → 0.4.9__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 (41) hide show
  1. {teareduce-0.4.8/src/teareduce.egg-info → teareduce-0.4.9}/PKG-INFO +1 -1
  2. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/imshow.py +17 -4
  3. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/version.py +1 -1
  4. {teareduce-0.4.8 → teareduce-0.4.9/src/teareduce.egg-info}/PKG-INFO +1 -1
  5. {teareduce-0.4.8 → teareduce-0.4.9}/LICENSE.txt +0 -0
  6. {teareduce-0.4.8 → teareduce-0.4.9}/README.md +0 -0
  7. {teareduce-0.4.8 → teareduce-0.4.9}/pyproject.toml +0 -0
  8. {teareduce-0.4.8 → teareduce-0.4.9}/setup.cfg +0 -0
  9. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/__init__.py +0 -0
  10. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/avoid_astropy_warnings.py +0 -0
  11. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/cleanest/__init__.py +0 -0
  12. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/cleanest/__main__.py +0 -0
  13. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/cleanest/cosmicraycleanerapp.py +0 -0
  14. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/cleanest/reviewcosmicray.py +0 -0
  15. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/cookbook/__init__.py +0 -0
  16. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/cookbook/get_cookbook_file.py +0 -0
  17. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/correct_pincushion_distortion.py +0 -0
  18. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/cosmicrays.py +0 -0
  19. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/ctext.py +0 -0
  20. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/draw_rectangle.py +0 -0
  21. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/elapsed_time.py +0 -0
  22. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/histogram1d.py +0 -0
  23. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/numsplines.py +0 -0
  24. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/peaks_spectrum.py +0 -0
  25. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/polfit.py +0 -0
  26. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/robust_std.py +0 -0
  27. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/sdistortion.py +0 -0
  28. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/simulateccdexposure.py +0 -0
  29. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/sliceregion.py +0 -0
  30. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/statsummary.py +0 -0
  31. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/tests/__init__.py +0 -0
  32. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/tests/test_sliceregion.py +0 -0
  33. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/tests/test_version.py +0 -0
  34. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/wavecal.py +0 -0
  35. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/write_array_to_fits.py +0 -0
  36. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce/zscale.py +0 -0
  37. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce.egg-info/SOURCES.txt +0 -0
  38. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce.egg-info/dependency_links.txt +0 -0
  39. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce.egg-info/entry_points.txt +0 -0
  40. {teareduce-0.4.8 → teareduce-0.4.9}/src/teareduce.egg-info/requires.txt +0 -0
  41. {teareduce-0.4.8 → teareduce-0.4.9}/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.8
3
+ Version: 0.4.9
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
@@ -14,13 +14,18 @@ from matplotlib.axes import Axes
14
14
  from mpl_toolkits.axes_grid1 import make_axes_locatable
15
15
 
16
16
 
17
- def imshowme(data, **kwargs):
17
+ def imshowme(data, return_objs=False, **kwargs):
18
18
  """Simple execution of teareduce.imshow.
19
19
 
20
20
  Parameters
21
21
  ----------
22
22
  data : numpy.ndarray
23
23
  2D array to be displayed
24
+ return_objs : bool
25
+ If True, return the Figure, Axes, AxesImage,
26
+ color bar Axes and Colorbar instances.
27
+ **kwargs : dict
28
+ Additional parameters passed to imshow().
24
29
 
25
30
  Returns
26
31
  -------
@@ -37,14 +42,16 @@ def imshowme(data, **kwargs):
37
42
  Instance of Colorbar, or None if colorbar is False.
38
43
  """
39
44
  fig, ax = plt.subplots()
40
- img, cax, cbar = imshow(fig=fig, ax=ax, data=data, **kwargs)
41
- return fig, ax, img, cax, cbar
45
+ img, cax, cbar = imshow(fig=fig, ax=ax, data=data, return_objs=True, **kwargs)
46
+ if return_objs:
47
+ return fig, ax, img, cax, cbar
42
48
 
43
49
 
44
50
  def imshow(fig=None, ax=None, data=None, ds9mode=False,
45
51
  crpix1=1, crval1=None, cdelt1=None, cunit1=None, cunitx=Unit('Angstrom'),
46
52
  xlabel=None, ylabel=None, title=None,
47
53
  colorbar=True, cblabel='Number of counts',
54
+ return_objs=True,
48
55
  **kwargs):
49
56
  """Call imshow() with color bar and default labels.
50
57
 
@@ -89,6 +96,11 @@ def imshow(fig=None, ax=None, data=None, ds9mode=False,
89
96
  If True, display color bar.
90
97
  cblabel : str
91
98
  Color bar label.
99
+ return_objs : bool
100
+ If True, return AxesImage, color bar Axes and Colorbar
101
+ instances.
102
+ **kwargs : dict
103
+ Additional parameters passed to imshow().
92
104
 
93
105
  Return
94
106
  ------
@@ -188,4 +200,5 @@ def imshow(fig=None, ax=None, data=None, ds9mode=False,
188
200
  cax = None
189
201
  cbar = None
190
202
 
191
- return img, cax, cbar
203
+ if return_objs:
204
+ return img, cax, cbar
@@ -9,7 +9,7 @@
9
9
  #
10
10
  """Module to define the version of the teareduce package."""
11
11
 
12
- VERSION = '0.4.8'
12
+ VERSION = '0.4.9'
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.8
3
+ Version: 0.4.9
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
File without changes
File without changes
File without changes
File without changes