plotastrodata 1.6.3.post1__tar.gz → 1.6.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 (23) hide show
  1. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/PKG-INFO +1 -1
  2. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/__init__.py +1 -1
  3. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/analysis_utils.py +2 -1
  4. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/coord_utils.py +9 -5
  5. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata.egg-info/PKG-INFO +1 -1
  6. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/LICENSE +0 -0
  7. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/README.md +0 -0
  8. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/const_utils.py +0 -0
  9. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/ext_utils.py +0 -0
  10. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/fft_utils.py +0 -0
  11. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/fits_utils.py +0 -0
  12. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/fitting_utils.py +0 -0
  13. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/los_utils.py +0 -0
  14. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/matrix_utils.py +0 -0
  15. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/other_utils.py +0 -0
  16. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata/plot_utils.py +0 -0
  17. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata.egg-info/SOURCES.txt +0 -0
  18. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata.egg-info/dependency_links.txt +0 -0
  19. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata.egg-info/not-zip-safe +0 -0
  20. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata.egg-info/requires.txt +0 -0
  21. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/plotastrodata.egg-info/top_level.txt +0 -0
  22. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/setup.cfg +0 -0
  23. {plotastrodata-1.6.3.post1 → plotastrodata-1.6.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.6.3.post1
3
+ Version: 1.6.4
4
4
  Summary: plotastrodata is a tool for astronomers to create figures from FITS files and perform fundamental data analyses with ease.
5
5
  Home-page: https://github.com/yusukeaso-astron/plotastrodata
6
6
  Download-URL: https://github.com/yusukeaso-astron/plotastrodata
@@ -1,4 +1,4 @@
1
1
  import warnings
2
2
 
3
3
  warnings.simplefilter('ignore', UserWarning)
4
- __version__ = '1.6.3-1'
4
+ __version__ = '1.6.4'
@@ -634,7 +634,8 @@ class AstroFrame():
634
634
  if self.fitsimage is not None and self.center is None:
635
635
  self.center = FitsData(self.fitsimage).get_center()
636
636
 
637
- def pos2xy(self, poslist: list[str | list[float, float]] = []) -> np.ndarray:
637
+ def pos2xy(self, poslist: list[str | list[float, float]] = []
638
+ ) -> np.ndarray:
638
639
  """Text or relative to absolute coordinates.
639
640
 
640
641
  Args:
@@ -80,12 +80,13 @@ def coord2xy(coords: str | list, coordorg: str = '00h00m00s 00d00m00s',
80
80
  c0 = c0.transform_to(frame=frame)
81
81
  clist = SkyCoord(coords, frame=frame) # frame=None means ICRS.
82
82
  xy = c0.spherical_offsets_to(clist)
83
- return np.array([xy[0].degree, xy[1].degree])
83
+ xy = np.array([xy[0].degree, xy[1].degree])
84
+ return xy
84
85
 
85
86
 
86
87
  def xy2coord(xy: list, coordorg: str = '00h00m00s 00d00m00s',
87
88
  frame: str | None = None, frameorg: str | None = None,
88
- ) -> str:
89
+ ) -> str | np.ndarray:
89
90
  """Transform relative (deg, deg) to R.A.-Dec.
90
91
 
91
92
  Args:
@@ -105,10 +106,13 @@ def xy2coord(xy: list, coordorg: str = '00h00m00s 00d00m00s',
105
106
  coords = c0.spherical_offsets_by(*xy * units.degree)
106
107
  if frame is not None:
107
108
  coords = coords.transform_to(frame=frame)
108
- s = coords.to_string('hmsdms')
109
+ coords = coords.to_string('hmsdms')
109
110
  if framename is not None:
110
- s = f'{framename} {s}'
111
- return s
111
+ if type(coords) is str:
112
+ coords = f'{framename} {coords}'
113
+ else:
114
+ coords = np.array([f'{framename} {s}' for s in coords])
115
+ return coords
112
116
 
113
117
 
114
118
  def rel2abs(xrel: float, yrel: float,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.6.3.post1
3
+ Version: 1.6.4
4
4
  Summary: plotastrodata is a tool for astronomers to create figures from FITS files and perform fundamental data analyses with ease.
5
5
  Home-page: https://github.com/yusukeaso-astron/plotastrodata
6
6
  Download-URL: https://github.com/yusukeaso-astron/plotastrodata